[all-commits] [llvm/llvm-project] 15702f: [LoopInterchange] Remove a limitation in LoopInter...

CongzheUalberta via All-commits all-commits at lists.llvm.org
Wed Jan 5 19:39:37 PST 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 15702ff9ce28b3f4aafec13be561359d4c721595
  Author: Congzhe Cao <congzhe.cao at huawei.com>
  Date:   2022-01-05 (Wed, 05 Jan 2022)

  Changed paths:
    M llvm/lib/Transforms/Scalar/LoopInterchange.cpp
    M llvm/test/Transforms/LoopInterchange/currentLimitation.ll
    M llvm/test/Transforms/LoopInterchange/interchangeable.ll
    M llvm/test/Transforms/LoopInterchange/loop-interchange-optimization-remarks.ll

  Log Message:
  [LoopInterchange] Remove a limitation in LoopInterchange legality

There was a limitation in legality that in the original inner loop latch,
no instruction was allowed between the induction variable increment
and the branch instruction. This is because we used to split the
inner latch at the induction variable increment instruction. Since
now we have split at the inner latch branch instruction and have
properly duplicated instructions over to the split block, we remove
this limitation.

Please refer to the test case updates to see how we now interchange
loops where instructions exist between the induction variable increment
and the branch instruction.

Reviewed By: bmahjour

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

More information about the All-commits mailing list