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
28b039e3
Commit
28b039e3
authored
Sep 26, 1992
by
Richard Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(location_attribute): If DECL_RTL looks like (MEM pseudo),
treat that variable as optimized away. From-SVN: r2253
parent
68703794
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
7 deletions
+33
-7
gcc/dwarfout.c
+33
-7
No files found.
gcc/dwarfout.c
View file @
28b039e3
...
@@ -1478,7 +1478,19 @@ output_mem_loc_descriptor (rtl)
...
@@ -1478,7 +1478,19 @@ output_mem_loc_descriptor (rtl)
be referred to as a "base register". This distinction is not
be referred to as a "base register". This distinction is not
based in any way upon what category of register the hardware
based in any way upon what category of register the hardware
believes the given register belongs to. This is strictly
believes the given register belongs to. This is strictly
Dwarf terminology we're dealing with here. */
Dwarf terminology we're dealing with here.
Note that in cases where the location of a memory-resident data
object could be expressed as:
OP_ADD (OP_BASEREG (basereg), OP_CONST (0))
the actual DWARF location descriptor that we generate may just
be OP_BASEREG (basereg). This may look deceptively like the
object in question was allocated to a register (rather than
in memory) so DWARF consumers need to be aware of the subtle
distinction between OP_REG and OP_BASEREG.
*/
ASM_OUTPUT_DWARF_STACK_OP
(
asm_out_file
,
OP_BASEREG
);
ASM_OUTPUT_DWARF_STACK_OP
(
asm_out_file
,
OP_BASEREG
);
ASM_OUTPUT_DWARF_DATA4
(
asm_out_file
,
ASM_OUTPUT_DWARF_DATA4
(
asm_out_file
,
...
@@ -1877,13 +1889,27 @@ location_attribute (rtl)
...
@@ -1877,13 +1889,27 @@ location_attribute (rtl)
/* Handle a special case. If we are about to output a location descriptor
/* Handle a special case. If we are about to output a location descriptor
for a variable or parameter which has been optimized out of existence,
for a variable or parameter which has been optimized out of existence,
don't do that. Instead we output a zero-length location descriptor
don't do that. Instead we output a zero-length location descriptor
value as part of the location attribute. Note that we cannot simply
value as part of the location attribute.
suppress the entire location attribute, because the absence of a
location attribute in certain kinds of DIEs is used to indicate some-
A variable which has been optimized out of existance will have a
thing entirely different... i.e. that the DIE represents an object
DECL_RTL value which denotes a pseudo-reg.
declaration, but not a definition. So sayeth the PLSIG. */
Currently, in some rare cases, variables can have DECL_RTL values
which look like (MEM (REG pseudo-reg#)). These cases are due to
bugs elsewhere in the compiler. We treat such cases
as if the variable(s) in question had been optimized out of existance.
Note that in all cases where we wish to express the fact that a
variable has been optimized out of existance, we do not simply
suppress the generation of the entire location attribute because
the absence of a location attribute in certain kinds of DIEs is
used to indicate something else entirely... i.e. that the DIE
represents an object declaration, but not a definition. So sayeth
the PLSIG.
*/
if
(
!
is_pseudo_reg
(
rtl
))
if
(
!
is_pseudo_reg
(
rtl
)
&&
(
GET_CODE
(
rtl
)
!=
MEM
||
!
is_pseudo_reg
(
XEXP
(
rtl
,
0
))))
output_loc_descriptor
(
eliminate_regs
(
rtl
,
0
,
NULL_RTX
));
output_loc_descriptor
(
eliminate_regs
(
rtl
,
0
,
NULL_RTX
));
ASM_OUTPUT_LABEL
(
asm_out_file
,
end_label
);
ASM_OUTPUT_LABEL
(
asm_out_file
,
end_label
);
...
...
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