[all-commits] [llvm/llvm-project] 11079e: [IR] Don't treat callbr as indirect terminator

Nikita Popov via All-commits all-commits at lists.llvm.org
Mon Jul 18 00:32:25 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 11079e8820ab58417365c226d39f2615b0bef685
      https://github.com/llvm/llvm-project/commit/11079e8820ab58417365c226d39f2615b0bef685
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-07-18 (Mon, 18 Jul 2022)

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

  Log Message:
  -----------
  [IR] Don't treat callbr as indirect terminator

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.

Differential Revision: https://reviews.llvm.org/D129849




More information about the All-commits mailing list