[PATCH] D16204: ValueTracking: Use fixed array for assumption exclude set in Query; NFC
Matthias Braun via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 27 22:32:55 PST 2016
MatzeB marked 5 inline comments as done.
MatzeB added a comment.
Thanks for the review!
Comment at: lib/Analysis/ValueTracking.cpp:121
@@ -111,1 +120,3 @@
+ auto End = Excluded.begin() + NumExcluded;
+ return std::find(Excluded.begin(), End, Value) != End;
> If you zero initialize the array, you can simply this by just scanning the extra elements. (optional)
> Adding an early exit when NumExcluded == 0 is likely to be worthwhile.
Initializing the array is something I avoid on purpose here because in the huge majority of the case the array is not used at all.
More information about the llvm-commits