Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
7f6c5599
Commit
7f6c5599
authored
Feb 28, 2011
by
Matthias Braun
Browse files
perform gigo first so no optimization sees bad inputs with wrong mode
parent
ac14907e
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/ir/iropt.c
View file @
7f6c5599
...
...
@@ -6349,6 +6349,17 @@ ir_node *optimize_node(ir_node *n)
/* Always optimize Phi nodes: part of the construction. */
if
((
!
get_opt_optimize
())
&&
(
iro
!=
iro_Phi
))
return
n
;
/* Remove nodes with dead (Bad) input.
Run always for transformation induced Bads. */
n
=
gigo
(
n
);
if
(
n
!=
oldn
)
{
edges_node_deleted
(
oldn
,
irg
);
/* We found an existing, better node, so we can deallocate the old node. */
irg_kill_node
(
irg
,
oldn
);
return
n
;
}
/* constant expression evaluation / constant folding */
if
(
get_opt_constant_folding
())
{
/* neither constants nor Tuple values can be evaluated */
...
...
@@ -6419,10 +6430,6 @@ ir_node *optimize_node(ir_node *n)
(
iro
==
iro_Proj
))
/* Flags tested local. */
n
=
transform_node
(
n
);
/* Remove nodes with dead (Bad) input.
Run always for transformation induced Bads. */
n
=
gigo
(
n
);
/* Now we have a legal, useful node. Enter it in hash table for CSE */
if
(
get_opt_cse
()
&&
(
get_irn_opcode
(
n
)
!=
iro_Block
))
{
ir_node
*
o
=
n
;
...
...
Write
Preview
Supports
Markdown
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