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
e85ddd99
Commit
e85ddd99
authored
May 24, 1992
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
From-SVN: r1075
parent
f780d21b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
21 deletions
+22
-21
gcc/reload1.c
+22
-21
No files found.
gcc/reload1.c
View file @
e85ddd99
...
...
@@ -1048,6 +1048,7 @@ reload (first, global, dumpfile)
for
(
i
=
0
;
i
<
n_reloads
;
i
++
)
{
register
enum
reg_class
*
p
;
enum
reg_class
class
=
reload_reg_class
[
i
];
int
size
;
enum
machine_mode
mode
;
int
*
this_groups
;
...
...
@@ -1064,6 +1065,16 @@ reload (first, global, dumpfile)
&&
!
reload_secondary_p
[
i
]))
continue
;
/* Show that a reload register of this class is needed
in this basic block. We do not use insn_needs and
insn_groups because they are overly conservative for
this purpose. */
if
(
global
&&
!
basic_block_needs
[(
int
)
class
][
this_block
])
{
basic_block_needs
[(
int
)
class
][
this_block
]
=
1
;
new_basic_block_needs
=
1
;
}
/* Decide which time-of-use to count this reload for. */
switch
(
reload_when_needed
[
i
])
{
...
...
@@ -1097,15 +1108,15 @@ reload (first, global, dumpfile)
mode
=
reload_inmode
[
i
];
if
(
GET_MODE_SIZE
(
reload_outmode
[
i
])
>
GET_MODE_SIZE
(
mode
))
mode
=
reload_outmode
[
i
];
size
=
CLASS_MAX_NREGS
(
reload_reg_class
[
i
]
,
mode
);
size
=
CLASS_MAX_NREGS
(
class
,
mode
);
if
(
size
>
1
)
{
enum
machine_mode
other_mode
,
allocate_mode
;
/* Count number of groups needed separately from
number of individual regs needed. */
this_groups
[(
int
)
reload_reg_class
[
i
]
]
++
;
p
=
reg_class_superclasses
[(
int
)
reload_reg_class
[
i
]
];
this_groups
[(
int
)
class
]
++
;
p
=
reg_class_superclasses
[(
int
)
class
];
while
(
*
p
!=
LIM_REG_CLASSES
)
this_groups
[(
int
)
*
p
++
]
++
;
(
*
this_total_groups
)
++
;
...
...
@@ -1113,18 +1124,18 @@ reload (first, global, dumpfile)
/* Record size and mode of a group of this class. */
/* If more than one size group is needed,
make all groups the largest needed size. */
if
(
group_size
[(
int
)
reload_reg_class
[
i
]
]
<
size
)
if
(
group_size
[(
int
)
class
]
<
size
)
{
other_mode
=
group_mode
[(
int
)
reload_reg_class
[
i
]
];
other_mode
=
group_mode
[(
int
)
class
];
allocate_mode
=
mode
;
group_size
[(
int
)
reload_reg_class
[
i
]
]
=
size
;
group_mode
[(
int
)
reload_reg_class
[
i
]
]
=
mode
;
group_size
[(
int
)
class
]
=
size
;
group_mode
[(
int
)
class
]
=
mode
;
}
else
{
other_mode
=
mode
;
allocate_mode
=
group_mode
[(
int
)
reload_reg_class
[
i
]
];
allocate_mode
=
group_mode
[(
int
)
class
];
}
/* Crash if two dissimilar machine modes both need
...
...
@@ -1134,13 +1145,13 @@ reload (first, global, dumpfile)
&&
other_mode
!=
allocate_mode
&&
!
modes_equiv_for_class_p
(
allocate_mode
,
other_mode
,
reload_reg_class
[
i
]
))
class
))
abort
();
}
else
if
(
size
==
1
)
{
this_needs
[(
int
)
reload_reg_class
[
i
]
]
+=
1
;
p
=
reg_class_superclasses
[(
int
)
reload_reg_class
[
i
]
];
this_needs
[(
int
)
class
]
+=
1
;
p
=
reg_class_superclasses
[(
int
)
class
];
while
(
*
p
!=
LIM_REG_CLASSES
)
this_needs
[(
int
)
*
p
++
]
+=
1
;
}
...
...
@@ -1211,16 +1222,6 @@ reload (first, global, dumpfile)
insn_total_groups
=
MAX
(
insn_total_groups
,
1
);
}
/* Update the basic block needs. */
for
(
i
=
0
;
i
<
N_REG_CLASSES
;
i
++
)
if
(
global
&&
(
insn_needs
[
i
]
||
insn_groups
[
i
])
&&
!
basic_block_needs
[
i
][
this_block
])
{
new_basic_block_needs
=
1
;
basic_block_needs
[
i
][
this_block
]
=
1
;
}
#ifdef SMALL_REGISTER_CLASSES
/* If this insn stores the value of a function call,
and that value is in a register that has been spilled,
...
...
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