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
759bd8b7
Commit
759bd8b7
authored
Jul 07, 1998
by
J"orn Rennecke
Committed by
Joern Rennecke
Jul 07, 1998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* cse (cse_insn): Don't make change without validation.
From-SVN: r20996
parent
8ea2460f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
5 deletions
+16
-5
gcc/ChangeLog
+4
-0
gcc/cse.c
+12
-5
No files found.
gcc/ChangeLog
View file @
759bd8b7
Tue Jul 7 21:05:25 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
* cse (cse_insn): Don't make change without validation.
Tue Jul 7 11:40:05 1998 Jeffrey A Law (law@cygnus.com)
Tue Jul 7 11:40:05 1998 Jeffrey A Law (law@cygnus.com)
* mn10200.md (various zero/sign extension patterns): zero and sign
* mn10200.md (various zero/sign extension patterns): zero and sign
...
...
gcc/cse.c
View file @
759bd8b7
...
@@ -7004,18 +7004,25 @@ cse_insn (insn, libcall_insn)
...
@@ -7004,18 +7004,25 @@ cse_insn (insn, libcall_insn)
SRC is a hard register. */
SRC is a hard register. */
{
{
int
first
=
qty_first_reg
[
reg_qty
[
REGNO
(
src
)]];
int
first
=
qty_first_reg
[
reg_qty
[
REGNO
(
src
)]];
rtx
new_src
=
(
first
>=
FIRST_PSEUDO_REGISTER
?
regno_reg_rtx
[
first
]
:
gen_rtx_REG
(
GET_MODE
(
src
),
first
));
src
=
SET_SRC
(
sets
[
i
].
rtl
)
/* We must use validate-change even for this, because this
=
first
>=
FIRST_PSEUDO_REGISTER
?
regno_reg_rtx
[
first
]
might be a special no-op instruction, suitable only to
:
gen_rtx_REG
(
GET_MODE
(
src
),
first
);
tag notes onto. */
if
(
validate_change
(
insn
,
&
SET_SRC
(
sets
[
i
].
rtl
),
new_src
,
0
))
{
src
=
new_src
;
/* If we had a constant that is cheaper than what we are now
/* If we had a constant that is cheaper than what we are now
setting SRC to, use that constant. We ignored it when we
setting SRC to, use that constant. We ignored it when we
thought we could make this into a no-op. */
thought we could make this into a no-op. */
if
(
src_const
&&
COST
(
src_const
)
<
COST
(
src
)
if
(
src_const
&&
COST
(
src_const
)
<
COST
(
src
)
&&
validate_change
(
insn
,
&
SET_SRC
(
sets
[
i
].
rtl
),
src_const
,
0
))
&&
validate_change
(
insn
,
&
SET_SRC
(
sets
[
i
].
rtl
),
src_const
,
0
))
src
=
src_const
;
src
=
src_const
;
}
}
}
/* If we made a change, recompute SRC values. */
/* If we made a change, recompute SRC values. */
if
(
src
!=
sets
[
i
].
src
)
if
(
src
!=
sets
[
i
].
src
)
...
...
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