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
4fd88f77
Commit
4fd88f77
authored
Jul 22, 2015
by
Matthias Braun
Browse files
Remove the cse_neutral opcode flag
There is no node left that uses it.
parent
0fbbd3a1
Changes
8
Show whitespace changes
Inline
Side-by-side
include/libfirm/irnode.h
View file @
4fd88f77
...
@@ -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
);
...
...
include/libfirm/irop.h
View file @
4fd88f77
...
@@ -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 */
...
...
ir/ir/irnode.c
View file @
4fd88f77
...
@@ -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
...
...
ir/ir/irnode_t.h
View file @
4fd88f77
...
@@ -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
;
...
...
ir/ir/irop.c
View file @
4fd88f77
...
@@ -211,9 +211,6 @@ static unsigned default_hash_node(const ir_node *node)
...
@@ -211,9 +211,6 @@ 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
;
else
hash
=
9
*
hash
+
hash_ptr
(
pred
);
hash
=
9
*
hash
+
hash_ptr
(
pred
);
}
}
...
...
ir/ir/irop_t.h
View file @
4fd88f77
...
@@ -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
;
...
...
ir/ir/iropt.c
View file @
4fd88f77
...
@@ -7750,12 +7750,9 @@ int identities_cmp(const void *elt, const void *key)
...
@@ -7750,12 +7750,9 @@ 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 */
if
(
!
is_irn_cse_neutral
(
pred_a
)
||
!
is_irn_cse_neutral
(
pred_b
))
return
1
;
return
1
;
}
}
}
/* here, we already know that the nodes are identical except their
/* here, we already know that the nodes are identical except their
* attributes */
* attributes */
...
...
ir/opt/gvn_pre.c
View file @
4fd88f77
...
@@ -271,11 +271,9 @@ static int compare_gvn_identities(const void *elt, const void *key)
...
@@ -271,11 +271,9 @@ 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
* attributes */
* attributes */
...
...
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