I believe this technically fixes a multithreaded race condition in this code. But my primary concern was as part of looking at removing the ability to treat Statistics like a plain unsigned. There are many weird operations on Statistics in the codebase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303314
91177308-0d34-0410-b5e6-
96231b3b80d8
if (unsigned Count = replaceDominatedUsesWith(
CondInst, TorF, DT, BasicBlockEdge(Pred, BB))) {
Changed = true;
- NumCSECVP = NumCSECVP + Count;
+ NumCSECVP += Count;
}
}
}
L.Load->replaceAllUsesWith(V);
}
- NumLoadsCombined = NumLoadsCombined + Loads.size();
+ NumLoadsCombined += Loads.size();
return true;
}