[PATCH] D71007: [ARM][LowOverheadLoops] Remove dead loop update instructions
Sjoerd Meijer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 10 03:26:56 PST 2019
SjoerdMeijer updated this revision to Diff 233035.
SjoerdMeijer added a comment.
> I'm not sure this is doing what you want.. wouldn't the vctp likely be a use before def..?
Thanks for catching that one too. This was a off-by one error in that function, I wasn't considering the first instruction in the block. The check is now done in a loop, finding defs until we reached the beginning of the block, but ignoring it if is a VCTP instruction.
> We should also be checking that the Def isn't defining cpsr, and if it is, that the def is dead.
Yep, cheers, and tests have been added too.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71007/new/
https://reviews.llvm.org/D71007
Files:
llvm/include/llvm/CodeGen/MachineLoopUtils.h
llvm/include/llvm/CodeGen/ReachingDefAnalysis.h
llvm/lib/CodeGen/MachineLoopUtils.cpp
llvm/lib/CodeGen/ReachingDefAnalysis.cpp
llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp
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/fast-fp-loops.ll
llvm/test/CodeGen/Thumb2/LowOverheadLoops/mve-tail-data-types.ll
llvm/test/CodeGen/Thumb2/LowOverheadLoops/vector-arith-codegen.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71007.233035.patch
Type: text/x-patch
Size: 36037 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191210/7e86a764/attachment.bin>
More information about the llvm-commits
mailing list