Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
e5bef2e4
Commit
e5bef2e4
authored
Apr 04, 2001
by
Herman A.J. ten Brugge
Committed by
Bernd Schmidt
Apr 04, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
When splitting insns, properly update label usage counts
From-SVN: r41084
parent
347f3440
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
0 deletions
+40
-0
gcc/ChangeLog
+6
-0
gcc/emit-rtl.c
+34
-0
No files found.
gcc/ChangeLog
View file @
e5bef2e4
2001
-
04
-
04
Herman
A
.
J
.
ten
Brugge
<
Haj
.
Ten
.
Brugge
@net
.
HCC
.
nl
>
*
emit
-
rtl
.
c
(
mark_label_nuses
)
Increment
the
label
uses
for
all
labels
present
in
rtx
.
(
try_split
)
Call
new
function
for
all
split
insns
.
2001
-
04
-
04
Jakub
Jelinek
<
jakub
@redhat
.
com
>
*
recog
.
c
(
validate_replace_rtx_1
)
:
Instead
of
aborting
just
make
...
...
gcc/emit-rtl.c
View file @
e5bef2e4
...
...
@@ -177,6 +177,7 @@ static void mark_sequence_stack PARAMS ((struct sequence_stack *));
static
void
unshare_all_rtl_1
PARAMS
((
rtx
));
static
void
unshare_all_decls
PARAMS
((
tree
));
static
void
reset_used_decls
PARAMS
((
tree
));
static
void
mark_label_nuses
PARAMS
((
rtx
));
static
hashval_t
const_int_htab_hash
PARAMS
((
const
void
*
));
static
int
const_int_htab_eq
PARAMS
((
const
void
*
,
const
void
*
));
...
...
@@ -2521,6 +2522,32 @@ prev_cc0_setter (insn)
return
insn
;
}
#endif
/* Increment the label uses for all labels present in rtx. */
static
void
mark_label_nuses
(
x
)
rtx
x
;
{
register
enum
rtx_code
code
;
register
int
i
,
j
;
register
const
char
*
fmt
;
code
=
GET_CODE
(
x
);
if
(
code
==
LABEL_REF
)
LABEL_NUSES
(
XEXP
(
x
,
0
))
++
;
fmt
=
GET_RTX_FORMAT
(
code
);
for
(
i
=
GET_RTX_LENGTH
(
code
)
-
1
;
i
>=
0
;
i
--
)
{
if
(
fmt
[
i
]
==
'e'
)
mark_label_nuses
(
XEXP
(
x
,
i
));
else
if
(
fmt
[
i
]
==
'E'
)
for
(
j
=
XVECLEN
(
x
,
i
)
-
1
;
j
>=
0
;
j
--
)
mark_label_nuses
(
XVECEXP
(
x
,
i
,
j
));
}
}
/* Try splitting insns that can be split for better scheduling.
PAT is the pattern which might split.
...
...
@@ -2580,6 +2607,13 @@ try_split (pat, trial, last)
CALL_INSN_FUNCTION_USAGE
(
XVECEXP
(
seq
,
0
,
i
))
=
CALL_INSN_FUNCTION_USAGE
(
trial
);
/* If there are LABELS inside the split insns increment the
usage count so we don't delete the label. */
if
(
GET_CODE
(
trial
)
==
INSN
)
for
(
i
=
XVECLEN
(
seq
,
0
)
-
1
;
i
>=
0
;
i
--
)
if
(
GET_CODE
(
XVECEXP
(
seq
,
0
,
i
))
==
INSN
)
mark_label_nuses
(
PATTERN
(
XVECEXP
(
seq
,
0
,
i
)));
tem
=
emit_insn_after
(
seq
,
before
);
delete_insn
(
trial
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment