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
`