mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-25 05:35:23 +08:00
tree-cfg.c (is_ctrl_altering_stmt, [...]): Don't use const_get_call_expr_in.
* tree-cfg.c (is_ctrl_altering_stmt, tree_block_ends_with_call_p): Don't use const_get_call_expr_in. * tree-gimple.c (const_get_call_expr_in): Delete. * tree-gimple.h (const_get_call_expr_in): Likewise. From-SVN: r128569
This commit is contained in:
parent
e49e06d8d0
commit
0e01499666
@ -1,3 +1,10 @@
|
|||||||
|
2007-09-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||||
|
|
||||||
|
* tree-cfg.c (is_ctrl_altering_stmt, tree_block_ends_with_call_p):
|
||||||
|
Don't use const_get_call_expr_in.
|
||||||
|
* tree-gimple.c (const_get_call_expr_in): Delete.
|
||||||
|
* tree-gimple.h (const_get_call_expr_in): Likewise.
|
||||||
|
|
||||||
2007-09-18 Richard Sandiford <rsandifo@nildram.co.uk>
|
2007-09-18 Richard Sandiford <rsandifo@nildram.co.uk>
|
||||||
|
|
||||||
* df-scan.c (df_notes_rescan): Do nothing if the instruction does
|
* df-scan.c (df_notes_rescan): Do nothing if the instruction does
|
||||||
|
@ -2459,7 +2459,7 @@ is_ctrl_altering_stmt (const_tree t)
|
|||||||
const_tree call;
|
const_tree call;
|
||||||
|
|
||||||
gcc_assert (t);
|
gcc_assert (t);
|
||||||
call = const_get_call_expr_in (t);
|
call = get_call_expr_in (CONST_CAST_TREE (t));
|
||||||
if (call)
|
if (call)
|
||||||
{
|
{
|
||||||
/* A non-pure/const CALL_EXPR alters flow control if the current
|
/* A non-pure/const CALL_EXPR alters flow control if the current
|
||||||
@ -6244,7 +6244,7 @@ static bool
|
|||||||
tree_block_ends_with_call_p (basic_block bb)
|
tree_block_ends_with_call_p (basic_block bb)
|
||||||
{
|
{
|
||||||
block_stmt_iterator bsi = bsi_last (bb);
|
block_stmt_iterator bsi = bsi_last (bb);
|
||||||
return const_get_call_expr_in (bsi_stmt (bsi)) != NULL;
|
return get_call_expr_in (bsi_stmt (bsi)) != NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -436,28 +436,18 @@ is_gimple_call_addr (tree t)
|
|||||||
/* If T makes a function call, return the corresponding CALL_EXPR operand.
|
/* If T makes a function call, return the corresponding CALL_EXPR operand.
|
||||||
Otherwise, return NULL_TREE. */
|
Otherwise, return NULL_TREE. */
|
||||||
|
|
||||||
#define GET_CALL_EXPR_IN_BODY do { \
|
|
||||||
/* FIXME tuples: delete the assertion below when conversion complete. */ \
|
|
||||||
gcc_assert (TREE_CODE (t) != MODIFY_EXPR); \
|
|
||||||
if (TREE_CODE (t) == GIMPLE_MODIFY_STMT) \
|
|
||||||
t = GIMPLE_STMT_OPERAND (t, 1); \
|
|
||||||
if (TREE_CODE (t) == WITH_SIZE_EXPR) \
|
|
||||||
t = TREE_OPERAND (t, 0); \
|
|
||||||
if (TREE_CODE (t) == CALL_EXPR) \
|
|
||||||
return t; \
|
|
||||||
return NULL_TREE; \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
tree
|
tree
|
||||||
get_call_expr_in (tree t)
|
get_call_expr_in (tree t)
|
||||||
{
|
{
|
||||||
GET_CALL_EXPR_IN_BODY;
|
/* FIXME tuples: delete the assertion below when conversion complete. */
|
||||||
}
|
gcc_assert (TREE_CODE (t) != MODIFY_EXPR);
|
||||||
|
if (TREE_CODE (t) == GIMPLE_MODIFY_STMT)
|
||||||
const_tree
|
t = GIMPLE_STMT_OPERAND (t, 1);
|
||||||
const_get_call_expr_in (const_tree t)
|
if (TREE_CODE (t) == WITH_SIZE_EXPR)
|
||||||
{
|
t = TREE_OPERAND (t, 0);
|
||||||
GET_CALL_EXPR_IN_BODY;
|
if (TREE_CODE (t) == CALL_EXPR)
|
||||||
|
return t;
|
||||||
|
return NULL_TREE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Given a memory reference expression T, return its base address.
|
/* Given a memory reference expression T, return its base address.
|
||||||
|
@ -90,7 +90,6 @@ extern bool is_gimple_non_addressable (tree t);
|
|||||||
extern bool is_gimple_call_addr (tree);
|
extern bool is_gimple_call_addr (tree);
|
||||||
/* If T makes a function call, returns the CALL_EXPR operand. */
|
/* If T makes a function call, returns the CALL_EXPR operand. */
|
||||||
extern tree get_call_expr_in (tree t);
|
extern tree get_call_expr_in (tree t);
|
||||||
extern const_tree const_get_call_expr_in (const_tree t);
|
|
||||||
|
|
||||||
extern void recalculate_side_effects (tree);
|
extern void recalculate_side_effects (tree);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user