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
088e7160
Commit
088e7160
authored
26 years ago
by
Nick Clifton
Committed by
Nick Clifton
26 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Preserve programmer specified labels, and emit debug info for them even if
they are deleted. From-SVN: r25883
parent
0fdb7c85
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
4 deletions
+35
-4
gcc/ChangeLog
+9
-0
gcc/dwarf2out.c
+7
-1
gcc/dwarfout.c
+6
-1
gcc/flow.c
+13
-2
No files found.
gcc/ChangeLog
View file @
088e7160
Sun
Mar
21
12
:
13
:
01
1999
Nick
Clifton
<
nickc
@cygnus
.
com
>
*
flow
.
c
(
can_delete_label_p
)
:
Do
not
allow
user
specified
labels
to
be
deleted
.
*
dwarf2out
.
c
(
gen_label_die
)
:
Generate
addresses
for
deleted
(
programmer
specified
)
labels
.
*
dwarfout
.
c
(
output_label_die
)
:
Generate
addresses
for
deleted
(
programmer
specified
)
labels
.
1999
-
03
-
21
Manfred
Hollstein
<
manfred
@s
-
direktnet
.
de
>
*
Makefile
.
in
(
xgcc
$
(
exeext
))
:
Add
intl
.
o
to
list
of
files
to
be
...
...
This diff is collapsed.
Click to expand it.
gcc/dwarf2out.c
View file @
088e7160
...
...
@@ -8583,7 +8583,13 @@ gen_label_die (decl, context_die)
else
{
insn
=
DECL_RTL
(
decl
);
if
(
GET_CODE
(
insn
)
==
CODE_LABEL
)
/* Deleted labels are programmer specified labels which have been
eliminated because of various optimisations. We still emit them
here so that it is possible to put breakpoints on them. */
if
(
GET_CODE
(
insn
)
==
CODE_LABEL
||
((
GET_CODE
(
insn
)
==
NOTE
&&
NOTE_LINE_NUMBER
(
insn
)
==
NOTE_INSN_DELETED_LABEL
)))
{
/* When optimization is enabled (via -O) some parts of the compiler
(e.g. jump.c and cse.c) may try to delete CODE_LABEL insns which
...
...
This diff is collapsed.
Click to expand it.
gcc/dwarfout.c
View file @
088e7160
...
...
@@ -3519,7 +3519,12 @@ output_label_die (arg)
{
register
rtx
insn
=
DECL_RTL
(
decl
);
if
(
GET_CODE
(
insn
)
==
CODE_LABEL
)
/* Deleted labels are programmer specified labels which have been
eliminated because of various optimisations. We still emit them
here so that it is possible to put breakpoints on them. */
if
(
GET_CODE
(
insn
)
==
CODE_LABEL
||
((
GET_CODE
(
insn
)
==
NOTE
&&
NOTE_LINE_NUMBER
(
insn
)
==
NOTE_INSN_DELETED_LABEL
)))
{
char
label
[
MAX_ARTIFICIAL_LABEL_BYTES
];
...
...
This diff is collapsed.
Click to expand it.
gcc/flow.c
View file @
088e7160
...
...
@@ -376,7 +376,7 @@ find_basic_blocks (f, nregs, file)
bb_eh_end
=
(
rtx
*
)
alloca
(
n_basic_blocks
*
sizeof
(
rtx
));
label_value_list
=
find_basic_blocks_1
(
f
,
bb_eh_end
);
/* Record the block to which an insn belongs. */
/* ??? This should be done another way, by which (perhaps) a label is
tagged directly with the basic block that it starts. It is used for
...
...
@@ -1241,7 +1241,7 @@ split_edge (edge_in)
pos
=
emit_jump_insn_after
(
gen_jump
(
old_succ
->
head
),
pos
);
jump_block
->
end
=
pos
;
emit_barrier_after
(
pos
);
/* ... and clear fallthru on the outgoing edge. */
e
->
flags
&=
~
EDGE_FALLTHRU
;
...
...
@@ -1649,6 +1649,7 @@ delete_block (b)
notes. */
insn
=
b
->
head
;
if
(
GET_CODE
(
insn
)
==
CODE_LABEL
)
{
rtx
x
,
*
prev
=
&
exception_handler_labels
;
...
...
@@ -1793,6 +1794,16 @@ can_delete_label_p (label)
if
(
label
==
XEXP
(
x
,
0
))
return
0
;
/* User declared labels must be preserved, but we can
convert them into a NOTE instead. */
if
(
LABEL_NAME
(
label
)
!=
0
)
{
PUT_CODE
(
label
,
NOTE
);
NOTE_LINE_NUMBER
(
label
)
=
NOTE_INSN_DELETED_LABEL
;
NOTE_SOURCE_FILE
(
label
)
=
0
;
return
0
;
}
return
1
;
}
...
...
This diff is collapsed.
Click to expand it.
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