[PATCH] [ConstantRange] Split makeICmpRegion.
Nick Lewycky
nlewycky at google.com
Tue Mar 17 16:47:23 PDT 2015
================
Comment at: include/llvm/IR/ConstantRange.h:64
@@ +63,3 @@
+ /// Produce the smallest range such that all values that may satisfy the given
+ /// predicate with some value contained within Other is contained within the
+ /// returned range. Formally, this returns a superset of
----------------
Optional suggestion: ... predicate with *any* value contained within Other is contained *in* the ...
================
Comment at: include/llvm/IR/ConstantRange.h:70
@@ -65,6 +69,3 @@
///
- /// Solves for range X in 'for all x in X, there exists a y in Y such that
- /// icmp op x, y is true'. Every value that might make the comparison true
- /// is included in the resulting range.
- static ConstantRange makeICmpRegion(unsigned Pred,
- const ConstantRange &Other);
+ /// Example: Pred = ult and Other = i8 [2, 5) returns Result = [0, 5)
+ static ConstantRange makeAllowedICmpRegion(CmpInst::Predicate Pred,
----------------
Result = [0, 4) right? Or Pred = ule, either way?
================
Comment at: lib/IR/ConstantRange.cpp:122
@@ +121,3 @@
+ //
+ // ~(~A union ~B) == ~~(A intersect B) == A intersect B.
+ //
----------------
Optional: I'd leave out the "== ~~(A intersect B)" part.
http://reviews.llvm.org/D8345
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list