aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa.c
diff options
context:
space:
mode:
authorDaniel Berlin <dberlin@dberlin.org>2006-03-25 19:17:26 +0000
committerDaniel Berlin <dberlin@gcc.gnu.org>2006-03-25 19:17:26 +0000
commitfe1f8f442ef9952650c38ae0383498d41965775c (patch)
tree224a37b6b651b721ab029a9a7063751f561e976e /gcc/tree-ssa.c
parent1d8b38a080f6862c5e0e1f407851e9b73c622e33 (diff)
downloadgcc-fe1f8f442ef9952650c38ae0383498d41965775c.zip
gcc-fe1f8f442ef9952650c38ae0383498d41965775c.tar.gz
gcc-fe1f8f442ef9952650c38ae0383498d41965775c.tar.bz2
re PR tree-optimization/26804 (Alias Time explosion)
2006-03-25 Daniel Berlin <dberlin@dberlin.org> PR tree-optimization/26804 * tree.h (DECL_CALL_CLOBBERED): New macro. (tree_decl_common): Add call_clobbered_flag. * tree-flow-inline.h (is_call_clobbered): Use DECL_CALL_CLOBBERED. (mark_call_clobbered): Set DECL_CALL_CLOBBERED. (clear_call_clobbered): Clear DECL_CALL_CLOBBERED. (mark_non_addressable): Ditto. * tree-ssa.c (verify_call_clobbered): New function. (verify_alias_info): Use it. * tree-pass.h (pass_reset_cc_flags): New prototype. * tree-ssa-alias.c (pass_reset_cc_flags): New structure. (reset_cc_flags): New function. * passes.c (init_optimization_passes): Call reset_cc_flags after initializing referenced_vars. From-SVN: r112380
Diffstat (limited to 'gcc/tree-ssa.c')
-rw-r--r--gcc/tree-ssa.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c
index 2dab5c6..1446612 100644
--- a/gcc/tree-ssa.c
+++ b/gcc/tree-ssa.c
@@ -613,6 +613,46 @@ err:
}
+/* Verify the consistency of call clobbering information. */
+static void
+verify_call_clobbering (void)
+{
+ unsigned int i;
+ bitmap_iterator bi;
+ tree var;
+ referenced_var_iterator rvi;
+
+ /* At all times, the result of the DECL_CALL_CLOBBERED flag should
+ match the result of the call_clobbered_vars bitmap. Verify both
+ that everything in call_clobbered_vars is marked
+ DECL_CALL_CLOBBERED, and that everything marked
+ DECL_CALL_CLOBBERED is in call_clobbered_vars. */
+ EXECUTE_IF_SET_IN_BITMAP (call_clobbered_vars, 0, i, bi)
+ {
+ var = referenced_var (i);
+ if (!MTAG_P (var) && !DECL_CALL_CLOBBERED (var))
+ {
+ error ("variable in call_clobbered_vars but not marked DECL_CALL_CLOBBERED");
+ debug_variable (var);
+ goto err;
+ }
+ }
+ FOR_EACH_REFERENCED_VAR (var, rvi)
+ {
+ if (!MTAG_P (var) && DECL_CALL_CLOBBERED (var)
+ && !bitmap_bit_p (call_clobbered_vars, DECL_UID (var)))
+ {
+ error ("variable marked DECL_CALL_CLOBBERED but not in call_clobbered_vars bitmap.");
+ debug_variable (var);
+ goto err;
+ }
+ }
+ return;
+
+ err:
+ internal_error ("verify_call_clobbering failed");
+}
+
/* Verify the consistency of aliasing information. */
static void
@@ -620,6 +660,7 @@ verify_alias_info (void)
{
verify_flow_sensitive_alias_info ();
verify_name_tags ();
+ verify_call_clobbering ();
verify_flow_insensitive_alias_info ();
}