]> gcc.gnu.org Git - gcc.git/blobdiff - gcc/gimple.c
tree-flow.h: Remove some prototypes.
[gcc.git] / gcc / gimple.c
index 26c78c806b598745650f864a3015746765fb1f2e..dbcfa3ab3d16640d3ff2bdae67ab5f5083853794 100644 (file)
@@ -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"
This page took 0.030825 seconds and 5 git commands to generate.