[llvm] r303197 - ShrinkWrap: Add skipFunction() call

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Tue May 16 14:07:03 PDT 2017


r303208

> On May 16, 2017, at 1:40 PM, Quentin Colombet via llvm-commits <llvm-commits at lists.llvm.org> wrote:
> 
> Could you add a test case?
>> On May 16, 2017, at 11:43 AM, Matthias Braun via llvm-commits <llvm-commits at lists.llvm.org> wrote:
>> 
>> Author: matze
>> Date: Tue May 16 13:43:30 2017
>> New Revision: 303197
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=303197&view=rev
>> Log:
>> ShrinkWrap: Add skipFunction() call
>> 
>> ShrinkWrapping is a performance optimization that can safely be skipped,
>> so we can add `if (!skipFunction()) return;`
>> 
>> Modified:
>>   llvm/trunk/lib/CodeGen/ShrinkWrap.cpp
>> 
>> Modified: llvm/trunk/lib/CodeGen/ShrinkWrap.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ShrinkWrap.cpp?rev=303197&r1=303196&r2=303197&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/CodeGen/ShrinkWrap.cpp (original)
>> +++ llvm/trunk/lib/CodeGen/ShrinkWrap.cpp Tue May 16 13:43:30 2017
>> @@ -425,7 +425,7 @@ static bool isIrreducibleCFG(const Machi
>> }
>> 
>> bool ShrinkWrap::runOnMachineFunction(MachineFunction &MF) {
>> -  if (MF.empty() || !isShrinkWrapEnabled(MF))
>> +  if (skipFunction(*MF.getFunction()) || MF.empty() || !isShrinkWrapEnabled(MF))
>>    return false;
>> 
>>  DEBUG(dbgs() << "**** Analysing " << MF.getName() << '\n');
>> 
>> 
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
> 
> _______________________________________________
> 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