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
61b5f210
Commit
61b5f210
authored
Sep 05, 2004
by
Andreas Jaeger
Committed by
Andreas Jaeger
Sep 05, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* tree-if-conv.c: Spell check comments and clean up whitespace.
From-SVN: r87101
parent
8b11a64c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
13 deletions
+16
-13
gcc/ChangeLog
+4
-0
gcc/tree-if-conv.c
+12
-13
No files found.
gcc/ChangeLog
View file @
61b5f210
2004
-
09
-
05
Andreas
Jaeger
<
aj
@
suse
.
de
>
*
tree
-
if
-
conv
.
c
:
Spell
check
comments
and
clean
up
whitespace
.
2004
-
09
-
05
Zdenek
Dvorak
<
rakdver
@
atrey
.
karlin
.
mff
.
cuni
.
cz
>
*
tree
-
ssa
-
loop
-
ivopts
.
c
:
New
file
.
...
...
gcc/tree-if-conv.c
View file @
61b5f210
...
...
@@ -27,7 +27,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
o Decide if a loop is if-convertable or not.
o Walk all loop basic blocks in breadth first order (BFS order).
o Remove conditional statements (at the end of basic block)
and prop
ogate condition into destination basic blco
ks'
and prop
agate condition into destination basic bloc
ks'
predicate list.
o Replace modify expression with conditional modify expression
using current basic block's condition.
...
...
@@ -136,7 +136,7 @@ static basic_block *ifc_bbs;
false. If false is returned then loop remains unchanged.
FOR_VECTORIZER is a boolean flag. It indicates whether if-conversion is used
for vectorizer or not. If it is used for vectorizer, additional checks are
used. (Vectorization checks are not yet imlemented). */
used. (Vectorization checks are not yet im
p
lemented). */
bool
tree_if_conversion
(
struct
loop
*
loop
,
bool
for_vectorizer
)
...
...
@@ -175,7 +175,7 @@ tree_if_conversion (struct loop *loop, bool for_vectorizer)
cond
=
bb
->
aux
;
/* Process all statements in this basic block.
Remove conditional expresion, if any, and annotate
Remove conditional expres
s
ion, if any, and annotate
destination basic block(s) appropriately. */
for
(
itr
=
bsi_start
(
bb
);
!
bsi_end_p
(
itr
);
/* empty */
)
{
...
...
@@ -265,7 +265,7 @@ tree_if_convert_stmt (struct loop * loop, tree t, tree cond,
/* STMT is COND_EXPR. Update two destination's predicate list.
Remove COND_EXPR, if it is not the loop exit condition. Otherwise
update loop exit condition appropriatly. BSI is the iterator
update loop exit condition appropriat
e
ly. BSI is the iterator
used to traverse statement list. STMT is part of loop LOOP. */
static
void
...
...
@@ -307,7 +307,7 @@ tree_if_convert_cond_expr (struct loop *loop, tree stmt, tree cond,
add_to_dst_predicate_list
(
loop
,
else_clause
,
cond
,
c2
,
bsi
);
}
/* Now this conditional statement is redund
e
nt. Remove it.
/* Now this conditional statement is redund
a
nt. Remove it.
But, do not remove exit condition! Update exit condition
using new condition. */
if
(
!
bb_with_exit_edge_p
(
bb_for_stmt
(
stmt
)))
...
...
@@ -424,7 +424,7 @@ if_convertable_modify_expr_p (struct loop *loop, basic_block bb, tree m_expr)
/* Return true, iff STMT is if-convertable.
Statement is if-convertable if,
- It is if-conver
a
table MODIFY_EXPR
- It is if-convertable MODIFY_EXPR
- IT is LABEL_EXPR, GOTO_EXPR or COND_EXPR.
STMT is inside block BB, which is inside loop LOOP. */
...
...
@@ -462,7 +462,7 @@ if_convertable_stmt_p (struct loop *loop, basic_block bb, tree stmt)
/* Return true, iff BB is if-convertable.
Note: This routine does _not_ check basic block statements and phis.
Basic block is not if-conver
a
table if,
Basic block is not if-convertable if,
- Basic block is non-empty and it is after exit block (in BFS order).
- Basic block is after exit block but before latch.
- Basic block edge(s) is not normal.
...
...
@@ -493,7 +493,7 @@ if_convertable_bb_p (struct loop *loop, basic_block bb, bool exit_bb_seen)
}
}
/* Be less adveturous and handle only normal edges. */
/* Be less adve
n
turous and handle only normal edges. */
for
(
e
=
bb
->
succ
;
e
;
e
=
e
->
succ_next
)
if
(
e
->
flags
&
(
EDGE_ABNORMAL_CALL
|
EDGE_EH
|
EDGE_ABNORMAL
|
EDGE_IRREDUCIBLE_LOOP
))
...
...
@@ -541,7 +541,7 @@ if_convertable_loop_p (struct loop *loop, bool for_vectorizer ATTRIBUTE_UNUSED)
if
(
loop
->
num_nodes
<=
2
)
{
if
(
dump_file
&&
(
dump_flags
&
TDF_DETAILS
))
fprintf
(
dump_file
,
"less than
t
2 basic blocks
\n
"
);
fprintf
(
dump_file
,
"less than 2 basic blocks
\n
"
);
return
false
;
}
...
...
@@ -708,7 +708,7 @@ find_phi_replacement_condition (basic_block bb, tree *cond,
switch_args
=
false
;
}
/* Create temp. for the condition. Vectoriz
ier prefers to have gimple
/* Create temp. for the condition. Vectoriz
er prefers to have gimple
value as condition. Various targets use different means to communicate
condition in vector compare operation. Using gimple value allows compiler
to emit vector compare and select RTL without exposing compare's result. */
...
...
@@ -778,12 +778,12 @@ replace_phi_with_cond_modify_expr (tree phi, tree cond, bool switch_args,
arg_1
=
PHI_ARG_DEF
(
phi
,
1
);
}
/* Build new RHS using selected condtion and arguments. */
/* Build new RHS using selected cond
i
tion and arguments. */
rhs
=
build
(
COND_EXPR
,
TREE_TYPE
(
PHI_RESULT
(
phi
)),
unshare_expr
(
cond
),
unshare_expr
(
arg_0
),
unshare_expr
(
arg_1
));
/* Create new MODIFY express
t
ion using RHS. */
/* Create new MODIFY expression using RHS. */
new_stmt
=
build
(
MODIFY_EXPR
,
TREE_TYPE
(
PHI_RESULT
(
phi
)),
unshare_expr
(
PHI_RESULT
(
phi
)),
rhs
);
...
...
@@ -1099,4 +1099,3 @@ struct tree_opt_pass pass_if_conversion =
|
TODO_verify_stmts
|
TODO_verify_flow
/* todo_flags_finish */
};
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