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
04d23d7c
Commit
04d23d7c
authored
Oct 21, 1996
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(jump_optimize): Use emit_store_flag even if branches are cheap, if
the store is even cheaper. From-SVN: r12982
parent
1cd4bca9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
10 deletions
+17
-10
gcc/jump.c
+17
-10
No files found.
gcc/jump.c
View file @
04d23d7c
/* Optimize jump instructions, for GNU compiler.
/* Optimize jump instructions, for GNU compiler.
Copyright (C) 1987, 88, 89, 91-95, 1996 Free Software Foundation, Inc.
b
Copyright (C) 1987, 88, 89, 91-95, 1996 Free Software Foundation, Inc.
This file is part of GNU CC.
This file is part of GNU CC.
...
@@ -1165,13 +1165,9 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan)
...
@@ -1165,13 +1165,9 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan)
We could handle BLKmode if (1) emit_store_flag could
We could handle BLKmode if (1) emit_store_flag could
and (2) we could find the size reliably. */
and (2) we could find the size reliably. */
&&
GET_MODE
(
XEXP
(
temp4
,
0
))
!=
BLKmode
&&
GET_MODE
(
XEXP
(
temp4
,
0
))
!=
BLKmode
/* No point in doing any of this if branches are cheap or we
/* Even if branches are cheap, the store_flag optimization
don't have conditional moves. */
can win when the operation to be performed can be
&&
(
BRANCH_COST
>=
2
expressed directly. */
#ifdef HAVE_conditional_move
||
1
#endif
)
#ifdef HAVE_cc0
#ifdef HAVE_cc0
/* If the previous insn sets CC0 and something else, we can't
/* If the previous insn sets CC0 and something else, we can't
do this since we are going to delete that insn. */
do this since we are going to delete that insn. */
...
@@ -1282,8 +1278,19 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan)
...
@@ -1282,8 +1278,19 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan)
can reverse the condition. See if (3) applies possibly
can reverse the condition. See if (3) applies possibly
by reversing the condition. Prefer reversing to (4) when
by reversing the condition. Prefer reversing to (4) when
branches are very expensive. */
branches are very expensive. */
&&
((
reversep
=
0
,
temp2
==
const0_rtx
)
&&
(((
BRANCH_COST
>=
2
||
(
temp3
==
const0_rtx
||
STORE_FLAG_VALUE
==
-
1
||
(
STORE_FLAG_VALUE
==
1
/* Check that the mask is a power of two,
so that it can probably be generated
with a shift. */
&&
exact_log2
(
INTVAL
(
temp3
))
>=
0
))
&&
(
reversep
=
0
,
temp2
==
const0_rtx
))
||
((
BRANCH_COST
>=
2
||
STORE_FLAG_VALUE
==
-
1
||
(
STORE_FLAG_VALUE
==
1
&&
exact_log2
(
INTVAL
(
temp2
))
>=
0
))
&&
temp3
==
const0_rtx
&&
(
reversep
=
can_reverse_comparison_p
(
temp4
,
insn
)))
&&
(
reversep
=
can_reverse_comparison_p
(
temp4
,
insn
)))
||
(
BRANCH_COST
>=
2
||
(
BRANCH_COST
>=
2
&&
GET_CODE
(
temp2
)
==
CONST_INT
&&
GET_CODE
(
temp2
)
==
CONST_INT
...
...
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