[PATCH] D14476: [LVI] Introduce an intersect operation on lattice values
Sanjoy Das via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 10 10:31:14 PST 2015
sanjoy added inline comments.
================
Comment at: lib/Analysis/LazyValueInfo.cpp:1019
@@ +1018,3 @@
+ // TODO: Arbitrary choice, could be improved
+ return A;
+ }
----------------
I was suggesting putting the return inside the if -- the rule I was suggesting was that if one of the values is not a ConstantRange and the other one isn't then return the one that //is// a constantrange. However, after re-reading the code it looks like you'll enter the `if` only with either two `nonconstant` s or one `nonconstant` and one `constantrange`. With that in mind, I'm not sure if my suggestion is actually useful -- both a `constantrange` and `nonconstant` are equally "good" I think.
================
Comment at: lib/Analysis/LazyValueInfo.cpp:1041
@@ +1040,3 @@
+ LVILatticeVal LocalResult;
+ // Never new work to push, just fallthrough
+ (void) getEdgeValueLocal(Val, BBFrom, BBTo, LocalResult);
----------------
Fixing as a follow on change is fine.
http://reviews.llvm.org/D14476
More information about the llvm-commits
mailing list