[PATCH] D12345: [Reassociate]: Add intermediate subtract instructions created while negating to be redone later for more reassociate opportunities

Aditya Nandakumar via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 22 12:33:08 PST 2015


aditya_nandakumar removed rL LLVM as the repository for this revision.
aditya_nandakumar updated this revision to Diff 43472.
aditya_nandakumar added a comment.

Modifying our pass pipeline to do reassociate twice resulted in some differences in Instruction count. On investigating why the second reassociate made a difference, I found that sometimes, when we revisit instructions, valid instruction tree roots don't get simplified (for eg factorize) when they get revisited before dead instructions as there are additional uses(false).
This patch tries to erase dead instructions before we try and redo the instructions. This improves codegen slightly (lesser instruction count) and takes Reassociate pass closer to being Idempotent.


http://reviews.llvm.org/D12345

Files:
  lib/Transforms/Scalar/Reassociate.cpp
  test/Transforms/Reassociate/factorize-again.ll
  test/Transforms/Reassociate/secondary.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12345.43472.patch
Type: text/x-patch
Size: 4612 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151222/c9ccb5bd/attachment.bin>


More information about the llvm-commits mailing list