OSDN Git Service

PR c++/48935
[pf3gnuchains/gcc-fork.git] / gcc / tree-ssa-operands.c
index c83267d..7f76cbf 100644 (file)
@@ -32,7 +32,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-pass.h"
 #include "ggc.h"
 #include "timevar.h"
-#include "toplev.h"
 #include "langhooks.h"
 #include "ipa-reference.h"
 
@@ -833,15 +832,8 @@ get_asm_expr_operands (gimple stmt)
     }
 
   /* Clobber all memory and addressable symbols for asm ("" : : : "memory");  */
-  for (i = 0; i < gimple_asm_nclobbers (stmt); i++)
-    {
-      tree link = gimple_asm_clobber_op (stmt, i);
-      if (strcmp (TREE_STRING_POINTER (TREE_VALUE (link)), "memory") == 0)
-       {
-         add_virtual_operand (stmt, opf_def);
-         break;
-       }
-    }
+  if (gimple_asm_clobbers_memory_p (stmt))
+    add_virtual_operand (stmt, opf_def);
 }
 
 
@@ -1066,6 +1058,9 @@ parse_ssa_operands (gimple stmt)
       /* Add call-clobbered operands, if needed.  */
       if (code == GIMPLE_CALL)
        maybe_add_call_vops (stmt);
+
+      if (code == GIMPLE_RETURN)
+       append_vuse (gimple_vop (cfun));
     }
 }
 
@@ -1132,6 +1127,12 @@ update_stmt_operands (gimple stmt)
 
   timevar_push (TV_TREE_OPS);
 
+  /* If the stmt is a noreturn call queue it to be processed by
+     split_bbs_on_noreturn_calls during cfg cleanup.  */
+  if (is_gimple_call (stmt)
+      && gimple_call_noreturn_p (stmt))
+    VEC_safe_push (gimple, gc, MODIFIED_NORETURN_CALLS (cfun), stmt);
+
   gcc_assert (gimple_modified_p (stmt));
   build_ssa_operands (stmt);
   gimple_set_modified (stmt, false);