aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple.c
diff options
context:
space:
mode:
authorAndrew MacLeod <amacleod@redhat.com>2013-10-02 17:57:54 +0000
committerAndrew Macleod <amacleod@gcc.gnu.org>2013-10-02 17:57:54 +0000
commit3d9c733eb19c1fa07f0adecc083a4c2a053fd903 (patch)
tree4e565c339cd910e920e36af879ee13b02dd89c3d /gcc/gimple.c
parentcc1a9ac808c9f04cb0deeff138b5da114f113c76 (diff)
downloadgcc-3d9c733eb19c1fa07f0adecc083a4c2a053fd903.zip
gcc-3d9c733eb19c1fa07f0adecc083a4c2a053fd903.tar.gz
gcc-3d9c733eb19c1fa07f0adecc083a4c2a053fd903.tar.bz2
tree-flow.h: Remove some prototypes.
* tree-flow.h: Remove some prototypes. * tree-ssa-dce.c (mark_virtual_operand_for_renaming, mark_virtual_phi_result_for_renaming): Move to tree-into-ssa.c. * tree-into-ssa.c (mark_virtual_operand_for_renaming, mark_virtual_phi_result_for_renaming): Relocate here. * tree-into-ssa.h: Add prototypes. * tree-ssa-phiopt.c: (tree_ssa_phiopt_worker) Use single_pred_before_succ_order. (blocks_in_phiopt_order): Rename and move to cfganal.c. (nonfreeing_call_p) Move to gimple.c. * cfganal.c (single_pred_before_succ_order): Move and renamed from tree-ssa-phiopt.c. * basic-block.h (single_pred_before_succ_order): Add prototype. * gimple.c (nonfreeing_call_p): Relocate here. * gimple.h: Add prototype. * tree-ssa-ifcombine.c: Include tree-ssa-phiopt.h. * tree-ssa-dom.h: New file. Relocate prototypes here. * tree-ssa.h: Include tree-ssa-dom.h. From-SVN: r203122
Diffstat (limited to 'gcc/gimple.c')
-rw-r--r--gcc/gimple.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/gimple.c b/gcc/gimple.c
index 26c78c8..dbcfa3a 100644
--- a/gcc/gimple.c
+++ b/gcc/gimple.c
@@ -4418,4 +4418,27 @@ gimple_can_coalesce_p (tree name1, tree name2)
return false;
}
+
+/* Return true when CALL is a call stmt that definitely doesn't
+ free any memory or makes it unavailable otherwise. */
+bool
+nonfreeing_call_p (gimple call)
+{
+ if (gimple_call_builtin_p (call, BUILT_IN_NORMAL)
+ && gimple_call_flags (call) & ECF_LEAF)
+ switch (DECL_FUNCTION_CODE (gimple_call_fndecl (call)))
+ {
+ /* Just in case these become ECF_LEAF in the future. */
+ case BUILT_IN_FREE:
+ case BUILT_IN_TM_FREE:
+ case BUILT_IN_REALLOC:
+ case BUILT_IN_STACK_RESTORE:
+ return false;
+ default:
+ return true;
+ }
+
+ return false;
+}
+
#include "gt-gimple.h"