[llvm] r292803 - Refactor SampleProfile.cpp to move computation inside a branch. (NFC)

Evgenii Stepanov via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 23 14:52:20 PST 2017


Reverted in r292840.

On Mon, Jan 23, 2017 at 10:58 AM, Evgenii Stepanov
<eugeni.stepanov at gmail.com> wrote:
> Hi,
>
> this is failing MSan:
> http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/2275/steps/check-llvm%20msan/logs/stdio
>
> On Mon, Jan 23, 2017 at 9:09 AM, Dehao Chen via llvm-commits
> <llvm-commits at lists.llvm.org> wrote:
>> Author: dehao
>> Date: Mon Jan 23 11:09:02 2017
>> New Revision: 292803
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=292803&view=rev
>> Log:
>> Refactor SampleProfile.cpp to move computation inside a branch. (NFC)
>>
>> Modified:
>>     llvm/trunk/lib/Transforms/IPO/SampleProfile.cpp
>>
>> Modified: llvm/trunk/lib/Transforms/IPO/SampleProfile.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/SampleProfile.cpp?rev=292803&r1=292802&r2=292803&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Transforms/IPO/SampleProfile.cpp (original)
>> +++ llvm/trunk/lib/Transforms/IPO/SampleProfile.cpp Mon Jan 23 11:09:02 2017
>> @@ -651,9 +651,9 @@ bool SampleProfileLoader::inlineHotFunct
>>        Function *CalledFunction = CS.getCalledFunction();
>>        if (!CalledFunction || !CalledFunction->getSubprogram())
>>          continue;
>> -      DebugLoc DLoc = I->getDebugLoc();
>> -      uint64_t NumSamples = findCalleeFunctionSamples(*I)->getTotalSamples();
>>        if (InlineFunction(CS, IFI)) {
>> +        DebugLoc DLoc = I->getDebugLoc();
>> +        uint64_t NumSamples = findCalleeFunctionSamples(*I)->getTotalSamples();
>>          LocalChanged = true;
>>          emitOptimizationRemark(Ctx, DEBUG_TYPE, F, DLoc,
>>                                 Twine("inlined hot callee '") +
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits


More information about the llvm-commits mailing list