[PATCH] D37198: [InlineCost] add visitSelectInst()

Easwaran Raman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 19 17:48:13 PDT 2017


eraman added inline comments.


================
Comment at: lib/Analysis/InlineCost.cpp:496
+                                       bool AllConstants) {
+  SmallVector<Value *, 2> Ops;
   for (Value *Op : I.operands()) {
----------------
Sorry, I should have thought through this carefully.  My bad. I feel this version is worse than before. Most callers of simplifyInstruction pass a callable that takes a vector of Value * and implicitly treats it as a vector of Constant *.  Feel free to go back the the previous version or come up with a better way to refactor simplifyInstruction.  My main motivation for the refactoring was to keep accesses to SimplifiedValues in one location, so that we can get data on how often does inlining actually simplifies a value to a constant. 


Repository:
  rL LLVM

https://reviews.llvm.org/D37198





More information about the llvm-commits mailing list