projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Renamed is_Div_remainderless to get_Div_no_remainder
[libfirm]
/
ir
/
opt
/
opt_blocks.c
diff --git
a/ir/opt/opt_blocks.c
b/ir/opt/opt_blocks.c
index
4ad1b95
..
78ff88d
100644
(file)
--- a/
ir/opt/opt_blocks.c
+++ b/
ir/opt/opt_blocks.c
@@
-23,8
+23,7
@@
* @author Michael Beck
* @version $Id$
*
* @author Michael Beck
* @version $Id$
*
- * This phase find congruent blocks. Works currently for
- * predecessors of the end block only.
+ * This phase find congruent blocks.
* Two block are congruent, if they contains only equal calculations.
*/
#include "config.h"
* Two block are congruent, if they contains only equal calculations.
*/
#include "config.h"
@@
-40,7
+39,8
@@
#include "set.h"
#include "debug.h"
#include "set.h"
#include "debug.h"
-/* define this for gneral block shaping */
+/* define this for general block shaping: congruent blocks
+ are found not only before the end block but anywhere in the graph */
#define GENERAL_SHAPE
typedef struct partition_t partition_t;
#define GENERAL_SHAPE
typedef struct partition_t partition_t;
@@
-409,8
+409,14
@@
static opcode_key_t *opcode(const node_t *node, environment_t *env) {
case iro_Conv:
key.u.intVal = get_Conv_strict(irn);
break;
case iro_Conv:
key.u.intVal = get_Conv_strict(irn);
break;
+ case iro_Load:
+ key.mode = get_Load_mode(irn);
+ break;
case iro_Div:
case iro_Div:
- key.u.intVal = is_Div_remainderless(irn);
+ key.u.intVal = get_Div_no_remainder(irn);
+ break;
+ case iro_Builtin:
+ key.u.intVal = get_Builtin_kind(irn);
break;
default:
break;
break;
default:
break;
@@
-544,7
+550,7
@@
void propagate_blocks(partition_t *part, environment_t *env) {
DB((dbg, LEVEL_3, " propagate Input %+F\n", node->node));
}
DB((dbg, LEVEL_3, " propagate Input %+F\n", node->node));
}
- /* Add bl to map[opcode(
bl
)]. */
+ /* Add bl to map[opcode(
n
)]. */
id = opcode(node, env);
entry = listmap_find(&map, id);
bl->next = entry->list;
id = opcode(node, env);
entry = listmap_find(&map, id);
bl->next = entry->list;
@@
-1134,7
+1140,7
@@
static void add_roots(ir_graph *irg, environment_t *env) {
}
/*
* Now sort the roots to normalize them as good as possible.
}
/*
* Now sort the roots to normalize them as good as possible.
- * Else, we will split identical blocks if we start which different roots
+ * Else, we will split identical blocks if we start which different roots
.
*/
for (bl = env->all_blocks; bl != NULL; bl = bl->all_next) {
int i, n = ARR_LEN(bl->roots);
*/
for (bl = env->all_blocks; bl != NULL; bl = bl->all_next) {
int i, n = ARR_LEN(bl->roots);