diff options
author | Jakub Jelinek <jakub@redhat.com> | 2017-12-21 20:28:10 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2017-12-21 20:28:10 +0100 |
commit | 63e1159cce00ff64b4b60108f4e278050ca36f0f (patch) | |
tree | 50e7acc64c90af764212da7bce7be2d500da1cee /gcc/cfgrtl.c | |
parent | 9b8e85a5e3be803e0b476a8bbcb8aee0e9c48837 (diff) | |
download | gcc-63e1159cce00ff64b4b60108f4e278050ca36f0f.zip gcc-63e1159cce00ff64b4b60108f4e278050ca36f0f.tar.gz gcc-63e1159cce00ff64b4b60108f4e278050ca36f0f.tar.bz2 |
re PR rtl-optimization/80747 (gcc.dg/tree-ssa/tailrecursion-4.c fails with ICE when compiled with options "-fprofile-use -freorder-blocks-and-partition")
PR rtl-optimization/80747
PR rtl-optimization/83512
* cfgrtl.c (force_nonfallthru_and_redirect): When splitting
succ edge from ENTRY, copy partition from e->dest to the newly
created bb.
* bb-reorder.c (reorder_basic_blocks_simple): If last_tail is
ENTRY, use BB_PARTITION of its successor block as current_partition.
Don't copy partition when splitting succ edge from ENTRY.
* gcc.dg/pr80747.c: New test.
* gcc.dg/pr83512.c: New test.
From-SVN: r255954
Diffstat (limited to 'gcc/cfgrtl.c')
-rw-r--r-- | gcc/cfgrtl.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c index e2da760..ac17d46 100644 --- a/gcc/cfgrtl.c +++ b/gcc/cfgrtl.c @@ -1534,6 +1534,9 @@ force_nonfallthru_and_redirect (edge e, basic_block target, rtx jump_label) ENTRY_BLOCK_PTR_FOR_FN (cfun)); bb->count = ENTRY_BLOCK_PTR_FOR_FN (cfun)->count; + /* Make sure new block ends up in correct hot/cold section. */ + BB_COPY_PARTITION (bb, e->dest); + /* Change the existing edge's source to be the new block, and add a new edge from the entry block to the new block. */ e->src = bb; |