On 4/15/24 10:03 PM, Alexandre Oliva wrote:
On Mar 29, 2024, Alexandre Oliva <ol...@adacore.com> wrote:

On Mar 22, 2024, Jeff Law <jeffreya...@gmail.com> wrote:
On 3/9/24 2:11 AM, Alexandre Oliva wrote:
ipa_tree_profile asserts that the symtab is in IPA_SSA state, but we
don't reach that state and ICE if e.g. ipa-strub passes report errors.
Skip this pass if errors were seen.
Regstrapped on x86_64-linux-gnu.  Ok to install?

for  gcc/ChangeLog
PR tree-optimization/113681
* tree-profiling.cc (pass_ipa_tree_profile::gate): Skip if
seen_errors.
for  gcc/testsuite/ChangeLog
PR tree-optimization/113681
* c-c++-common/strub-pr113681.c: New.
So I've really never dug into strub, but this would seem to imply that
an error from strub is non-fatal?

Yeah.  I believe that's no different from other passes.

Various other passes have seen_errors guards, but ipa-prof didn't.

Specifically, pass_build_ssa_passes in passes.cc is gated with
!seen_errors(), so we skip all the passes bundled in it, and don't
advance the symtab state to IPA_SSA.  So other passes that would require
IPA_SSA need to be gated similarly.

I suppose the insertion point for the strubm pass was one where others
passes didn't previously issue errors, so that wasn't an issue for
ipa-prof.  But now it is.

The patch needed adjustments to resolve conflicts with unrelated
changes.


[tree-prof] skip if errors were seen [PR113681]

ipa_tree_profile asserts that the symtab is in IPA_SSA state, but we
don't reach that state and ICE if e.g. ipa-strub passes report errors.
Skip this pass if errors were seen.

Regstrapped on x86_64-linux-gnu.  Ok to install?


for  gcc/ChangeLog

        PR tree-optimization/113681
        * tree-profiling.cc (pass_ipa_tree_profile::gate): Skip if
        seen_errors.

for  gcc/testsuite/ChangeLog

        PR tree-optimization/113681
        * c-c++-common/strub-pr113681.c: New.
OK.
jeff

Reply via email to