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
1f01879e
Commit
1f01879e
authored
Dec 17, 1999
by
Jan Hubicka
Committed by
Jan Hubicka
Dec 17, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* regclass.c (regclass): Do not use flowgraph when not optimizing.
From-SVN: r30993
parent
833fc3ad
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
19 deletions
+26
-19
gcc/ChangeLog
+2
-0
gcc/regclass.c
+24
-19
No files found.
gcc/ChangeLog
View file @
1f01879e
Fri
Dec
17
12
:
08
:
11
MET
1999
Jan
Hubicka
<
hubicka
@freesoftr
.
cz
>
Fri
Dec
17
12
:
08
:
11
MET
1999
Jan
Hubicka
<
hubicka
@freesoftr
.
cz
>
*
regclass
.
c
(
regclass
)
:
Do
not
use
flowgraph
when
not
optimizing
.
*
gcse
.
c
(
try_replace_reg
)
:
Do
replacements
in
REG_EQUAL
/
REG_EQUIV
*
gcse
.
c
(
try_replace_reg
)
:
Do
replacements
in
REG_EQUAL
/
REG_EQUIV
notes
too
,
create
one
when
replacement
failed
,
attempt
to
simplify
notes
too
,
create
one
when
replacement
failed
,
attempt
to
simplify
resulting
notes
.
resulting
notes
.
...
...
gcc/regclass.c
View file @
1f01879e
...
@@ -1070,30 +1070,35 @@ regclass (f, nregs, dump)
...
@@ -1070,30 +1070,35 @@ regclass (f, nregs, dump)
bzero
(
in_inc_dec
,
nregs
);
bzero
(
in_inc_dec
,
nregs
);
#endif
#endif
loop_cost
=
1
;
/* Scan the instructions and record each time it would
/* Scan the instructions and record each time it would
save code to put a certain register in a certain class. */
save code to put a certain register in a certain class. */
for
(
index
=
0
;
index
<
n_basic_blocks
;
index
++
)
if
(
!
optimize
)
{
{
basic_block
bb
=
BASIC_BLOCK
(
index
);
loop_cost
=
1
;
for
(
insn
=
f
;
insn
;
insn
=
NEXT_INSN
(
insn
))
/* Show that an insn inside a loop is likely to be executed three
insn
=
scan_one_insn
(
insn
,
pass
);
times more than insns outside a loop. This is much more aggressive
than the assumptions made elsewhere and is being tried as an
experiment. */
if
(
optimize_size
)
loop_cost
=
1
;
else
loop_cost
=
1
<<
(
2
*
MIN
(
bb
->
loop_depth
-
1
,
5
));
for
(
insn
=
bb
->
head
;
;
insn
=
NEXT_INSN
(
insn
))
{
insn
=
scan_one_insn
(
insn
,
pass
);
if
(
insn
==
bb
->
end
)
break
;
}
}
}
else
for
(
index
=
0
;
index
<
n_basic_blocks
;
index
++
)
{
basic_block
bb
=
BASIC_BLOCK
(
index
);
/* Show that an insn inside a loop is likely to be executed three
times more than insns outside a loop. This is much more aggressive
than the assumptions made elsewhere and is being tried as an
experiment. */
if
(
optimize_size
)
loop_cost
=
1
;
else
loop_cost
=
1
<<
(
2
*
MIN
(
bb
->
loop_depth
-
1
,
5
));
for
(
insn
=
bb
->
head
;
;
insn
=
NEXT_INSN
(
insn
))
{
insn
=
scan_one_insn
(
insn
,
pass
);
if
(
insn
==
bb
->
end
)
break
;
}
}
/* Now for each register look at how desirable each class is
/* Now for each register look at how desirable each class is
and find which class is preferred. Store that in
and find which class is preferred. Store that in
...
...
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