[llvm-commits] [llvm] r165784 - /llvm/trunk/lib/Analysis/DependenceAnalysis.cpp
Sebastian Pop
spop at codeaurora.org
Thu Oct 11 19:04:32 PDT 2012
Author: spop
Date: Thu Oct 11 21:04:32 2012
New Revision: 165784
URL: http://llvm.org/viewvc/llvm-project?rev=165784&view=rev
Log:
fix warning
DependenceAnalysis.cpp:1164:32: warning: implicit truncation from 'int' to bitfield changes value from -5 to 3
[-Wconstant-conversion]
Result.DV[Level].Direction &= ~Dependence::DVEntry::GT;
^ ~~~~~~~~~~~~~~~~~~~~~~~~
Patch from Preston Briggs <preston.briggs at gmail.com>.
Modified:
llvm/trunk/lib/Analysis/DependenceAnalysis.cpp
Modified: llvm/trunk/lib/Analysis/DependenceAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/DependenceAnalysis.cpp?rev=165784&r1=165783&r2=165784&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/DependenceAnalysis.cpp (original)
+++ llvm/trunk/lib/Analysis/DependenceAnalysis.cpp Thu Oct 11 21:04:32 2012
@@ -1160,8 +1160,8 @@
DEBUG(dbgs() << "\t Delta = " << *Delta << "\n");
NewConstraint.setLine(Coeff, Coeff, Delta, CurLoop);
if (Delta->isZero()) {
- Result.DV[Level].Direction &= ~Dependence::DVEntry::LT;
- Result.DV[Level].Direction &= ~Dependence::DVEntry::GT;
+ Result.DV[Level].Direction &= unsigned(~Dependence::DVEntry::LT);
+ Result.DV[Level].Direction &= unsigned(~Dependence::DVEntry::GT);
++WeakCrossingSIVsuccesses;
if (!Result.DV[Level].Direction) {
++WeakCrossingSIVindependence;
@@ -1222,8 +1222,8 @@
}
if (isKnownPredicate(CmpInst::ICMP_EQ, Delta, ML)) {
// i = i' = UB
- Result.DV[Level].Direction &= ~Dependence::DVEntry::LT;
- Result.DV[Level].Direction &= ~Dependence::DVEntry::GT;
+ Result.DV[Level].Direction &= unsigned(~Dependence::DVEntry::LT);
+ Result.DV[Level].Direction &= unsigned(~Dependence::DVEntry::GT);
++WeakCrossingSIVsuccesses;
if (!Result.DV[Level].Direction) {
++WeakCrossingSIVindependence;
@@ -1256,7 +1256,7 @@
DEBUG(dbgs() << "\t Remainder = " << Remainder << "\n");
if (Remainder != 0) {
// Equal direction isn't possible
- Result.DV[Level].Direction &= ~Dependence::DVEntry::EQ;
+ Result.DV[Level].Direction &= unsigned(~Dependence::DVEntry::EQ);
++WeakCrossingSIVsuccesses;
}
return false;
@@ -2380,7 +2380,7 @@
DEBUG(dbgs() << "\tRemainder = " << Remainder << "\n");
if (Remainder != 0) {
unsigned Level = mapSrcLoop(CurLoop);
- Result.DV[Level - 1].Direction &= ~Dependence::DVEntry::EQ;
+ Result.DV[Level - 1].Direction &= unsigned(~Dependence::DVEntry::EQ);
Improved = true;
}
}
More information about the llvm-commits
mailing list