[LLVMdev] new methods for ScalarEvolutions
Preston Briggs
preston.briggs at gmail.com
Mon Apr 9 09:15:49 PDT 2012
Working on a dependence test, I wrote some code that looked like this:
const SCEV *delta = ...;
bool deltaMaybeZero = !SE->isKnownNonZero(delta);
bool deltaMaybePositive = !SE->isKnownNonPositive(delta);
bool deltaMaybeNegative = !SE->isKnownNonNegative(delta);
I'm really happy with the power of the SCEVs, letting me answer these
questions, but I'm unhappy with how the code reads, namely the double
negatives.
Perhaps we might introduce a handful of new methods, things like
*bool ScalarEvolution::isPerhapsZero(const SCEV *S) {*
* return !isKnownNonZero(S);*
* }*
Seem useful?
Preston
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120409/3403e9ac/attachment.html>
More information about the llvm-dev
mailing list