[PATCH] D129849: [IR] Don't treat callbr as indirect terminator

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 15 05:31:39 PDT 2022


nikic created this revision.
nikic added reviewers: nickdesaulniers, nathanchance, jyknight, efriedma.
Herald added a subscriber: hiraditya.
Herald added a project: All.
nikic requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

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.


https://reviews.llvm.org/D129849

Files:
  llvm/include/llvm/Analysis/SparsePropagation.h
  llvm/include/llvm/IR/Instruction.h
  llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
  llvm/lib/Transforms/Utils/LoopSimplify.cpp
  llvm/test/Transforms/LoopDeletion/two-predecessors.ll
  llvm/test/Transforms/LoopRotate/callbr.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129849.444949.patch
Type: text/x-patch
Size: 7996 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220715/b436d7fd/attachment.bin>


More information about the llvm-commits mailing list