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
40b5a77c
Commit
40b5a77c
authored
Mar 27, 1999
by
Jeffrey A Law
Committed by
Jeff Law
Mar 27, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* flow.c (mark_used_regs): Improve handling of ASMs.
From-SVN: r26014
parent
26f096f9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
2 deletions
+48
-2
gcc/ChangeLog
+4
-0
gcc/flow.c
+44
-2
No files found.
gcc/ChangeLog
View file @
40b5a77c
Sat
Mar
27
16
:
13
:
50
1999
Jeffrey
A
Law
(
law
@cygnus
.
com
)
*
flow
.
c
(
mark_used_regs
)
:
Improve
handling
of
ASMs
.
1999
-
03
-
26
Zack
Weinberg
<
zack
@rabi
.
columbia
.
edu
>
1999
-
03
-
26
Zack
Weinberg
<
zack
@rabi
.
columbia
.
edu
>
*
Makefile
.
in
(
xcpp
,
cppspec
.
o
)
:
New
targets
.
*
Makefile
.
in
(
xcpp
,
cppspec
.
o
)
:
New
targets
.
...
...
gcc/flow.c
View file @
40b5a77c
...
@@ -242,7 +242,12 @@ static int loop_depth;
...
@@ -242,7 +242,12 @@ static int loop_depth;
static
int
cc0_live
;
static
int
cc0_live
;
/* During propagate_block, this contains a list of all the MEMs we are
/* During propagate_block, this contains a list of all the MEMs we are
tracking for dead store elimination. */
tracking for dead store elimination.
?!? Note we leak memory by not free-ing items on this list. We need to
write some generic routines to operate on memory lists since cse, gcse,
loop, sched, flow and possibly other passes all need to do basically the
same operations on these lists. */
static
rtx
mem_set_list
;
static
rtx
mem_set_list
;
...
@@ -3593,7 +3598,6 @@ mark_used_regs (needed, live, x, final, insn)
...
@@ -3593,7 +3598,6 @@ mark_used_regs (needed, live, x, final, insn)
case
PC
:
case
PC
:
case
ADDR_VEC
:
case
ADDR_VEC
:
case
ADDR_DIFF_VEC
:
case
ADDR_DIFF_VEC
:
case
ASM_INPUT
:
return
;
return
;
#ifdef HAVE_cc0
#ifdef HAVE_cc0
...
@@ -3908,6 +3912,44 @@ mark_used_regs (needed, live, x, final, insn)
...
@@ -3908,6 +3912,44 @@ mark_used_regs (needed, live, x, final, insn)
SET_REGNO_REG_SET
(
live
,
i
);
SET_REGNO_REG_SET
(
live
,
i
);
break
;
break
;
case
ASM_OPERANDS
:
case
UNSPEC_VOLATILE
:
case
TRAP_IF
:
case
ASM_INPUT
:
{
/* Traditional and volatile asm instructions must be considered to use
and clobber all hard registers, all pseudo-registers and all of
memory. So must TRAP_IF and UNSPEC_VOLATILE operations.
Consider for instance a volatile asm that changes the fpu rounding
mode. An insn should not be moved across this even if it only uses
pseudo-regs because it might give an incorrectly rounded result.
?!? Unfortunately, marking all hard registers as live causes massive
problems for the register allocator and marking all pseudos as live
creates mountains of uninitialized variable warnings.
So for now, just clear the memory set list and mark any regs
we can find in ASM_OPERANDS as used. */
if
(
code
!=
ASM_OPERANDS
||
MEM_VOLATILE_P
(
x
))
mem_set_list
=
NULL_RTX
;
/* For all ASM_OPERANDS, we must traverse the vector of input operands.
We can not just fall through here since then we would be confused
by the ASM_INPUT rtx inside ASM_OPERANDS, which do not indicate
traditional asms unlike their normal usage. */
if
(
code
==
ASM_OPERANDS
)
{
int
j
;
for
(
j
=
0
;
j
<
ASM_OPERANDS_INPUT_LENGTH
(
x
);
j
++
)
mark_used_regs
(
needed
,
live
,
ASM_OPERANDS_INPUT
(
x
,
j
),
final
,
insn
);
}
break
;
}
default
:
default
:
break
;
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