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
e4890d45
Commit
e4890d45
authored
Jun 04, 1992
by
Richard Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
From-SVN: r1162
parent
d1c1397e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
5 deletions
+29
-5
gcc/cse.c
+29
-5
No files found.
gcc/cse.c
View file @
e4890d45
...
@@ -4580,6 +4580,10 @@ fold_rtx (x, insn)
...
@@ -4580,6 +4580,10 @@ fold_rtx (x, insn)
switch
(
GET_RTX_CLASS
(
code
))
switch
(
GET_RTX_CLASS
(
code
))
{
{
case
'1'
:
case
'1'
:
/* We can't simplify extension ops unless we know the original mode. */
if
((
code
==
ZERO_EXTEND
||
code
==
SIGN_EXTEND
)
&&
mode_arg0
==
VOIDmode
)
break
;
new
=
simplify_unary_operation
(
code
,
mode
,
new
=
simplify_unary_operation
(
code
,
mode
,
const_arg0
?
const_arg0
:
folded_arg0
,
const_arg0
?
const_arg0
:
folded_arg0
,
mode_arg0
);
mode_arg0
);
...
@@ -6630,6 +6634,17 @@ cse_process_notes (x, object)
...
@@ -6630,6 +6634,17 @@ cse_process_notes (x, object)
XEXP
(
x
,
1
)
=
cse_process_notes
(
XEXP
(
x
,
1
),
0
);
XEXP
(
x
,
1
)
=
cse_process_notes
(
XEXP
(
x
,
1
),
0
);
return
x
;
return
x
;
case
SIGN_EXTEND
:
case
ZERO_EXTEND
:
{
rtx
new
=
cse_process_notes
(
XEXP
(
x
,
0
),
object
);
/* We don't substitute VOIDmode constants into these rtx,
since they would impede folding. */
if
(
GET_MODE
(
new
)
!=
VOIDmode
)
validate_change
(
object
,
&
XEXP
(
x
,
0
),
new
,
0
);
return
x
;
}
case
REG
:
case
REG
:
i
=
reg_qty
[
REGNO
(
x
)];
i
=
reg_qty
[
REGNO
(
x
)];
...
@@ -7599,6 +7614,7 @@ delete_dead_from_cse (insns, nreg)
...
@@ -7599,6 +7614,7 @@ delete_dead_from_cse (insns, nreg)
rtx
insn
;
rtx
insn
;
rtx
tem
;
rtx
tem
;
int
i
;
int
i
;
int
in_libcall
=
0
;
/* First count the number of times each register is used. */
/* First count the number of times each register is used. */
bzero
(
counts
,
sizeof
(
int
)
*
nreg
);
bzero
(
counts
,
sizeof
(
int
)
*
nreg
);
...
@@ -7613,7 +7629,14 @@ delete_dead_from_cse (insns, nreg)
...
@@ -7613,7 +7629,14 @@ delete_dead_from_cse (insns, nreg)
{
{
int
live_insn
=
0
;
int
live_insn
=
0
;
if
(
GET_CODE
(
PATTERN
(
insn
))
==
SET
)
/* Don't delete any insns that are part of a libcall block.
Flow or loop might get confused if we did that. */
if
(
find_reg_note
(
insn
,
REG_LIBCALL
,
0
))
in_libcall
=
1
;
if
(
in_libcall
)
live_insn
=
1
;
else
if
(
GET_CODE
(
PATTERN
(
insn
))
==
SET
)
{
{
if
(
GET_CODE
(
SET_DEST
(
PATTERN
(
insn
)))
==
REG
if
(
GET_CODE
(
SET_DEST
(
PATTERN
(
insn
)))
==
REG
&&
SET_DEST
(
PATTERN
(
insn
))
==
SET_SRC
(
PATTERN
(
insn
)))
&&
SET_DEST
(
PATTERN
(
insn
))
==
SET_SRC
(
PATTERN
(
insn
)))
...
@@ -7665,16 +7688,17 @@ delete_dead_from_cse (insns, nreg)
...
@@ -7665,16 +7688,17 @@ delete_dead_from_cse (insns, nreg)
live_insn
=
1
;
live_insn
=
1
;
/* If this is a dead insn, delete it and show registers in it aren't
/* If this is a dead insn, delete it and show registers in it aren't
being used. If this is the last insn of a libcall sequence, don't
being used. */
delete it even if it is dead because we don't know how to do so
here. */
if
(
!
live_insn
&&
!
find_reg_note
(
insn
,
REG_RETVAL
,
0
)
)
if
(
!
live_insn
)
{
{
count_reg_usage
(
insn
,
counts
,
-
1
);
count_reg_usage
(
insn
,
counts
,
-
1
);
PUT_CODE
(
insn
,
NOTE
);
PUT_CODE
(
insn
,
NOTE
);
NOTE_SOURCE_FILE
(
insn
)
=
0
;
NOTE_SOURCE_FILE
(
insn
)
=
0
;
NOTE_LINE_NUMBER
(
insn
)
=
NOTE_INSN_DELETED
;
NOTE_LINE_NUMBER
(
insn
)
=
NOTE_INSN_DELETED
;
}
}
if
(
find_reg_note
(
insn
,
REG_RETVAL
,
0
))
in_libcall
=
0
;
}
}
}
}
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