/// has a direction (or perhaps a union of several directions), and
/// perhaps a distance.
struct DVEntry {
- enum { NONE = 0,
- LT = 1,
- EQ = 2,
- LE = 3,
- GT = 4,
- NE = 5,
- GE = 6,
- ALL = 7 };
+ enum : unsigned char {
+ NONE = 0,
+ LT = 1,
+ EQ = 2,
+ LE = 3,
+ GT = 4,
+ NE = 5,
+ GE = 6,
+ ALL = 7
+ };
unsigned char Direction : 3; // Init to ALL, then refine.
bool Scalar : 1; // Init to true.
bool PeelFirst : 1; // Peeling the first iteration will break dependence.
LLVM_DEBUG(dbgs() << "\t Delta = " << *Delta << "\n");
NewConstraint.setLine(Coeff, Coeff, Delta, CurLoop);
if (Delta->isZero()) {
- Result.DV[Level].Direction &= unsigned(~Dependence::DVEntry::LT);
- Result.DV[Level].Direction &= unsigned(~Dependence::DVEntry::GT);
+ Result.DV[Level].Direction &= ~Dependence::DVEntry::LT;
+ Result.DV[Level].Direction &= ~Dependence::DVEntry::GT;
++WeakCrossingSIVsuccesses;
if (!Result.DV[Level].Direction) {
++WeakCrossingSIVindependence;
}
if (isKnownPredicate(CmpInst::ICMP_EQ, Delta, ML)) {
// i = i' = UB
- Result.DV[Level].Direction &= unsigned(~Dependence::DVEntry::LT);
- Result.DV[Level].Direction &= unsigned(~Dependence::DVEntry::GT);
+ Result.DV[Level].Direction &= ~Dependence::DVEntry::LT;
+ Result.DV[Level].Direction &= ~Dependence::DVEntry::GT;
++WeakCrossingSIVsuccesses;
if (!Result.DV[Level].Direction) {
++WeakCrossingSIVindependence;
LLVM_DEBUG(dbgs() << "\t Remainder = " << Remainder << "\n");
if (Remainder != 0) {
// Equal direction isn't possible
- Result.DV[Level].Direction &= unsigned(~Dependence::DVEntry::EQ);
+ Result.DV[Level].Direction &= ~Dependence::DVEntry::EQ;
++WeakCrossingSIVsuccesses;
}
return false;
LLVM_DEBUG(dbgs() << "\tRemainder = " << Remainder << "\n");
if (Remainder != 0) {
unsigned Level = mapSrcLoop(CurLoop);
- Result.DV[Level - 1].Direction &= unsigned(~Dependence::DVEntry::EQ);
+ Result.DV[Level - 1].Direction &= ~Dependence::DVEntry::EQ;
Improved = true;
}
}