OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
compiler, runtime: Check make int64 args for overflow.
[pf3gnuchains/gcc-fork.git]
/
gcc
/
tree-call-cdce.c
diff --git
a/gcc/tree-call-cdce.c
b/gcc/tree-call-cdce.c
index
8b1ece8
..
8307edb
100644
(file)
--- a/
gcc/tree-call-cdce.c
+++ b/
gcc/tree-call-cdce.c
@@
-1,5
+1,5
@@
/* Conditional Dead Call Elimination pass for the GNU compiler.
/* Conditional Dead Call Elimination pass for the GNU compiler.
- Copyright (C) 2008
+ Copyright (C) 2008
, 2009, 2010
Free Software Foundation, Inc.
Contributed by Xinliang David Li <davidxl@google.com>
Free Software Foundation, Inc.
Contributed by Xinliang David Li <davidxl@google.com>
@@
-23,17
+23,9
@@
along with GCC; see the file COPYING3. If not see
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
-#include "ggc.h"
-
-/* These RTL headers are needed for basic-block.h. */
-#include "rtl.h"
-#include "tm_p.h"
-#include "hard-reg-set.h"
-#include "obstack.h"
#include "basic-block.h"
#include "basic-block.h"
-
#include "tree.h"
#include "tree.h"
-#include "
diagnostic
.h"
+#include "
gimple-pretty-print
.h"
#include "tree-flow.h"
#include "gimple.h"
#include "tree-dump.h"
#include "tree-flow.h"
#include "gimple.h"
#include "tree-dump.h"
@@
-457,7
+449,7
@@
gen_conditions_for_pow_int_base (tree base, tree expn,
unsigned *nconds)
{
gimple base_def;
unsigned *nconds)
{
gimple base_def;
- tree base_
nm, base_
val0;
+ tree base_val0;
tree base_var, int_type;
tree temp, tempn;
tree cst0;
tree base_var, int_type;
tree temp, tempn;
tree cst0;
@@
-466,7
+458,6
@@
gen_conditions_for_pow_int_base (tree base, tree expn,
inp_domain exp_domain;
base_def = SSA_NAME_DEF_STMT (base);
inp_domain exp_domain;
base_def = SSA_NAME_DEF_STMT (base);
- base_nm = gimple_assign_lhs (base_def);
base_val0 = gimple_assign_rhs1 (base_def);
base_var = SSA_NAME_VAR (base_val0);
int_type = TREE_TYPE (base_var);
base_val0 = gimple_assign_rhs1 (base_def);
base_var = SSA_NAME_VAR (base_val0);
int_type = TREE_TYPE (base_var);
@@
-483,10
+474,10
@@
gen_conditions_for_pow_int_base (tree base, tree expn,
else if (bit_sz == 16)
max_exp = 64;
else
else if (bit_sz == 16)
max_exp = 64;
else
- {
- gcc_assert (bit_sz == MAX_BASE_INT_BIT_SIZE);
- max_exp = 32;
- }
+
{
+
gcc_assert (bit_sz == MAX_BASE_INT_BIT_SIZE);
+
max_exp = 32;
+
}
/* For pow ((double)x, y), generate the following conditions:
cond 1:
/* For pow ((double)x, y), generate the following conditions:
cond 1:
@@
-548,11
+539,9
@@
gen_conditions_for_pow (gimple pow_call, VEC (gimple, heap) *conds,
unsigned *nconds)
{
tree base, expn;
unsigned *nconds)
{
tree base, expn;
- enum tree_code bc
, ec
;
+ enum tree_code bc;
-#ifdef ENABLE_CHECKING
- gcc_assert (check_pow (pow_call));
-#endif
+ gcc_checking_assert (check_pow (pow_call));
*nconds = 0;
*nconds = 0;
@@
-560,12
+549,11
@@
gen_conditions_for_pow (gimple pow_call, VEC (gimple, heap) *conds,
expn = gimple_call_arg (pow_call, 1);
bc = TREE_CODE (base);
expn = gimple_call_arg (pow_call, 1);
bc = TREE_CODE (base);
- ec = TREE_CODE (expn);
if (bc == REAL_CST)
if (bc == REAL_CST)
-
gen_conditions_for_pow_cst_base (base, expn, conds, nconds);
+ gen_conditions_for_pow_cst_base (base, expn, conds, nconds);
else if (bc == SSA_NAME)
else if (bc == SSA_NAME)
-
gen_conditions_for_pow_int_base (base, expn, conds, nconds);
+ gen_conditions_for_pow_int_base (base, expn, conds, nconds);
else
gcc_unreachable ();
}
else
gcc_unreachable ();
}
@@
-940,6
+928,6
@@
struct gimple_opt_pass pass_call_cdce =
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
- TODO_
dump_func | TODO_verify_ssa
/* todo_flags_finish */
+ TODO_
verify_ssa
/* todo_flags_finish */
}
};
}
};