[PATCH] D24805: [GVNSink] Initial GVNSink prototype

James Molloy via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 19 02:36:25 PDT 2017


jmolloy updated this revision to Diff 99533.
jmolloy marked 3 inline comments as done.
jmolloy added a comment.

Hi,

Thanks for the review comments:

- Added const to operator<< as suggested by Matthias.
- Moved some implementations out of the class as suggested by Eli.
- Used post_order. I looked into using inverse RPO, but that is complicated by the lack of a single entry node in the inverted graph. Given that I'm iterating to a fixpoint anyway, I think post order traversal gives me the only guarantee I need (look at successors before predecessors).
- Moved canReplaceOperandWithVariable into Utils/Local.h. Removed the SimplifyCFG version of it (good catch, I'd forgotten that existed!).
- Added one forgotten test, and sorted out errant tab.

Cheers,

James


Repository:
  rL LLVM

https://reviews.llvm.org/D24805

Files:
  include/llvm/InitializePasses.h
  include/llvm/Transforms/Scalar.h
  include/llvm/Transforms/Scalar/GVN.h
  include/llvm/Transforms/Utils/Local.h
  lib/Transforms/IPO/PassManagerBuilder.cpp
  lib/Transforms/Scalar/CMakeLists.txt
  lib/Transforms/Scalar/GVNSink.cpp
  lib/Transforms/Scalar/Scalar.cpp
  lib/Transforms/Utils/Local.cpp
  lib/Transforms/Utils/SimplifyCFG.cpp
  test/Transforms/GVNSink/dither.ll
  test/Transforms/GVNSink/indirect-call.ll
  test/Transforms/GVNSink/sink-common-code.ll
  test/Transforms/GVNSink/struct.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24805.99533.patch
Type: text/x-patch
Size: 61458 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170519/b3b001fe/attachment.bin>


More information about the llvm-commits mailing list