[llvm-commits] [llvm] r82660 - /llvm/trunk/lib/Transforms/Utils/InlineCost.cpp
Chris Lattner
clattner at apple.com
Wed Sep 23 22:36:34 PDT 2009
On Sep 23, 2009, at 10:35 PM, Evan Cheng wrote:
>
> On Sep 23, 2009, at 10:32 PM, Chris Lattner wrote:
>
>>
>> On Sep 23, 2009, at 3:05 PM, Dale Johannesen wrote:
>>
>>> Author: johannes
>>> Date: Wed Sep 23 17:05:24 2009
>>> New Revision: 82660
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=82660&view=rev
>>> Log:
>>> A minor improvment in accuracy to inline cost
>>> computation, and some cosmetics.
>>
>> Am I missing something here? It looks like you compute NumRets but
>> don't use it for anything...
>
> It's used:
>
>
>> + // A function with exactly one return has it removed during the
>> inlining
>> + // process (see InlineFunction), so don't count it.
>> + if (NumRets==1)
>> + --NumInsts;
Oh duh, I read that as "if NumRets == 1, --NumRets".
Thanks! :)
-Chris
More information about the llvm-commits
mailing list