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
eceef4c9
Commit
eceef4c9
authored
Sep 12, 1999
by
Bernd Schmidt
Committed by
Bernd Schmidt
Sep 12, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use structures not many single arrays in reload
From-SVN: r29361
parent
c2a37c55
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
98 additions
and
25 deletions
+98
-25
gcc/ChangeLog
+23
-0
gcc/reload.c
+0
-0
gcc/reload.h
+75
-25
gcc/reload1.c
+0
-0
No files found.
gcc/ChangeLog
View file @
eceef4c9
Sun
Sep
12
15
:
53
:
20
1999
Bernd
Schmidt
<
bernds
@cygnus
.
co
.
uk
>
*
reload
.
h
(
reload_in
,
reload_out
,
reload_in_reg
,
reload_out_reg
,
reload_reg_class
,
reload_inmode
,
reload_outmode
,
reload_optional
,
reload_nongroup
,
reload_inc
,
reload_opnum
,
reload_secondary_p
,
reload_secondary_in_reload
,
reload_secondary_out_reload
,
reload_secondary_in_icode
,
reload_secondary_out_icode
,
reload_reg_rtx
,
reload_when_needed
)
:
Delete
declarations
.
(
struct
reload
)
:
New
structure
.
(
rld
)
:
Declare
new
array
.
*
reload
.
c
(
reload_in
,
reload_out
,
reload_in_reg
,
reload_out_reg
,
reload_reg_class
,
reload_inmode
,
reload_outmode
,
reload_optional
,
reload_nongroup
,
reload_inc
,
reload_opnum
,
reload_secondary_p
,
reload_secondary_in_reload
,
reload_secondary_out_reload
,
reload_secondary_in_icode
,
reload_secondary_out_icode
,
reload_reg_rtx
,
reload_when_needed
)
:
Delete
definitions
.
(
rld
)
:
New
array
.
(
whole
file
)
:
Replace
uses
of
the
deleted
arrays
with
uses
of
rld
.
*
reload1
.
c
(
whole
file
)
:
Replace
uses
of
the
deleted
arrays
with
uses
of
rld
.
(
choose_reload_regs
)
:
Copy
in
/
out
of
save_reload_reg_rtx
with
explicit
loops
,
not
with
bcopy
.
Sun
Sep
12
05
:
00
:
24
1999
Richard
Henderson
<
rth
@cygnus
.
com
>
Sun
Sep
12
05
:
00
:
24
1999
Richard
Henderson
<
rth
@cygnus
.
com
>
*
recog
.
h
(
insn_template
,
insn_outfun
,
insn_n_operands
,
insn_n_dups
,
*
recog
.
h
(
insn_template
,
insn_outfun
,
insn_n_operands
,
insn_n_dups
,
...
...
gcc/reload.c
View file @
eceef4c9
This diff is collapsed.
Click to expand it.
gcc/reload.h
View file @
eceef4c9
...
@@ -45,33 +45,9 @@ Boston, MA 02111-1307, USA. */
...
@@ -45,33 +45,9 @@ Boston, MA 02111-1307, USA. */
#endif
#endif
extern
int
memory_move_secondary_cost
PROTO
((
enum
machine_mode
,
enum
reg_class
,
int
));
extern
int
memory_move_secondary_cost
PROTO
((
enum
machine_mode
,
enum
reg_class
,
int
));
/* See reload.c and reload1.c for comments on these variables. */
/* Maximum number of reloads we can need. */
/* Maximum number of reloads we can need. */
#define MAX_RELOADS (2 * MAX_RECOG_OPERANDS * (MAX_REGS_PER_ADDRESS + 1))
#define MAX_RELOADS (2 * MAX_RECOG_OPERANDS * (MAX_REGS_PER_ADDRESS + 1))
extern
rtx
reload_in
[
MAX_RELOADS
];
extern
rtx
reload_out
[
MAX_RELOADS
];
extern
rtx
reload_in_reg
[
MAX_RELOADS
];
extern
rtx
reload_out_reg
[
MAX_RELOADS
];
extern
enum
reg_class
reload_reg_class
[
MAX_RELOADS
];
extern
enum
machine_mode
reload_inmode
[
MAX_RELOADS
];
extern
enum
machine_mode
reload_outmode
[
MAX_RELOADS
];
extern
char
reload_optional
[
MAX_RELOADS
];
extern
char
reload_nongroup
[
MAX_RELOADS
];
extern
int
reload_inc
[
MAX_RELOADS
];
extern
int
reload_opnum
[
MAX_RELOADS
];
extern
int
reload_secondary_p
[
MAX_RELOADS
];
extern
int
reload_secondary_in_reload
[
MAX_RELOADS
];
extern
int
reload_secondary_out_reload
[
MAX_RELOADS
];
#ifdef MAX_INSN_CODE
extern
enum
insn_code
reload_secondary_in_icode
[
MAX_RELOADS
];
extern
enum
insn_code
reload_secondary_out_icode
[
MAX_RELOADS
];
#endif
extern
int
n_reloads
;
extern
rtx
reload_reg_rtx
[
MAX_RELOADS
];
/* Encode the usage of a reload. The following codes are supported:
/* Encode the usage of a reload. The following codes are supported:
RELOAD_FOR_INPUT reload of an input operand
RELOAD_FOR_INPUT reload of an input operand
...
@@ -105,7 +81,81 @@ enum reload_type
...
@@ -105,7 +81,81 @@ enum reload_type
RELOAD_OTHER
,
RELOAD_FOR_OTHER_ADDRESS
RELOAD_OTHER
,
RELOAD_FOR_OTHER_ADDRESS
};
};
extern
enum
reload_type
reload_when_needed
[
MAX_RELOADS
];
#ifdef MAX_INSN_CODE
/* Each reload is recorded with a structure like this. */
struct
reload
{
/* The value to reload from */
rtx
in
;
/* Where to store reload-reg afterward if nec (often the same as
reload_in) */
rtx
out
;
/* The class of registers to reload into. */
enum
reg_class
class
;
/* The mode this operand should have when reloaded, on input. */
enum
machine_mode
inmode
;
/* The mode this operand should have when reloaded, on output. */
enum
machine_mode
outmode
;
/* Positive amount to increment or decrement by if
reload_in is a PRE_DEC, PRE_INC, POST_DEC, POST_INC.
Ignored otherwise (don't assume it is zero). */
int
inc
;
/* A reg for which reload_in is the equivalent.
If reload_in is a symbol_ref which came from
reg_equiv_constant, then this is the pseudo
which has that symbol_ref as equivalent. */
rtx
in_reg
;
rtx
out_reg
;
/* Used in find_reload_regs to record the allocated register. */
int
regno
;
/* This is the register to reload into. If it is zero when `find_reloads'
returns, you must find a suitable register in the class specified by
reload_reg_class, and store here an rtx for that register with mode from
reload_inmode or reload_outmode. */
rtx
reg_rtx
;
/* The operand number being reloaded. This is used to group related reloads
and need not always be equal to the actual operand number in the insn,
though it current will be; for in-out operands, it is one of the two
operand numbers. */
int
opnum
;
/* Gives the reload number of a secondary input reload, when needed;
otherwise -1. */
int
secondary_in_reload
;
/* Gives the reload number of a secondary output reload, when needed;
otherwise -1. */
int
secondary_out_reload
;
/* If a secondary input reload is required, gives the INSN_CODE that uses the
secondary reload as a scratch register, or CODE_FOR_nothing if the
secondary reload register is to be an intermediate register. */
enum
insn_code
secondary_in_icode
;
/* Likewise, for a secondary output reload. */
enum
insn_code
secondary_out_icode
;
/* Classifies reload as needed either for addressing an input reload,
addressing an output, for addressing a non-reloaded mem ref, or for
unspecified purposes (i.e., more than one of the above). */
enum
reload_type
when_needed
;
/* Nonzero for an optional reload. Optional reloads are ignored unless the
value is already sitting in a register. */
unsigned
int
optional
:
1
;
/* nonzero if this reload shouldn't be combined with another reload. */
unsigned
int
nocombine
:
1
;
/* Nonzero if this is a secondary register for one or more reloads. */
unsigned
int
secondary_p
:
1
;
/* Nonzero if this reload must use a register not already allocated to a
group. */
unsigned
int
nongroup
:
1
;
};
extern
struct
reload
rld
[
MAX_RELOADS
];
extern
int
n_reloads
;
#endif
extern
rtx
*
reg_equiv_constant
;
extern
rtx
*
reg_equiv_constant
;
extern
rtx
*
reg_equiv_memory_loc
;
extern
rtx
*
reg_equiv_memory_loc
;
...
...
gcc/reload1.c
View file @
eceef4c9
This diff is collapsed.
Click to expand it.
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