aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-loop-jam.c
diff options
context:
space:
mode:
authorAlexandre Oliva <oliva@adacore.com>2021-08-28 00:40:14 -0300
committerAlexandre Oliva <oliva@gnu.org>2021-08-28 00:40:14 -0300
commitaa49a058081e38c610dfc3fb15aaf294752a627e (patch)
treef4a46c043da374dda9338454e0b43da6c01e19a6 /gcc/gimple-loop-jam.c
parent1e52538d2b430a26032d736079518ecad3bcca44 (diff)
downloadgcc-aa49a058081e38c610dfc3fb15aaf294752a627e.zip
gcc-aa49a058081e38c610dfc3fb15aaf294752a627e.tar.gz
gcc-aa49a058081e38c610dfc3fb15aaf294752a627e.tar.bz2
fix latent bootstrap-debug issue
I've hit a bootstrap-debug error involving large subprograms in gcc/ada/sem_ch12.adb. I'm afraid I couldn't narrow it down to a reasonable testcase. thread1 made different decisions about a block containing a builtin_eh_filter call because in one compilation, estimate_num_insns found a cgraph_node for the builtin and could thus get to the is_simple_builtin test, but in the other it didn't. With different insn counts, one stage jump-threaded and the other didn't, and the resulting code diverged quite a bit. The reason the builtin had a cgraph_node in one case but not the other was that modref got a chance to analyze the builtin call when it was the first stmt in the block, and that created the cgraph_node. However, when it was preceded by debug stmts, the loop in analyze_function was cut short after the first debug stmt, because the summary so far was not useful. This patch fixes both issues: skip debug stmts in the analyze_function loop, so as to prevent them from affecting any decisions in the loop, and enable the insn count estimator to get to the is_simple_builtin test when a cgraph_node has not been created for the builtin. for gcc/ChangeLog * ipa-modref.c (analyze_function): Skip debug stmts. * tree-inline.c (estimate_num_insn): Consider builtins even without a cgraph_node.
Diffstat (limited to 'gcc/gimple-loop-jam.c')
0 files changed, 0 insertions, 0 deletions