[llvm-commits] [llvm] r98401 - in /llvm/trunk: include/llvm/Analysis/InlineCost.h lib/Analysis/InlineCost.cpp
Evan Cheng
evan.cheng at apple.com
Tue Mar 16 11:06:37 PDT 2010
Fixed?
Evan
On Mar 12, 2010, at 4:37 PM, Jakob Stoklund Olesen wrote:
>>
>>
>> @@ -142,7 +142,7 @@
>> /// from the specified block.
>> void CodeMetrics::analyzeBasicBlock(const BasicBlock *BB) {
>> ++NumBlocks;
>> -
>> + unsigned NumInstsInThisBB = 0;
>> for (BasicBlock::const_iterator II = BB->begin(), E = BB->end();
>> II != E; ++II) {
>> if (isa<PHINode>(II)) continue; // PHI nodes don't count.
>> @@ -196,6 +196,7 @@
>> }
>>
>> ++NumInsts;
>> + ++NumInstsInThisBB;
>
> I think you should also include 'NumInsts += InlineConstants::CallPenalty + CS.arg_size();' for consistency.
>
> /jakob
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list