mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-09 13:55:22 +00:00
Do not ignore arg_size() impact while counting bb instructions.
llvm-svn: 98408
This commit is contained in:
parent
9ffe22ec23
commit
e0b931e0ed
@ -142,7 +142,7 @@ static bool callIsSmall(const Function *F) {
|
||||
/// from the specified block.
|
||||
void CodeMetrics::analyzeBasicBlock(const BasicBlock *BB) {
|
||||
++NumBlocks;
|
||||
unsigned NumInstsInThisBB = 0;
|
||||
unsigned NumInstsBeforeThisBB = NumInsts;
|
||||
for (BasicBlock::const_iterator II = BB->begin(), E = BB->end();
|
||||
II != E; ++II) {
|
||||
if (isa<PHINode>(II)) continue; // PHI nodes don't count.
|
||||
@ -196,7 +196,6 @@ void CodeMetrics::analyzeBasicBlock(const BasicBlock *BB) {
|
||||
}
|
||||
|
||||
++NumInsts;
|
||||
++NumInstsInThisBB;
|
||||
}
|
||||
|
||||
if (isa<ReturnInst>(BB->getTerminator()))
|
||||
@ -211,7 +210,7 @@ void CodeMetrics::analyzeBasicBlock(const BasicBlock *BB) {
|
||||
NeverInline = true;
|
||||
|
||||
// Remember NumInsts for this BB.
|
||||
NumBBInsts[BB] = NumInstsInThisBB;
|
||||
NumBBInsts[BB] = NumInsts - NumInstsBeforeThisBB;
|
||||
}
|
||||
|
||||
/// analyzeFunction - Fill in the current structure with information gleaned
|
||||
|
Loading…
x
Reference in New Issue
Block a user