[PATCH] D31389: [ARM] Remove a dead ADD during the creation of TBBs

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 4 03:10:11 PDT 2017


dmgreen updated this revision to Diff 94029.
dmgreen added a comment.

Hello, thanks for the suggestions.

The idea behind the loop is to find the last ADD that sets EntryReg (the register that the JT uses), providing EntryReg is not used or def'd between the ADD and the JT. I've split it up into two loops to make it more parsable. This is in a way just an attempt to improve preserveBaseRegister above, but when I tried to implement this in there it came out as a bit of a mess, and was no longer just doing "Preserve Base Register" stuff. Apparently the new function wasn't much better though!

Let me know what you think, cheers
Dave


https://reviews.llvm.org/D31389

Files:
  lib/Target/ARM/ARMConstantIslandPass.cpp
  test/CodeGen/Thumb2/tbb-removeadd.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31389.94029.patch
Type: text/x-patch
Size: 5974 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170404/6394e949/attachment.bin>


More information about the llvm-commits mailing list