[PATCH] D37355: Add CalledValuePropagation pass
Matthew Simpson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 9 11:17:14 PDT 2017
mssimpso updated this revision to Diff 118238.
mssimpso added a comment.
Addressed Danny's comments.
- Changed the data structure for holding function pointers from SmallVector to std::set. I was probably over thinking this before, but you're right, a set makes more sense. I went with std::set over DenseSet for a few reasons. First, DenseSet doesn't work with std::inserter, which I used for std::set_union (see below). And second, std::set is ordered, so the functions will always appear in a deterministic order in the !callees metadata, which is useful for testing.
- Used std::set_union in MergeValues
- Changed CVPLatticeVal constructor to use the set move constructor to avoid unnecessary copying.
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.118238.patch
Type: text/x-patch
Size: 31829 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171009/752b47ef/attachment.bin>
More information about the llvm-commits
mailing list