Chromium Code Reviews| Index: src/IceCfgNode.cpp |
| diff --git a/src/IceCfgNode.cpp b/src/IceCfgNode.cpp |
| index f6b4a98b46bae12bbeb9fccf87b0587999654089..4de2f577db3c4cbaedbf0939947b8d20fb08e3e1 100644 |
| --- a/src/IceCfgNode.cpp |
| +++ b/src/IceCfgNode.cpp |
| @@ -483,6 +483,21 @@ void CfgNode::emit(Cfg *Func) const { |
| if (Inst->isRedundantAssign()) |
| continue; |
| (*I)->emit(Func); |
| + // Update emitted instruction count, plus fill/spill count for |
| + // Variable operands without a physical register. |
| + if (uint32_t Count = (*I)->getEmitInstCount()) { |
|
jvoung (off chromium)
2014/09/17 01:21:12
At some point we'll have to have a convention for
|
| + Func->getContext()->statsUpdateEmitted(Count); |
| + if (Variable *Dest = (*I)->getDest()) { |
| + if (!Dest->hasReg()) |
| + Func->getContext()->statsUpdateFills(); |
| + } |
| + for (SizeT S = 0; S < (*I)->getSrcSize(); ++S) { |
| + if (Variable *Src = llvm::dyn_cast<Variable>((*I)->getSrc(S))) { |
| + if (!Src->hasReg()) |
| + Func->getContext()->statsUpdateSpills(); |
| + } |
| + } |
| + } |
| } |
| } |