[llvm] r254028 - [PGO] Fix build errors in x86_64-darwin
Rong Xu via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 24 13:55:50 PST 2015
Author: xur
Date: Tue Nov 24 15:55:50 2015
New Revision: 254028
URL: http://llvm.org/viewvc/llvm-project?rev=254028&view=rev
Log:
[PGO] Fix build errors in x86_64-darwin
Fix buildbot failure for x86_64-darwin due to r254021
Modified:
llvm/trunk/lib/Transforms/Instrumentation/CFGMST.h
llvm/trunk/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
Modified: llvm/trunk/lib/Transforms/Instrumentation/CFGMST.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/CFGMST.h?rev=254028&r1=254027&r2=254028&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/CFGMST.h (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/CFGMST.h Tue Nov 24 15:55:50 2015
@@ -97,7 +97,7 @@ public:
uint64_t BBWeight = BFI->getBlockFreq(&*BB).getFrequency();
uint64_t Weight;
if (int successors = TI->getNumSuccessors()) {
- for (uint32_t i = 0; i != successors; ++i) {
+ for (int i = 0; i != successors; ++i) {
BasicBlock *TargetBB = TI->getSuccessor(i);
bool Critical = isCriticalEdge(TI, i);
uint64_t scaleFactor = BBWeight;
Modified: llvm/trunk/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/PGOInstrumentation.cpp?rev=254028&r1=254027&r2=254028&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/PGOInstrumentation.cpp (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/PGOInstrumentation.cpp Tue Nov 24 15:55:50 2015
@@ -264,8 +264,8 @@ void FuncPGOInstrumentation<Edge, BBInfo
for (unsigned s = 0, e = TI->getNumSuccessors(); s != e; ++s) {
BasicBlock *Succ = TI->getSuccessor(s);
uint32_t Index = getBBInfo(Succ).Index;
- for (int i = 0; i < sizeof(uint32_t) / sizeof(char); i++)
- Indexes.push_back((char)(Index >> (i * sizeof(char))));
+ for (int i = 0; i < 4; i++)
+ Indexes.push_back((char)(Index >> i));
}
}
JC.update(Indexes);
More information about the llvm-commits
mailing list