diff options
author | amacleod <amacleod@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-10-18 19:35:40 +0000 |
---|---|---|
committer | amacleod <amacleod@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-10-18 19:35:40 +0000 |
commit | 424a4a92d75bb2fc702832c11c5917467b5a929c (patch) | |
tree | dae3f2a566777542e71127cd497bac3fc05fbf29 /gcc/tree-ssa-dom.c | |
parent | c1acf60c9540fffb6d89b1c39bb577e5fd9eb529 (diff) | |
download | gcc-424a4a92d75bb2fc702832c11c5917467b5a929c.tar.gz |
* tree-ssa.h: Don't include gimple-low.h, tree-ssa-address.h, sbitmap.h,
tree-ssa-threadedge.h, tree-ssa-dom.h, and tree-cfgcleanup.h.
* gimple-low.c (gimple_check_call_arg,
gimple_check_call_matching_types): Move to cgraph.c.
* gimple-low.h: Remove prototype.
* cgraph.c: (gimple_check_call_arg, gimple_check_call_matching_types):
Relocate from gimple-low.c.
* cgraph.h: Add prototype. Don't include basic-block.h.
* gimplify.c: Add gimple-low to include list.
* omp-low.c: Add gimple-low and tree-cfgcleanup.h to include list.
* tree-eh.c: Add gimple-low to include list.
* tree-nested.c: Likewise.
* cfgexpand.c: Add tree-ssa-address.h to include list.
* expr.c: Likewise.
* gimple-fold.c: Likewise.
* gimple-ssa-strength-reduction.c: Likewise.
* trans-mem.c: Likewise.
* tree-mudflap.c: Likewise.
* tree-ssa-loop-ivopts.c: Likewise.
* tree-ssa-dom.c: Include tree-ssa-threadedge.h and tree-ssa-dom.h.
(degenerate_phi_result): Move to tree-phinodes.c.
* tree-ssa-loop-ch.c: Include tree-ssa-threadedge.h.
* tree-ssa-threadedge.c: Likewise.
* tree-vrp.c: Likewise.
* tree-phinodes.c (degenerate_phi_result): Relocate here.
* tree-ssa-dom.h (degenerate_phi_result): Remove Prototype.
* tree-phinodes.h (degenerate_phi_result): Add prototype.
* tree-ssa-copy.c: Include tree-ssa-dom.h.
* tree-ssa-forwprop.c: Likewise.
* tree-cfgcleanup.c (execute_cleanup_cfg_post_optimizing,
pass_data_cleanup_cfg_post_optimizing,
make_pass_cleanup_cfg_post_optimizing): Relocate from tree-optimize.c.
* tree-optimize.c: Delete File.
* graphite.c: Include tree-cfgcleanup.h.
* passes.c: Likewise.
* tree-cfg.c: Likewise.
* tree-profile.c: Likewise.
* tree-ssa-dse.c: Likewise.
* tree-ssa-loop-ivcanon.c: Likewise.
* tree-switch-conversion.c: Don't include tree-ssa-operands.h.
* tree-outof-ssa.c: Include sbitmap.h.
* tree-ssa-live.c: Likewise.
* tree-ssa-propagate.c: Likewise.
* tree-ssa-structalias.c: Likewise.
* tree-stdarg.c: Likewise.
* Makefile.in (OBJS): Delete tree-optimize.o.
* basic-block.h (gcov_type, gcov_type_unsigned): Move to coretypes.h.
* coretypes.h (gcov_type, gcov_type_unsigned): Relocate here.
* varasm.c: Include basic-block.h.
* cfgloop.h: Include function.h instead of basic-block.h
(bb_loop_depth): Move to cfgloop.c.
* cfgloop.c (bb_loop_depth): Relocate from cfgloop.h.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203833 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-dom.c')
-rw-r--r-- | gcc/tree-ssa-dom.c | 38 |
1 files changed, 2 insertions, 36 deletions
diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c index b2c7e147ef6..4ce29aed54e 100644 --- a/gcc/tree-ssa-dom.c +++ b/gcc/tree-ssa-dom.c @@ -37,6 +37,8 @@ along with GCC; see the file COPYING3. If not see #include "tree-ssa-threadupdate.h" #include "langhooks.h" #include "params.h" +#include "tree-ssa-threadedge.h" +#include "tree-ssa-dom.h" /* This file implements optimizations on the dominator tree. */ @@ -2588,42 +2590,6 @@ avail_expr_hash (const void *p) /* PHI-ONLY copy and constant propagation. This pass is meant to clean up degenerate PHIs created by or exposed by jump threading. */ -/* Given PHI, return its RHS if the PHI is a degenerate, otherwise return - NULL. */ - -tree -degenerate_phi_result (gimple phi) -{ - tree lhs = gimple_phi_result (phi); - tree val = NULL; - size_t i; - - /* Ignoring arguments which are the same as LHS, if all the remaining - arguments are the same, then the PHI is a degenerate and has the - value of that common argument. */ - for (i = 0; i < gimple_phi_num_args (phi); i++) - { - tree arg = gimple_phi_arg_def (phi, i); - - if (arg == lhs) - continue; - else if (!arg) - break; - else if (!val) - val = arg; - else if (arg == val) - continue; - /* We bring in some of operand_equal_p not only to speed things - up, but also to avoid crashing when dereferencing the type of - a released SSA name. */ - else if (TREE_CODE (val) != TREE_CODE (arg) - || TREE_CODE (val) == SSA_NAME - || !operand_equal_p (arg, val, 0)) - break; - } - return (i == gimple_phi_num_args (phi) ? val : NULL); -} - /* Given a statement STMT, which is either a PHI node or an assignment, remove it from the IL. */ |