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
e398aa80
Commit
e398aa80
authored
Nov 17, 1998
by
J"orn Rennecke
Committed by
Joern Rennecke
Nov 17, 1998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* flow.c (insn_dead_p): New argument NOTES. Changed all callers.
From-SVN: r23680
parent
bcd91ba7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
12 deletions
+41
-12
gcc/ChangeLog
+4
-0
gcc/flow.c
+37
-12
No files found.
gcc/ChangeLog
View file @
e398aa80
Tue
Nov
17
17
:
13
:
53
1998
J
"orn Rennecke <amylaar@cygnus.co.uk>
* flow.c (insn_dead_p): New argument NOTES. Changed all callers.
Mon Nov 16 17:56:07 1998 David Edelsohn <edelsohn@mhpcc.edu>
* rs6000.c (output_mi_thunk): Improve test for local branch.
...
...
gcc/flow.c
View file @
e398aa80
...
...
@@ -271,7 +271,7 @@ static int set_noop_p PROTO((rtx));
static
int
noop_move_p
PROTO
((
rtx
));
static
void
record_volatile_insns
PROTO
((
rtx
));
static
void
mark_regs_live_at_end
PROTO
((
regset
));
static
int
insn_dead_p
PROTO
((
rtx
,
regset
,
int
));
static
int
insn_dead_p
PROTO
((
rtx
,
regset
,
int
,
rtx
));
static
int
libcall_dead_p
PROTO
((
rtx
,
regset
,
rtx
,
rtx
));
static
void
mark_set_regs
PROTO
((
regset
,
regset
,
rtx
,
rtx
,
regset
));
...
...
@@ -1749,7 +1749,7 @@ propagate_block (old, first, last, final, significant, bnum)
register
int
i
;
rtx
note
=
find_reg_note
(
insn
,
REG_RETVAL
,
NULL_RTX
);
int
insn_is_dead
=
(
insn_dead_p
(
PATTERN
(
insn
),
old
,
0
)
=
(
insn_dead_p
(
PATTERN
(
insn
),
old
,
0
,
REG_NOTES
(
insn
)
)
/* Don't delete something that refers to volatile storage! */
&&
!
INSN_VOLATILE
(
insn
));
int
libcall_is_dead
...
...
@@ -1935,16 +1935,40 @@ propagate_block (old, first, last, final, significant, bnum)
(SET expressions whose destinations are registers dead after the insn).
NEEDED is the regset that says which regs are alive after the insn.
Unless CALL_OK is non-zero, an insn is needed if it contains a CALL. */
Unless CALL_OK is non-zero, an insn is needed if it contains a CALL.
If X is the entire body of an insn, NOTES contains the reg notes
pertaining to the insn. */
static
int
insn_dead_p
(
x
,
needed
,
call_ok
)
insn_dead_p
(
x
,
needed
,
call_ok
,
notes
)
rtx
x
;
regset
needed
;
int
call_ok
;
rtx
notes
ATTRIBUTE_UNUSED
;
{
enum
rtx_code
code
=
GET_CODE
(
x
);
#ifdef AUTO_INC_DEC
/* If flow is invoked after reload, we must take existing AUTO_INC
expresions into account. */
if
(
reload_completed
)
{
for
(
;
notes
;
notes
=
XEXP
(
notes
,
1
))
{
if
(
REG_NOTE_KIND
(
notes
)
==
REG_INC
)
{
int
regno
=
REGNO
(
XEXP
(
notes
,
0
));
/* Don't delete insns to set global regs. */
if
((
regno
<
FIRST_PSEUDO_REGISTER
&&
global_regs
[
regno
])
||
REGNO_REG_SET_P
(
needed
,
regno
))
return
0
;
}
}
}
#endif
/* If setting something that's a reg or part of one,
see if that register's altered value will be live. */
...
...
@@ -2015,7 +2039,7 @@ insn_dead_p (x, needed, call_ok)
for
(
i
--
;
i
>=
0
;
i
--
)
if
(
GET_CODE
(
XVECEXP
(
x
,
0
,
i
))
!=
CLOBBER
&&
GET_CODE
(
XVECEXP
(
x
,
0
,
i
))
!=
USE
&&
!
insn_dead_p
(
XVECEXP
(
x
,
0
,
i
),
needed
,
call_ok
))
&&
!
insn_dead_p
(
XVECEXP
(
x
,
0
,
i
),
needed
,
call_ok
,
NULL_RTX
))
return
0
;
return
1
;
...
...
@@ -2062,6 +2086,7 @@ libcall_dead_p (x, needed, note, insn)
if
(
GET_CODE
(
r
)
==
REG
)
{
rtx
call
=
XEXP
(
note
,
0
);
rtx
call_pat
;
register
int
i
;
/* Find the call insn. */
...
...
@@ -2075,12 +2100,12 @@ libcall_dead_p (x, needed, note, insn)
/* See if the hard reg holding the value is dead.
If this is a PARALLEL, find the call within it. */
call
=
PATTERN
(
call
);
if
(
GET_CODE
(
call
)
==
PARALLEL
)
call
_pat
=
PATTERN
(
call
);
if
(
GET_CODE
(
call
_pat
)
==
PARALLEL
)
{
for
(
i
=
XVECLEN
(
call
,
0
)
-
1
;
i
>=
0
;
i
--
)
if
(
GET_CODE
(
XVECEXP
(
call
,
0
,
i
))
==
SET
&&
GET_CODE
(
SET_SRC
(
XVECEXP
(
call
,
0
,
i
)))
==
CALL
)
for
(
i
=
XVECLEN
(
call
_pat
,
0
)
-
1
;
i
>=
0
;
i
--
)
if
(
GET_CODE
(
XVECEXP
(
call
_pat
,
0
,
i
))
==
SET
&&
GET_CODE
(
SET_SRC
(
XVECEXP
(
call
_pat
,
0
,
i
)))
==
CALL
)
break
;
/* This may be a library call that is returning a value
...
...
@@ -2089,10 +2114,10 @@ libcall_dead_p (x, needed, note, insn)
if
(
i
<
0
)
return
0
;
call
=
XVECEXP
(
call
,
0
,
i
);
call
_pat
=
XVECEXP
(
call_pat
,
0
,
i
);
}
return
insn_dead_p
(
call
,
needed
,
1
);
return
insn_dead_p
(
call
_pat
,
needed
,
1
,
REG_NOTES
(
call
)
);
}
}
return
1
;
...
...
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