COFF: ICF: Print out the number of iterations. NFC.

llvm-svn: 247868
This commit is contained in:
Rui Ueyama 2015-09-16 23:55:39 +00:00
parent f90c1be78c
commit 66c06ceaca
1 changed files with 5 additions and 3 deletions

View File

@ -77,8 +77,6 @@ private:
// Entry point to ICF. // Entry point to ICF.
void doICF(const std::vector<Chunk *> &Chunks) { void doICF(const std::vector<Chunk *> &Chunks) {
if (Config->Verbose)
llvm::outs() << "\nICF\n";
ICF(Chunks).run(); ICF(Chunks).run();
} }
@ -200,8 +198,12 @@ void ICF::run() {
} }
// Split groups until we get a convergence. // Split groups until we get a convergence.
int Cnt = 1;
forEachGroup(SChunks, equalsConstant); forEachGroup(SChunks, equalsConstant);
while (forEachGroup(SChunks, equalsVariable)); while (forEachGroup(SChunks, equalsVariable))
++Cnt;
if (Config->Verbose)
llvm::outs() << "\nICF needed " << Cnt << " iterations.\n";
// Merge sections in the same group. // Merge sections in the same group.
for (auto It = SChunks.begin(), End = SChunks.end(); It != End;) { for (auto It = SChunks.begin(), End = SChunks.end(); It != End;) {