Page MenuHomePhabricator

[IR] Don't treat callbr as indirect terminator
ClosedPublic

Authored by nikic on Jul 15 2022, 5:31 AM.

Details

Summary

Callbr is no longer an indirect terminator in the sense that is relevant here (that it's successors cannot be updated). The primary effect of this change is that callbr no longer prevents formation of loop simplify form.

I decided to drop the isIndirectTerminator() method entirely and replace it with isa<IndirectBrInst>() checks. I assume this method was added to abstract over indirectbr and callbr, but it never really caught on, and there is nothing left to abstract anymore at this point.

Diff Detail

Event Timeline

nikic created this revision.Jul 15 2022, 5:31 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 15 2022, 5:31 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
nikic requested review of this revision.Jul 15 2022, 5:31 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 15 2022, 5:31 AM
This revision is now accepted and ready to land.Jul 15 2022, 10:58 AM

Patch LGTM; just running it through testing now.

nickdesaulniers accepted this revision.Jul 15 2022, 12:00 PM

@nathanchance is also doing some testing, please wait for his green light before landing.

My Linux kernel build and QEMU boot tests (minus i386, due to an unrelated regression in mainline) showed no regressions with this change.

This revision was landed with ongoing or failed builds.Jul 18 2022, 12:32 AM
This revision was automatically updated to reflect the committed changes.