projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
clarify some node comments
[libfirm]
/
ir
/
opt
/
jumpthreading.c
diff --git
a/ir/opt/jumpthreading.c
b/ir/opt/jumpthreading.c
index
e8a245d
..
3a18401
100644
(file)
--- a/
ir/opt/jumpthreading.c
+++ b/
ir/opt/jumpthreading.c
@@
-22,7
+22,6
@@
* @brief Path-Sensitive Jump Threading
* @date 10. Sep. 2006
* @author Christoph Mallon, Matthias Braun
* @brief Path-Sensitive Jump Threading
* @date 10. Sep. 2006
* @author Christoph Mallon, Matthias Braun
- * @version $Id$
*/
#include "config.h"
*/
#include "config.h"
@@
-295,7
+294,7
@@
static void copy_and_fix(const jumpthreading_env_t *env, ir_node *block,
}
/* ignore control flow */
mode = get_irn_mode(node);
}
/* ignore control flow */
mode = get_irn_mode(node);
- if (mode == mode_X || is_Cond(node))
+ if (mode == mode_X || is_Cond(node)
|| is_Switch(node)
)
continue;
#ifdef AVOID_PHIB
/* we may not copy mode_b nodes, because this could produce Phi with
continue;
#ifdef AVOID_PHIB
/* we may not copy mode_b nodes, because this could produce Phi with
@@
-348,7
+347,7
@@
static void copy_and_fix(const jumpthreading_env_t *env, ir_node *block,
ir_mode *mode;
mode = get_irn_mode(node);
ir_mode *mode;
mode = get_irn_mode(node);
- if (mode == mode_X || is_Cond(node))
+ if (mode == mode_X || is_Cond(node)
|| is_Switch(node)
)
continue;
#ifdef AVOID_PHIB
if (mode == mode_b)
continue;
#ifdef AVOID_PHIB
if (mode == mode_b)
@@
-655,15
+654,12
@@
static void thread_jumps(ir_node* block, void* data)
assert(get_irn_mode(projx) == mode_X);
cond = get_Proj_pred(projx);
assert(get_irn_mode(projx) == mode_X);
cond = get_Proj_pred(projx);
- if (!is_Cond(cond))
- return;
-
- selector = get_Cond_selector(cond);
/* TODO handle switch Conds */
/* TODO handle switch Conds */
- if (
get_irn_mode(selector) != mode_b
)
+ if (
!is_Cond(cond)
)
return;
/* handle cases that can be immediately evaluated */
return;
/* handle cases that can be immediately evaluated */
+ selector = get_Cond_selector(cond);
selector_evaluated = -1;
if (is_Cmp(selector)) {
ir_node *left = get_Cmp_left(selector);
selector_evaluated = -1;
if (is_Cmp(selector)) {
ir_node *left = get_Cmp_left(selector);