[Statistics] Use Statistic::operator+= instead of adding and assigning separately.
authorCraig Topper <craig.topper@gmail.com>
Wed, 17 May 2017 23:22:10 +0000 (23:22 +0000)
committerCraig Topper <craig.topper@gmail.com>
Wed, 17 May 2017 23:22:10 +0000 (23:22 +0000)
commit48187cffe2b55d99c655ad38aeca308d02303e95
treeccf3f94fefa8ca5683dbf50093ce552e774f1bba
parenta072d13e5467e7cb0a3d3612c525158b35f03723
[Statistics] Use Statistic::operator+= instead of adding and assigning separately.

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.

llvm-svn: 303314
llvm/lib/Transforms/Scalar/EarlyCSE.cpp
llvm/lib/Transforms/Scalar/LoadCombine.cpp