[PATCH] D74975: [ARM][LowOverheadLoops] Iteration count IT blocks

Sam Parker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 21 10:51:28 PST 2020


samparker created this revision.
samparker added reviewers: dmgreen, SjoerdMeijer.
Herald added subscribers: hiraditya, kristof.beyls.
Herald added a project: LLVM.

Change the way that we remove the redundant iteration count code in the presence of IT blocks. collectLocalKilledOperands has been introduced to scan an instructions operands, collecting the killed instructions and then visiting them too. This is used to delete the code in the preheader which calculates the iteration count. We also track any IT blocks within the preheader and, if we remove all the instructions from the IT block, we also remove the IT instruction. isSafeToRemove is used to remove any redundant uses of the iteration count within the loop body.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D74975

Files:
  llvm/include/llvm/CodeGen/ReachingDefAnalysis.h
  llvm/lib/CodeGen/ReachingDefAnalysis.cpp
  llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp
  llvm/test/CodeGen/Thumb2/LowOverheadLoops/dont-ignore-vctp.mir
  llvm/test/CodeGen/Thumb2/LowOverheadLoops/it-block-chain.mir
  llvm/test/CodeGen/Thumb2/LowOverheadLoops/it-block-itercount.mir
  llvm/test/CodeGen/Thumb2/LowOverheadLoops/it-block-mov.mir
  llvm/test/CodeGen/Thumb2/LowOverheadLoops/it-block-random.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74975.245923.patch
Type: text/x-patch
Size: 24032 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200221/df394912/attachment-0001.bin>


More information about the llvm-commits mailing list