aboutsummaryrefslogtreecommitdiff
path: root/gcc/basic-block.h
diff options
context:
space:
mode:
authorBernd Schmidt <bernds@codesourcery.com>2010-12-14 00:23:40 +0000
committerBernd Schmidt <bernds@gcc.gnu.org>2010-12-14 00:23:40 +0000
commit4ec5d4f5b9a41a337e768260b8df23ab2cbc1dbb (patch)
tree7224059fe740ae1327ffaffd7f83fc7d51dee038 /gcc/basic-block.h
parent218cbe3757e7268d53966a2fe8d71acd1569a77c (diff)
downloadgcc-4ec5d4f5b9a41a337e768260b8df23ab2cbc1dbb.zip
gcc-4ec5d4f5b9a41a337e768260b8df23ab2cbc1dbb.tar.gz
gcc-4ec5d4f5b9a41a337e768260b8df23ab2cbc1dbb.tar.bz2
re PR rtl-optimization/44374 (Hoist same instructions in different branches)
gcc/ PR rtl-optimization/44374 Reapply patch with fixes. * basic-block.h (enum bb_flags): Add BB_MODIFIED. * df-core.c (df_set_bb_dirty): Set it. * ifcvt.c (find_memory): Remove function. (dead_or_predicable): Use can_move_insns_across. * df.h (can_move_insns_across): Declare function. * cfgcleanup.c (block_was_dirty): New static variable. (flow_find_head_matching_sequence): Test for epilogue notes. (try_crossjump_bb, try_forward_edges): Test BB_MODIFIED flag rather than df_get_bb_dirty. (try_head_merge_bb): New static function. (try_optimize_cfg): Call it. Call df_analyze if block_was_dirty is set. * df-problems.c: Include "target.h" (df_simulate_find_uses): New static function. (MEMREF_NORMAL, MEMREF_VOLATILE): New macros. (find_memory, find_memory_store): New static functions. (can_move_insns_across): New function. * Makefile.in (df-problems.o): Update dependencies. gcc/testsuite/ PR rtl-optimization/44374 Reapply patch with fixes. * gcc.target/arm/headmerge-1.c: New test. * gcc.target/arm/headmerge-2.c: New test. * gcc.target/i386/headmerge-1.c: New test. * gcc.target/i386/headmerge-2.c: New test. From-SVN: r167779
Diffstat (limited to 'gcc/basic-block.h')
-rw-r--r--gcc/basic-block.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/basic-block.h b/gcc/basic-block.h
index be0a1d1..3594eea 100644
--- a/gcc/basic-block.h
+++ b/gcc/basic-block.h
@@ -245,7 +245,13 @@ enum bb_flags
/* Set on blocks that cannot be threaded through.
Only used in cfgcleanup.c. */
- BB_NONTHREADABLE_BLOCK = 1 << 11
+ BB_NONTHREADABLE_BLOCK = 1 << 11,
+
+ /* Set on blocks that were modified in some way. This bit is set in
+ df_set_bb_dirty, but not cleared by df_analyze, so it can be used
+ to test whether a block has been modified prior to a df_analyze
+ call. */
+ BB_MODIFIED = 1 << 12
};
/* Dummy flag for convenience in the hot/cold partitioning code. */