[llvm-commits] [llvm] r147037 - /llvm/trunk/lib/Analysis/InlineCost.cpp

Nick Lewycky nicholas at mxc.ca
Wed Dec 21 12:03:50 PST 2011


On 12/21/2011 10:04 AM, Jakob Stoklund Olesen wrote:
>
> On Dec 20, 2011, at 10:06 PM, Nick Lewycky wrote:
>
>> Author: nicholas
>> Date: Wed Dec 21 00:06:30 2011
>> New Revision: 147037
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=147037&view=rev
>> Log:
>> A call to a function marked 'noinline' is not an inline candidate. The sole
>> call site of an intrinsic is also not an inline candidate. While here, make it
>> more obvious that this code ignores all intrinsics. Noticed by inspection!
>>
>> Modified:
>>     llvm/trunk/lib/Analysis/InlineCost.cpp
>>
>> Modified: llvm/trunk/lib/Analysis/InlineCost.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/InlineCost.cpp?rev=147037&r1=147036&r2=147037&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Analysis/InlineCost.cpp (original)
>> +++ llvm/trunk/lib/Analysis/InlineCost.cpp Wed Dec 21 00:06:30 2011
>> @@ -63,8 +63,8 @@
>>
>>      // Special handling for calls.
>>      if (isa<CallInst>(II) || isa<InvokeInst>(II)) {
>> -      if (isa<DbgInfoIntrinsic>(II))
>> -        continue;  // Debug intrinsics don't count as size.
>> +      if (isa<IntrinsicInst>(II))
>> +        continue;  // Intrinsics have no argument setup and can't be inlined.
>
> This change doesn't make sense. You are skipping a lot more loop below this continue, effectively ignoring all intrinsics.
>
> The code did /not/ ignore intrinsics before.

You are correct! Sorry, I'll go back and fix this properly, thanks for 
the review!

Nick



More information about the llvm-commits mailing list