]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tree-ssa-pre.c (is_exception_related): New function
authorDaniel Berlin <dberlin@dberlin.org>
Sun, 1 Jul 2007 02:20:06 +0000 (02:20 +0000)
committerDaniel Berlin <dberlin@gcc.gnu.org>
Sun, 1 Jul 2007 02:20:06 +0000 (02:20 +0000)
2007-06-30  Daniel Berlin  <dberlin@dberlin.org>

* tree-ssa-pre.c (is_exception_related): New function
(can_value_number_operation): Use it.

From-SVN: r126162

gcc/ChangeLog
gcc/tree-ssa-pre.c

index c8f71eeb1a64516bcb8fb01d1da3965f14c23d00..7e576becf2f3b37dad8be0e3f1aa289a8e352eba 100644 (file)
        * pa-protos.h (hppa_can_use_return_insn_p): Delete declaration.
        * pa.c (hppa_can_use_return_insn_p): Delete function.  Include "df.h".
 
+2007-06-30  Daniel Berlin  <dberlin@dberlin.org>
+
+       * tree-ssa-pre.c (is_exception_related): New function
+       (can_value_number_operation): Use it.
+
 2007-06-30  Daniel Berlin  <dberlin@dberlin.org>
        
        Fix PR tree-optimization/32540
index 966d881f8f8118d82feaca63a3a32184e6a57964..b971de4498aa34cbb2c99292a67e228e36b32655 100644 (file)
@@ -2122,13 +2122,23 @@ can_value_number_call (tree stmt)
   return false;
 }
 
+/* Return true if OP is an exception handler related operation, such as
+   FILTER_EXPRor EXC_PTR_EXPR.  */
+
+static bool
+is_exception_related (tree op)
+{
+  return TREE_CODE (op) == FILTER_EXPR || TREE_CODE (op) == EXC_PTR_EXPR;
+}
+
 /* Return true if OP is a tree which we can perform value numbering
    on.  */
 
 static bool
 can_value_number_operation (tree op)
 {
-  return UNARY_CLASS_P (op)
+  return (UNARY_CLASS_P (op) 
+         && !is_exception_related (TREE_OPERAND (op, 0)))
     || BINARY_CLASS_P (op)
     || COMPARISON_CLASS_P (op)
     || REFERENCE_CLASS_P (op)