Skip to content

Commit 38cd364

Browse files
committed
[LegacyPassManager] Small ModuleCount cleanup
llvm-svn: 365907
1 parent 614a78c commit 38cd364

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

llvm/lib/IR/LegacyPassManager.cpp

+3-5
Original file line numberDiff line numberDiff line change
@@ -1727,14 +1727,12 @@ MPPassManager::runOnModule(Module &M) {
17271727
for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index)
17281728
Changed |= getContainedPass(Index)->doInitialization(M);
17291729

1730-
unsigned InstrCount, ModuleCount = 0;
1730+
unsigned InstrCount;
17311731
StringMap<std::pair<unsigned, unsigned>> FunctionToInstrCount;
17321732
bool EmitICRemark = M.shouldEmitInstrCountChangedRemark();
17331733
// Collect the initial size of the module.
1734-
if (EmitICRemark) {
1734+
if (EmitICRemark)
17351735
InstrCount = initSizeRemarkInfo(M, FunctionToInstrCount);
1736-
ModuleCount = InstrCount;
1737-
}
17381736

17391737
for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) {
17401738
ModulePass *MP = getContainedPass(Index);
@@ -1752,7 +1750,7 @@ MPPassManager::runOnModule(Module &M) {
17521750
LocalChanged |= MP->runOnModule(M);
17531751
if (EmitICRemark) {
17541752
// Update the size of the module.
1755-
ModuleCount = M.getInstructionCount();
1753+
unsigned ModuleCount = M.getInstructionCount();
17561754
if (ModuleCount != InstrCount) {
17571755
int64_t Delta = static_cast<int64_t>(ModuleCount) -
17581756
static_cast<int64_t>(InstrCount);

0 commit comments

Comments
 (0)