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
30f5e9f5
Commit
30f5e9f5
authored
Apr 16, 1996
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(final_scan_insn): Allow removal of redundant test and compare
instructions that use clobbers. From-SVN: r11806
parent
b089937a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
26 deletions
+30
-26
gcc/final.c
+30
-26
No files found.
gcc/final.c
View file @
30f5e9f5
...
...
@@ -1756,35 +1756,39 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
and the next statement should reexamine the variable
to compute the condition codes. */
if
(
optimize
&&
GET_CODE
(
body
)
==
SET
&&
GET_CODE
(
SET_DEST
(
body
))
==
CC0
&&
insn
!=
last_ignored_compare
)
if
(
optimize
)
{
if
(
GET_CODE
(
SET_SRC
(
body
))
==
SUBREG
)
SET_SRC
(
body
)
=
alter_subreg
(
SET_SRC
(
body
));
else
if
(
GET_CODE
(
SET_SRC
(
body
))
==
COMPARE
)
{
if
(
GET_CODE
(
XEXP
(
SET_SRC
(
body
),
0
))
==
SUBREG
)
XEXP
(
SET_SRC
(
body
),
0
)
=
alter_subreg
(
XEXP
(
SET_SRC
(
body
),
0
));
if
(
GET_CODE
(
XEXP
(
SET_SRC
(
body
),
1
))
==
SUBREG
)
XEXP
(
SET_SRC
(
body
),
1
)
=
alter_subreg
(
XEXP
(
SET_SRC
(
body
),
1
));
}
if
((
cc_status
.
value1
!=
0
&&
rtx_equal_p
(
SET_SRC
(
body
),
cc_status
.
value1
))
||
(
cc_status
.
value2
!=
0
&&
rtx_equal_p
(
SET_SRC
(
body
),
cc_status
.
value2
)))
rtx
set
=
single_set
(
insn
);
if
(
set
&&
GET_CODE
(
SET_DEST
(
set
))
==
CC0
&&
insn
!=
last_ignored_compare
)
{
/* Don't delete insn if it has an addressing side-effect. */
if
(
!
FIND_REG_INC_NOTE
(
insn
,
0
)
/* or if anything in it is volatile. */
&&
!
volatile_refs_p
(
PATTERN
(
insn
)))
if
(
GET_CODE
(
SET_SRC
(
set
))
==
SUBREG
)
SET_SRC
(
set
)
=
alter_subreg
(
SET_SRC
(
set
));
else
if
(
GET_CODE
(
SET_SRC
(
set
))
==
COMPARE
)
{
/* We don't really delete the insn; just ignore it. */
last_ignored_compare
=
insn
;
break
;
if
(
GET_CODE
(
XEXP
(
SET_SRC
(
set
),
0
))
==
SUBREG
)
XEXP
(
SET_SRC
(
set
),
0
)
=
alter_subreg
(
XEXP
(
SET_SRC
(
set
),
0
));
if
(
GET_CODE
(
XEXP
(
SET_SRC
(
set
),
1
))
==
SUBREG
)
XEXP
(
SET_SRC
(
set
),
1
)
=
alter_subreg
(
XEXP
(
SET_SRC
(
set
),
1
));
}
if
((
cc_status
.
value1
!=
0
&&
rtx_equal_p
(
SET_SRC
(
set
),
cc_status
.
value1
))
||
(
cc_status
.
value2
!=
0
&&
rtx_equal_p
(
SET_SRC
(
set
),
cc_status
.
value2
)))
{
/* Don't delete insn if it has an addressing side-effect. */
if
(
!
FIND_REG_INC_NOTE
(
insn
,
0
)
/* or if anything in it is volatile. */
&&
!
volatile_refs_p
(
PATTERN
(
insn
)))
{
/* We don't really delete the insn; just ignore it. */
last_ignored_compare
=
insn
;
break
;
}
}
}
}
...
...
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