[PATCH] D37198: [InlineCost] add visitSelectInst()
    Easwaran Raman via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Sep 13 15:51:25 PDT 2017
    
    
  
eraman added inline comments.
================
Comment at: lib/Analysis/InlineCost.cpp:1182
+
+  Constant *TrueC = isa<Constant>(TrueVal) ? cast<Constant>(TrueVal)
+                                           : SimplifiedValues.lookup(TrueVal);
----------------
I added simplifyInstruction to handle instruction simplification with constant values.  Now, it handles cases only when all the operands are constants - either as such or after looking up SimplifiedValues. It  can be extended to handle cases like this where you don't need all operands to be constants. May be add a bool to indicate whether it should call the Callable even if all operands are not constants and use that here?
Repository:
  rL LLVM
https://reviews.llvm.org/D37198
    
    
More information about the llvm-commits
mailing list