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
38d8473f
Commit
38d8473f
authored
Dec 07, 1994
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(distribute_notes): If can't find place for REG_DEAD note, add an INSN
with a USE to hold it. From-SVN: r8625
parent
61314cb4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
39 deletions
+51
-39
gcc/combine.c
+51
-39
No files found.
gcc/combine.c
View file @
38d8473f
...
@@ -10515,49 +10515,50 @@ distribute_notes (notes, from_insn, i3, i2, elim_i2, elim_i1)
...
@@ -10515,49 +10515,50 @@ distribute_notes (notes, from_insn, i3, i2, elim_i2, elim_i1)
reg_n_refs
[
REGNO
(
XEXP
(
note
,
0
))]
=
3
;
reg_n_refs
[
REGNO
(
XEXP
(
note
,
0
))]
=
3
;
if
(
place
==
0
)
if
(
place
==
0
)
for
(
tem
=
prev_nonnote_insn
(
i3
);
{
tem
&&
(
GET_CODE
(
tem
)
==
INSN
for
(
tem
=
prev_nonnote_insn
(
i3
);
||
GET_CODE
(
tem
)
==
CALL_INSN
);
place
==
0
&&
tem
tem
=
prev_nonnote_insn
(
tem
))
&&
(
GET_CODE
(
tem
)
==
INSN
||
GET_CODE
(
tem
)
==
CALL_INSN
);
{
tem
=
prev_nonnote_insn
(
tem
))
/* If the register is being set at TEM, see if that is all
{
TEM is doing. If so, delete TEM. Otherwise, make this
/* If the register is being set at TEM, see if that is all
into a REG_UNUSED note instead. */
TEM is doing. If so, delete TEM. Otherwise, make this
if
(
reg_set_p
(
XEXP
(
note
,
0
),
PATTERN
(
tem
)))
into a REG_UNUSED note instead. */
{
if
(
reg_set_p
(
XEXP
(
note
,
0
),
PATTERN
(
tem
)))
rtx
set
=
single_set
(
tem
);
{
rtx
set
=
single_set
(
tem
);
/* Verify that it was the set, and not a clobber that
/* Verify that it was the set, and not a clobber that
modified the register. */
modified the register. */
if
(
set
!=
0
&&
!
side_effects_p
(
SET_SRC
(
set
))
if
(
set
!=
0
&&
!
side_effects_p
(
SET_SRC
(
set
))
&&
rtx_equal_p
(
XEXP
(
note
,
0
),
SET_DEST
(
set
)))
&&
rtx_equal_p
(
XEXP
(
note
,
0
),
SET_DEST
(
set
)))
{
{
/* Move the notes and links of TEM elsewhere.
/* Move the notes and links of TEM elsewhere.
This might delete other dead insns recursively.
This might delete other dead insns recursively.
First set the pattern to something that won't use
First set the pattern to something that won't use
any register. */
any register. */
PATTERN
(
tem
)
=
pc_rtx
;
PATTERN
(
tem
)
=
pc_rtx
;
distribute_notes
(
REG_NOTES
(
tem
),
tem
,
tem
,
distribute_notes
(
REG_NOTES
(
tem
),
tem
,
tem
,
NULL_RTX
,
NULL_RTX
,
NULL_RTX
);
NULL_RTX
,
NULL_RTX
,
NULL_RTX
);
distribute_links
(
LOG_LINKS
(
tem
));
distribute_links
(
LOG_LINKS
(
tem
));
PUT_CODE
(
tem
,
NOTE
);
PUT_CODE
(
tem
,
NOTE
);
NOTE_LINE_NUMBER
(
tem
)
=
NOTE_INSN_DELETED
;
NOTE_LINE_NUMBER
(
tem
)
=
NOTE_INSN_DELETED
;
NOTE_SOURCE_FILE
(
tem
)
=
0
;
NOTE_SOURCE_FILE
(
tem
)
=
0
;
}
}
else
else
{
{
PUT_REG_NOTE_KIND
(
note
,
REG_UNUSED
);
PUT_REG_NOTE_KIND
(
note
,
REG_UNUSED
);
/* If there isn't already a REG_UNUSED note, put one
/* If there isn't already a REG_UNUSED note, put one
here. */
here. */
if
(
!
find_regno_note
(
tem
,
REG_UNUSED
,
if
(
!
find_regno_note
(
tem
,
REG_UNUSED
,
REGNO
(
XEXP
(
note
,
0
))))
REGNO
(
XEXP
(
note
,
0
))))
place
=
tem
;
place
=
tem
;
break
;
break
;
}
}
}
}
else
if
(
reg_referenced_p
(
XEXP
(
note
,
0
),
PATTERN
(
tem
))
else
if
(
reg_referenced_p
(
XEXP
(
note
,
0
),
PATTERN
(
tem
))
...
@@ -10567,7 +10568,18 @@ distribute_notes (notes, from_insn, i3, i2, elim_i2, elim_i1)
...
@@ -10567,7 +10568,18 @@ distribute_notes (notes, from_insn, i3, i2, elim_i2, elim_i1)
place
=
tem
;
place
=
tem
;
break
;
break
;
}
}
}
}
/* If we haven't found an insn for the death note and it
is still a REG_DEAD note, but we have hit a CODE_LABEL,
insert a USE insn for the register at that label and
put the death node there. This prevents problems with
call-state tracking in caller-save.c. */
if
(
REG_NOTE_KIND
(
note
)
==
REG_DEAD
&&
place
==
0
&&
tem
!=
0
)
place
=
emit_insn_after
(
gen_rtx
(
USE
,
VOIDmode
,
XEXP
(
note
,
0
)),
tem
);
}
/* If the register is set or already dead at PLACE, we needn't do
/* If the register is set or already dead at PLACE, we needn't do
anything with this note if it is still a REG_DEAD note.
anything with this note if it is still a REG_DEAD note.
...
...
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