[PATCH] D22599: GVN-hoist: improve code generation for recursive GEPs

Sebastian Pop via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 22 11:28:02 PDT 2016


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

Refactored the previous code: put the code generation part cloning the GEPs in a separate function, and call the recursive analysis of GEPs before mutating the IR.
I tried to use vectors, though they are more difficult to use and more compile time intensive, as one has to replace operands of the cloned instructions throughout all the cloned instructions.
With the recursive call we know exactly which operands in which instructions have to be replaced.
Passes make check-all and llvm test-suite on x86_64-linux.


https://reviews.llvm.org/D22599

Files:
  llvm/lib/Transforms/Scalar/GVNHoist.cpp
  llvm/test/Transforms/GVN/hoist-recursive-geps.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22599.65110.patch
Type: text/x-patch
Size: 12895 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160722/38356d1d/attachment.bin>


More information about the llvm-commits mailing list