[llvm] r254028 - [PGO] Fix build errors in x86_64-darwin
Rong Xu via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 24 15:31:36 PST 2015
Right. the shift should be i*8.
I'll revert this commit and do more test and fix.
-Rong
On Tue, Nov 24, 2015 at 3:25 PM, Xinliang David Li <xinliangli at gmail.com>
wrote:
>
>
> On Tue, Nov 24, 2015 at 1:55 PM, Rong Xu via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
>
>> 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));
>> }
>>
>
> This (the right shift) looks wrong (and regressed) -- can it be reason of
> the m32 build mismatch problems?
>
> David
>
>
>
>> }
>> JC.update(Indexes);
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151124/6dd7cbe6/attachment.html>
More information about the llvm-commits
mailing list