[PATCH] D37355: Add CalledValuePropagation pass
Davide Italiano via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 2 11:37:08 PDT 2017
davide added a comment.
Generally I feel like it's getting there. Some small comments, but I expect this to be ready to be committed soon'ish
================
Comment at: lib/Transforms/IPO/CalledValuePropagation.cpp:181-190
+ void PrintValue(LatticeVal LV, raw_ostream &OS) {
+ if (LV == getUndefVal())
+ OS << "Undefined ";
+ else if (LV == getOverdefinedVal())
+ OS << "Overdefined";
+ else if (LV == getUntrackedVal())
+ OS << "Untracked ";
----------------
you can simplify just doing
`return OS <<`
================
Comment at: lib/Transforms/IPO/CalledValuePropagation.cpp:286
+ // set.
+ std::set<CVPLatticeVal> LatticeVals;
+
----------------
DenseSet maybe?
================
Comment at: lib/Transforms/IPO/PassManagerBuilder.cpp:717
+ // Attach metadata to indirect call sites indicating the set of functions
+ // they may target at run-time. This should follow IPSCCP.
+ PM.add(createCalledValuePropagationPass());
----------------
I'd make an RFC on llvm-dev as people might have custom pipelines.
https://reviews.llvm.org/D37355
More information about the llvm-commits
mailing list