[PATCH] D36656: [SCCP] Propagate integer range information in IPSCCP (WIP).
    Sanjoy Das via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Sun Aug 13 15:40:52 PDT 2017
    
    
  
sanjoy added inline comments.
================
Comment at: lib/Transforms/Scalar/SCCP.cpp:86
+
+  Constant *ConstPtr;
+  std::pair<long, long> ConstRange;
----------------
Use llvm::ConstantRange here.
================
Comment at: lib/Transforms/Scalar/SCCP.cpp:1913
+        }
         if (!AI->use_empty() && tryToReplaceWithConstant(Solver, &*AI))
           ++IPNumArgsElimed;
----------------
Design-wise I personally think it would be better if you instead had a second `tryToReplaceWithConstantRange` helper that propagated the range information and folded ICmps etc. wherever possible; instead of creating assumes.
But let's see what other folks think.
https://reviews.llvm.org/D36656
    
    
More information about the llvm-commits
mailing list