[PATCH] D71837: [ARM][MVE] Tail Predicate IsSafeToRemove

Sam Parker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 23 05:34:54 PST 2019


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

Introduce a method to walk through use-def chains to decide whether it's possible to remove a given instruction and its users. These instructions are then stored in a set until the end of the transform when they're erased. This is now used to perform checks on the iteration count (LoopDec chain) and element count (VCTP chain). Removing more instructions has resulted in the need to update liveness information for which a class has been introduced to help iterate through the loop.
As well as being able to remove chains of instructions, we know also check that the sub feeding the vctp is producing the expected value. The checks around the vctp instruction have been moved into their own method 'ValidateTailPredicate' which has made this change look bigger than it is.
The test changes are mainly updates to the live-in lists, with a couple of tweaks to ensure that the test still works. But I've also added tests for sub -> vctp chains as well as another for completing removing redundant movs in the loop.


https://reviews.llvm.org/D71837

Files:
  llvm/include/llvm/CodeGen/ReachingDefAnalysis.h
  llvm/lib/CodeGen/ReachingDefAnalysis.cpp
  llvm/lib/Target/ARM/ARMBaseInstrInfo.h
  llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp
  llvm/lib/Target/ARM/Utils/ARMBaseInfo.h
  llvm/test/CodeGen/Thumb2/LowOverheadLoops/cond-mov.mir
  llvm/test/CodeGen/Thumb2/LowOverheadLoops/disjoint-vcmp.mir
  llvm/test/CodeGen/Thumb2/LowOverheadLoops/dont-remove-loop-update.mir
  llvm/test/CodeGen/Thumb2/LowOverheadLoops/dont-remove-loop-update2.mir
  llvm/test/CodeGen/Thumb2/LowOverheadLoops/dont-remove-loop-update3.mir
  llvm/test/CodeGen/Thumb2/LowOverheadLoops/end-positive-offset.mir
  llvm/test/CodeGen/Thumb2/LowOverheadLoops/incorrect-sub-16.mir
  llvm/test/CodeGen/Thumb2/LowOverheadLoops/incorrect-sub-32.mir
  llvm/test/CodeGen/Thumb2/LowOverheadLoops/incorrect-sub-8.mir
  llvm/test/CodeGen/Thumb2/LowOverheadLoops/loop-guards.ll
  llvm/test/CodeGen/Thumb2/LowOverheadLoops/mov-after-dls.mir
  llvm/test/CodeGen/Thumb2/LowOverheadLoops/mov-lr-terminator.mir
  llvm/test/CodeGen/Thumb2/LowOverheadLoops/move-def-before-start.mir
  llvm/test/CodeGen/Thumb2/LowOverheadLoops/move-start-after-def.mir
  llvm/test/CodeGen/Thumb2/LowOverheadLoops/mve-tail-data-types.ll
  llvm/test/CodeGen/Thumb2/LowOverheadLoops/remove-elem-moves.mir
  llvm/test/CodeGen/Thumb2/LowOverheadLoops/revert-while.mir
  llvm/test/CodeGen/Thumb2/LowOverheadLoops/safe-def-no-mov.mir
  llvm/test/CodeGen/Thumb2/LowOverheadLoops/size-limit.mir
  llvm/test/CodeGen/Thumb2/LowOverheadLoops/unsafe-cpsr-loop-use.mir
  llvm/test/CodeGen/Thumb2/LowOverheadLoops/vctp-in-vpt-2.mir
  llvm/test/CodeGen/Thumb2/LowOverheadLoops/vctp-in-vpt.mir
  llvm/test/CodeGen/Thumb2/LowOverheadLoops/while.mir
  llvm/test/CodeGen/Thumb2/LowOverheadLoops/wlstp.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71837.235131.patch
Type: text/x-patch
Size: 146986 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191223/45c81cb1/attachment-0001.bin>


More information about the llvm-commits mailing list