[PATCH] D37355: Add CalledValuePropagation pass

Matthew Simpson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 4 14:04:26 PDT 2017


mssimpso updated this revision to Diff 117737.
mssimpso marked an inline comment as done.
mssimpso added a comment.

Addressed comments from Danny and Davide.

- Regarding the DenseSet, I just removed the set all together. I was previously using the set to unique the lattice values in order to save space. But in the common case, the lattice values should be very small. So I don't think it's worth worrying about that.
- I also moved the uniquing and sorting of the functions vector from MergeValues to the lattice value constructor. I think this makes it more obvious that the container is set-like. Using a vector instead of set is handy for equality testing, which the lattice value is required to implement.


https://reviews.llvm.org/D37355

Files:
  include/llvm-c/Transforms/IPO.h
  include/llvm/InitializePasses.h
  include/llvm/LinkAllPasses.h
  include/llvm/Transforms/IPO.h
  include/llvm/Transforms/IPO/CalledValuePropagation.h
  lib/Passes/PassBuilder.cpp
  lib/Passes/PassRegistry.def
  lib/Transforms/IPO/CMakeLists.txt
  lib/Transforms/IPO/CalledValuePropagation.cpp
  lib/Transforms/IPO/IPO.cpp
  lib/Transforms/IPO/PassManagerBuilder.cpp
  test/Other/new-pm-defaults.ll
  test/Other/new-pm-lto-defaults.ll
  test/Other/new-pm-thinlto-defaults.ll
  test/Transforms/CalledValuePropagation/simple-arguments.ll
  test/Transforms/CalledValuePropagation/simple-memory.ll
  test/Transforms/CalledValuePropagation/simple-select.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37355.117737.patch
Type: text/x-patch
Size: 31899 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171004/f3c202e0/attachment.bin>


More information about the llvm-commits mailing list