Commit 4fd88f77 authored by Matthias Braun's avatar Matthias Braun
Browse files

Remove the cse_neutral opcode flag

There is no node left that uses it.
parent 0fbbd3a1
...@@ -427,11 +427,6 @@ FIRM_API int is_irn_keep(const ir_node *node); ...@@ -427,11 +427,6 @@ FIRM_API int is_irn_keep(const ir_node *node);
*/ */
FIRM_API int is_irn_start_block_placed(const ir_node *node); FIRM_API int is_irn_start_block_placed(const ir_node *node);
/**
* Returns non-zero for nodes that are CSE neutral to its users.
*/
FIRM_API int is_irn_cse_neutral(const ir_node *node);
/** Returns the string representation of the jump prediction. */ /** Returns the string representation of the jump prediction. */
FIRM_API const char *get_cond_jmp_predicate_name(cond_jmp_predicate pred); FIRM_API const char *get_cond_jmp_predicate_name(cond_jmp_predicate pred);
......
...@@ -53,7 +53,6 @@ typedef enum { ...@@ -53,7 +53,6 @@ typedef enum {
irop_flag_start_block = 1U << 7, /**< This operation is always placed in the Start block. */ irop_flag_start_block = 1U << 7, /**< This operation is always placed in the Start block. */
irop_flag_uses_memory = 1U << 8, /**< This operation has a memory input and may change the memory state. */ irop_flag_uses_memory = 1U << 8, /**< This operation has a memory input and may change the memory state. */
irop_flag_dump_noblock = 1U << 9, /**< node should be dumped outside any blocks */ irop_flag_dump_noblock = 1U << 9, /**< node should be dumped outside any blocks */
irop_flag_cse_neutral = 1U << 10, /**< This operation is CSE neutral to its users. */
/** This operation jumps to an unknown destination. The CFG is a /** This operation jumps to an unknown destination. The CFG is a
* conservative aproximation in this case. You cannot change the destination * conservative aproximation in this case. You cannot change the destination
* of an unknown_jump */ * of an unknown_jump */
......
...@@ -881,11 +881,6 @@ int (is_irn_start_block_placed)(const ir_node *node) ...@@ -881,11 +881,6 @@ int (is_irn_start_block_placed)(const ir_node *node)
return is_irn_start_block_placed_(node); return is_irn_start_block_placed_(node);
} }
int (is_irn_cse_neutral)(const ir_node *node)
{
return is_irn_cse_neutral_(node);
}
const char *get_cond_jmp_predicate_name(cond_jmp_predicate pred) const char *get_cond_jmp_predicate_name(cond_jmp_predicate pred)
{ {
#define X(a) case a: return #a #define X(a) case a: return #a
......
...@@ -54,7 +54,6 @@ ...@@ -54,7 +54,6 @@
#define is_irn_constlike(node) is_irn_constlike_(node) #define is_irn_constlike(node) is_irn_constlike_(node)
#define is_irn_keep(node) is_irn_keep_(node) #define is_irn_keep(node) is_irn_keep_(node)
#define is_irn_start_block_placed(node) is_irn_start_block_placed_(node) #define is_irn_start_block_placed(node) is_irn_start_block_placed_(node)
#define is_irn_cse_neutral(node) is_irn_cse_neutral_(node)
#define get_irn_generic_attr(node) get_irn_generic_attr_(node) #define get_irn_generic_attr(node) get_irn_generic_attr_(node)
#define get_irn_generic_attr_const(node) get_irn_generic_attr_const_(node) #define get_irn_generic_attr_const(node) get_irn_generic_attr_const_(node)
#define get_irn_idx(node) get_irn_idx_(node) #define get_irn_idx(node) get_irn_idx_(node)
...@@ -385,11 +384,6 @@ static inline int is_irn_start_block_placed_(const ir_node *node) ...@@ -385,11 +384,6 @@ static inline int is_irn_start_block_placed_(const ir_node *node)
return is_op_start_block_placed(get_irn_op_(node)); return is_op_start_block_placed(get_irn_op_(node));
} }
static inline int is_irn_cse_neutral_(const ir_node *node)
{
return is_op_cse_neutral(get_irn_op_(node));
}
static inline void *get_irn_generic_attr_(ir_node *node) static inline void *get_irn_generic_attr_(ir_node *node)
{ {
return &node->attr; return &node->attr;
......
...@@ -211,10 +211,7 @@ static unsigned default_hash_node(const ir_node *node) ...@@ -211,10 +211,7 @@ static unsigned default_hash_node(const ir_node *node)
/* consider all in nodes... except the block if not a control flow. */ /* consider all in nodes... except the block if not a control flow. */
for (int i = is_cfop(node) ? -1 : 0; i < arity; ++i) { for (int i = is_cfop(node) ? -1 : 0; i < arity; ++i) {
ir_node *pred = get_irn_n(node, i); ir_node *pred = get_irn_n(node, i);
if (is_irn_cse_neutral(pred)) hash = 9*hash + hash_ptr(pred);
hash *= 9;
else
hash = 9*hash + hash_ptr(pred);
} }
/* ...mode,... */ /* ...mode,... */
......
...@@ -99,12 +99,6 @@ static inline bool is_op_start_block_placed(const ir_op *op) ...@@ -99,12 +99,6 @@ static inline bool is_op_start_block_placed(const ir_op *op)
return op->flags & irop_flag_start_block; return op->flags & irop_flag_start_block;
} }
/** Returns non-zero if operation is CSE neutral */
static inline bool is_op_cse_neutral(const ir_op *op)
{
return op->flags & irop_flag_cse_neutral;
}
static inline unsigned get_op_code_(const ir_op *op) static inline unsigned get_op_code_(const ir_op *op)
{ {
return op->code; return op->code;
......
...@@ -7750,11 +7750,8 @@ int identities_cmp(const void *elt, const void *key) ...@@ -7750,11 +7750,8 @@ int identities_cmp(const void *elt, const void *key)
for (int i = 0; i < irn_arity_a; ++i) { for (int i = 0; i < irn_arity_a; ++i) {
ir_node *pred_a = get_irn_n(a, i); ir_node *pred_a = get_irn_n(a, i);
ir_node *pred_b = get_irn_n(b, i); ir_node *pred_b = get_irn_n(b, i);
if (pred_a != pred_b) { if (pred_a != pred_b)
/* if both predecessors are CSE neutral they might be different */ return 1;
if (!is_irn_cse_neutral(pred_a) || !is_irn_cse_neutral(pred_b))
return 1;
}
} }
/* here, we already know that the nodes are identical except their /* here, we already know that the nodes are identical except their
......
...@@ -271,10 +271,8 @@ static int compare_gvn_identities(const void *elt, const void *key) ...@@ -271,10 +271,8 @@ static int compare_gvn_identities(const void *elt, const void *key)
for (i = 0; i < irn_arity_a; ++i) { for (i = 0; i < irn_arity_a; ++i) {
ir_node *pred_a = get_irn_n(a, i); ir_node *pred_a = get_irn_n(a, i);
ir_node *pred_b = get_irn_n(b, i); ir_node *pred_b = get_irn_n(b, i);
if (pred_a != pred_b) { if (pred_a != pred_b)
if (!is_irn_cse_neutral(pred_a) || !is_irn_cse_neutral(pred_b)) return 1;
return 1;
}
} }
/* here, we already now that the nodes are identical except their /* here, we already now that the nodes are identical except their
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment