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
410bd698
Commit
410bd698
authored
Sep 22, 1996
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(combine_givs): Improve combining DEST_REG giv with its only use.
From-SVN: r12769
parent
039f5fb1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
gcc/loop.c
+15
-3
No files found.
gcc/loop.c
View file @
410bd698
/* Perform various loop optimizations, including strength reduction.
/* Perform various loop optimizations, including strength reduction.
Copyright (C) 1987, 88, 89, 91-
4, 1995
Free Software Foundation, Inc.
Copyright (C) 1987, 88, 89, 91-
5, 1996
Free Software Foundation, Inc.
This file is part of GNU CC.
This file is part of GNU CC.
...
@@ -5672,14 +5672,26 @@ combine_givs (bl)
...
@@ -5672,14 +5672,26 @@ combine_givs (bl)
/* g2->new_reg set by `combine_givs_p' */
/* g2->new_reg set by `combine_givs_p' */
g2
->
same
=
g1
;
g2
->
same
=
g1
;
g1
->
combined_with
=
1
;
g1
->
combined_with
=
1
;
g1
->
benefit
+=
g2
->
benefit
;
/* If one of these givs is a DEST_REG that was only used
once, by the other giv, this is actually a single use. */
if
((
g1
->
giv_type
!=
DEST_REG
||
n_times_used
[
REGNO
(
g1
->
dest_reg
)]
!=
1
||
!
reg_mentioned_p
(
g1
->
dest_reg
,
PATTERN
(
g2
->
insn
)))
&&
(
g2
->
giv_type
!=
DEST_REG
||
n_times_used
[
REGNO
(
g2
->
dest_reg
)]
!=
1
||
!
reg_mentioned_p
(
g2
->
dest_reg
,
PATTERN
(
g1
->
insn
))))
{
g1
->
benefit
+=
g2
->
benefit
;
g1
->
times_used
+=
g2
->
times_used
;
}
/* ??? The new final_[bg]iv_value code does a much better job
/* ??? The new final_[bg]iv_value code does a much better job
of finding replaceable giv's, and hence this code may no
of finding replaceable giv's, and hence this code may no
longer be necessary. */
longer be necessary. */
if
(
!
g2
->
replaceable
&&
REG_USERVAR_P
(
g2
->
dest_reg
))
if
(
!
g2
->
replaceable
&&
REG_USERVAR_P
(
g2
->
dest_reg
))
g1
->
benefit
-=
copy_cost
;
g1
->
benefit
-=
copy_cost
;
g1
->
lifetime
+=
g2
->
lifetime
;
g1
->
lifetime
+=
g2
->
lifetime
;
g1
->
times_used
+=
g2
->
times_used
;
if
(
loop_dump_stream
)
if
(
loop_dump_stream
)
fprintf
(
loop_dump_stream
,
"giv at %d combined with giv at %d
\n
"
,
fprintf
(
loop_dump_stream
,
"giv at %d combined with giv at %d
\n
"
,
...
...
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