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
9246aadb
Commit
9246aadb
authored
Jul 23, 2000
by
Aldy Hernandez
Committed by
Aldy Hernandez
Jul 23, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
find_reloads_toplev: add new parameter "address_reloaded".
From-SVN: r35196
parent
8039a4ea
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
12 deletions
+34
-12
gcc/ChangeLog
+6
-0
gcc/reload.c
+28
-12
No files found.
gcc/ChangeLog
View file @
9246aadb
2000-07-22 Aldy Hernandez <aldyh@redhat.com>
* reload.c (find_reloads_toplev): Add new parameter
"address_reloaded".
(find_reloads): Add new parameter to find_reloads_toplev calls.
2000-07-22 Jeffrey Oldham <oldham@codesourcery.com>
2000-07-22 Jeffrey Oldham <oldham@codesourcery.com>
* collect2.c (main): Typo fixed.
* collect2.c (main): Typo fixed.
...
...
gcc/reload.c
View file @
9246aadb
...
@@ -258,7 +258,7 @@ static struct decomposition decompose PARAMS ((rtx));
...
@@ -258,7 +258,7 @@ static struct decomposition decompose PARAMS ((rtx));
static
int
immune_p
PARAMS
((
rtx
,
rtx
,
struct
decomposition
));
static
int
immune_p
PARAMS
((
rtx
,
rtx
,
struct
decomposition
));
static
int
alternative_allows_memconst
PARAMS
((
const
char
*
,
int
));
static
int
alternative_allows_memconst
PARAMS
((
const
char
*
,
int
));
static
rtx
find_reloads_toplev
PARAMS
((
rtx
,
int
,
enum
reload_type
,
int
,
static
rtx
find_reloads_toplev
PARAMS
((
rtx
,
int
,
enum
reload_type
,
int
,
int
,
rtx
));
int
,
rtx
,
int
*
));
static
rtx
make_memloc
PARAMS
((
rtx
,
int
));
static
rtx
make_memloc
PARAMS
((
rtx
,
int
));
static
int
find_reloads_address
PARAMS
((
enum
machine_mode
,
rtx
*
,
rtx
,
rtx
*
,
static
int
find_reloads_address
PARAMS
((
enum
machine_mode
,
rtx
*
,
rtx
,
rtx
*
,
int
,
enum
reload_type
,
int
,
rtx
));
int
,
enum
reload_type
,
int
,
rtx
));
...
@@ -2592,7 +2592,8 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
...
@@ -2592,7 +2592,8 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
ind_levels
,
ind_levels
,
set
!=
0
set
!=
0
&&
&
SET_DEST
(
set
)
==
recog_data
.
operand_loc
[
i
],
&&
&
SET_DEST
(
set
)
==
recog_data
.
operand_loc
[
i
],
insn
);
insn
,
&
address_reloaded
[
i
]);
/* If we made a MEM to load (a part of) the stackslot of a pseudo
/* If we made a MEM to load (a part of) the stackslot of a pseudo
that didn't get a hard register, emit a USE with a REG_EQUAL
that didn't get a hard register, emit a USE with a REG_EQUAL
...
@@ -2616,7 +2617,8 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
...
@@ -2616,7 +2617,8 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
a unary operator by reloading the operand. */
a unary operator by reloading the operand. */
substed_operand
[
i
]
=
recog_data
.
operand
[
i
]
substed_operand
[
i
]
=
recog_data
.
operand
[
i
]
=
find_reloads_toplev
(
recog_data
.
operand
[
i
],
i
,
address_type
[
i
],
=
find_reloads_toplev
(
recog_data
.
operand
[
i
],
i
,
address_type
[
i
],
ind_levels
,
0
,
insn
);
ind_levels
,
0
,
insn
,
&
address_reloaded
[
i
]);
else
if
(
code
==
REG
)
else
if
(
code
==
REG
)
{
{
/* This is equivalent to calling find_reloads_toplev.
/* This is equivalent to calling find_reloads_toplev.
...
@@ -2644,7 +2646,8 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
...
@@ -2644,7 +2646,8 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
of a constant equivalence was checked above. */
of a constant equivalence was checked above. */
substed_operand
[
i
]
=
recog_data
.
operand
[
i
]
substed_operand
[
i
]
=
recog_data
.
operand
[
i
]
=
find_reloads_toplev
(
recog_data
.
operand
[
i
],
i
,
address_type
[
i
],
=
find_reloads_toplev
(
recog_data
.
operand
[
i
],
i
,
address_type
[
i
],
ind_levels
,
0
,
insn
);
ind_levels
,
0
,
insn
,
&
address_reloaded
[
i
]);
}
}
/* If the operand is still a register (we didn't replace it with an
/* If the operand is still a register (we didn't replace it with an
equivalent), get the preferred class to reload it into. */
equivalent), get the preferred class to reload it into. */
...
@@ -3540,7 +3543,8 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
...
@@ -3540,7 +3543,8 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
substed_operand
[
i
]
=
recog_data
.
operand
[
i
]
substed_operand
[
i
]
=
recog_data
.
operand
[
i
]
=
find_reloads_toplev
(
force_const_mem
(
operand_mode
[
i
],
=
find_reloads_toplev
(
force_const_mem
(
operand_mode
[
i
],
recog_data
.
operand
[
i
]),
recog_data
.
operand
[
i
]),
i
,
address_type
[
i
],
ind_levels
,
0
,
insn
);
i
,
address_type
[
i
],
ind_levels
,
0
,
insn
,
NULL
);
if
(
alternative_allows_memconst
(
recog_data
.
constraints
[
i
],
if
(
alternative_allows_memconst
(
recog_data
.
constraints
[
i
],
goal_alternative_number
))
goal_alternative_number
))
goal_alternative_win
[
i
]
=
1
;
goal_alternative_win
[
i
]
=
1
;
...
@@ -4169,16 +4173,21 @@ alternative_allows_memconst (constraint, altnum)
...
@@ -4169,16 +4173,21 @@ alternative_allows_memconst (constraint, altnum)
INSN, if nonzero, is the insn in which we do the reload. It is used
INSN, if nonzero, is the insn in which we do the reload. It is used
to determine if we may generate output reloads, and where to put USEs
to determine if we may generate output reloads, and where to put USEs
for pseudos that we have to replace with stack slots. */
for pseudos that we have to replace with stack slots.
ADDRESS_RELOADED. If nonzero, is a pointer to where we put the
result of find_reloads_address. */
static
rtx
static
rtx
find_reloads_toplev
(
x
,
opnum
,
type
,
ind_levels
,
is_set_dest
,
insn
)
find_reloads_toplev
(
x
,
opnum
,
type
,
ind_levels
,
is_set_dest
,
insn
,
address_reloaded
)
rtx
x
;
rtx
x
;
int
opnum
;
int
opnum
;
enum
reload_type
type
;
enum
reload_type
type
;
int
ind_levels
;
int
ind_levels
;
int
is_set_dest
;
int
is_set_dest
;
rtx
insn
;
rtx
insn
;
int
*
address_reloaded
;
{
{
register
RTX_CODE
code
=
GET_CODE
(
x
);
register
RTX_CODE
code
=
GET_CODE
(
x
);
...
@@ -4211,8 +4220,10 @@ find_reloads_toplev (x, opnum, type, ind_levels, is_set_dest, insn)
...
@@ -4211,8 +4220,10 @@ find_reloads_toplev (x, opnum, type, ind_levels, is_set_dest, insn)
if
(
replace_reloads
&&
recog_data
.
operand
[
opnum
]
!=
x
)
if
(
replace_reloads
&&
recog_data
.
operand
[
opnum
]
!=
x
)
emit_insn_before
(
gen_rtx_USE
(
VOIDmode
,
x
),
insn
);
emit_insn_before
(
gen_rtx_USE
(
VOIDmode
,
x
),
insn
);
x
=
mem
;
x
=
mem
;
find_reloads_address
(
GET_MODE
(
x
),
&
x
,
XEXP
(
x
,
0
),
&
XEXP
(
x
,
0
),
i
=
find_reloads_address
(
GET_MODE
(
x
),
&
x
,
XEXP
(
x
,
0
),
&
XEXP
(
x
,
0
),
opnum
,
type
,
ind_levels
,
insn
);
opnum
,
type
,
ind_levels
,
insn
);
if
(
address_reloaded
)
*
address_reloaded
=
i
;
}
}
}
}
return
x
;
return
x
;
...
@@ -4220,8 +4231,12 @@ find_reloads_toplev (x, opnum, type, ind_levels, is_set_dest, insn)
...
@@ -4220,8 +4231,12 @@ find_reloads_toplev (x, opnum, type, ind_levels, is_set_dest, insn)
if
(
code
==
MEM
)
if
(
code
==
MEM
)
{
{
rtx
tem
=
x
;
rtx
tem
=
x
;
find_reloads_address
(
GET_MODE
(
x
),
&
tem
,
XEXP
(
x
,
0
),
&
XEXP
(
x
,
0
),
opnum
,
type
,
ind_levels
,
insn
);
i
=
find_reloads_address
(
GET_MODE
(
x
),
&
tem
,
XEXP
(
x
,
0
),
&
XEXP
(
x
,
0
),
opnum
,
type
,
ind_levels
,
insn
);
if
(
address_reloaded
)
*
address_reloaded
=
i
;
return
tem
;
return
tem
;
}
}
...
@@ -4326,7 +4341,8 @@ find_reloads_toplev (x, opnum, type, ind_levels, is_set_dest, insn)
...
@@ -4326,7 +4341,8 @@ find_reloads_toplev (x, opnum, type, ind_levels, is_set_dest, insn)
if
(
fmt
[
i
]
==
'e'
)
if
(
fmt
[
i
]
==
'e'
)
{
{
rtx
new_part
=
find_reloads_toplev
(
XEXP
(
x
,
i
),
opnum
,
type
,
rtx
new_part
=
find_reloads_toplev
(
XEXP
(
x
,
i
),
opnum
,
type
,
ind_levels
,
is_set_dest
,
insn
);
ind_levels
,
is_set_dest
,
insn
,
address_reloaded
);
/* If we have replaced a reg with it's equivalent memory loc -
/* If we have replaced a reg with it's equivalent memory loc -
that can still be handled here e.g. if it's in a paradoxical
that can still be handled here e.g. if it's in a paradoxical
subreg - we must make the change in a copy, rather than using
subreg - we must make the change in a copy, rather than using
...
...
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