[PATCH] D92385: [ARM] Add a pass that re-arranges blocks when there is a backwards WLS branch

Sam Tebbs via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 1 05:21:49 PST 2020


samtebbs created this revision.
samtebbs added reviewers: dmgreen, samparker, SjoerdMeijer.
Herald added subscribers: llvm-commits, danielkiss, hiraditya, kristof.beyls, mgorny.
Herald added a project: LLVM.
samtebbs requested review of this revision.

Blocks can be laid out such that a t2WhileLoopStart branches backwards. This is forbidden by the architecture and so it fails to be converted into a low-overhead loop. This new pass checks for these cases and moves the target block, fixing any fall-through that would then be broken.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D92385

Files:
  llvm/lib/Target/ARM/ARM.h
  llvm/lib/Target/ARM/ARMConstantIslandPass.cpp
  llvm/lib/Target/ARM/ARMLowOverheadLoopBlockPlacement.cpp
  llvm/lib/Target/ARM/ARMLowOverheadLoopBlockPlacement.h
  llvm/lib/Target/ARM/ARMTargetMachine.cpp
  llvm/lib/Target/ARM/CMakeLists.txt
  llvm/test/CodeGen/Thumb2/LowOverheadLoops/block-placement.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92385.308621.patch
Type: text/x-patch
Size: 28492 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201201/381eeb06/attachment.bin>


More information about the llvm-commits mailing list