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
700c4980
Commit
700c4980
authored
Nov 20, 2010
by
Jan Hubicka
Committed by
Jan Hubicka
Nov 20, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* stmt.c (lshift_cheap_p): Support properly optimize_insn_for_speed_p.
From-SVN: r166983
parent
1f980c25
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
7 deletions
+13
-7
gcc/ChangeLog
+4
-0
gcc/stmt.c
+9
-7
No files found.
gcc/ChangeLog
View file @
700c4980
2010
-
11
-
20
Jan
Hubicka
<
jh
@suse
.
cz
>
*
stmt
.
c
(
lshift_cheap_p
)
:
Support
properly
optimize_insn_for_speed_p
.
2010
-
11
-
20
Ralf
Wildenhues
<
Ralf
.
Wildenhues
@gmx
.
de
>
PR
other
/
46202
gcc/stmt.c
View file @
700c4980
...
...
@@ -2122,19 +2122,21 @@ struct case_bit_test
static
bool
lshift_cheap_p
(
void
)
{
static
bool
init
=
false
;
static
bool
cheap
=
true
;
static
bool
init
[
2
]
=
{
false
,
false
}
;
static
bool
cheap
[
2
]
=
{
true
,
true
}
;
if
(
!
init
)
bool
speed_p
=
optimize_insn_for_speed_p
();
if
(
!
init
[
speed_p
])
{
rtx
reg
=
gen_rtx_REG
(
word_mode
,
10000
);
int
cost
=
rtx_cost
(
gen_rtx_ASHIFT
(
word_mode
,
const1_rtx
,
reg
),
SET
,
optimize_insn_for_speed_p
()
);
cheap
=
cost
<
COSTS_N_INSNS
(
3
);
init
=
true
;
speed_p
);
cheap
[
speed_p
]
=
cost
<
COSTS_N_INSNS
(
3
);
init
[
speed_p
]
=
true
;
}
return
cheap
;
return
cheap
[
speed_p
]
;
}
/* Comparison function for qsort to order bit tests by decreasing
...
...
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