@@ -171,9 +171,10 @@ static cl::opt<std::string>
171171 cl::desc (" The default memprof options" ),
172172 cl::Hidden, cl::init(" " ));
173173
174- static cl::opt<bool > UndriftProfile (" memprof-undrift-profile" ,
175- cl::desc (" Undrift MemProf profile" ),
176- cl::init(false ), cl::Hidden);
174+ static cl::opt<bool >
175+ SalvageStaleProfile (" memprof-salvage-stale-profile" ,
176+ cl::desc (" Salvage stale MemProf profile" ),
177+ cl::init(false ), cl::Hidden);
177178
178179extern cl::opt<bool > MemProfReportHintedSizes;
179180
@@ -992,7 +993,7 @@ readMemprof(Module &M, Function &F, IndexedInstrProfReader *MemProfReader,
992993
993994 // If requested, undrfit MemProfRecord so that the source locations in it
994995 // match those in the IR.
995- if (UndriftProfile )
996+ if (SalvageStaleProfile )
996997 undriftMemProfRecord (UndriftMaps, *MemProfRec);
997998
998999 // Detect if there are non-zero column numbers in the profile. If not,
@@ -1215,7 +1216,7 @@ PreservedAnalyses MemProfUsePass::run(Module &M, ModuleAnalysisManager &AM) {
12151216
12161217 TargetLibraryInfo &TLI = FAM.getResult <TargetLibraryAnalysis>(*M.begin ());
12171218 DenseMap<uint64_t , LocToLocMap> UndriftMaps;
1218- if (UndriftProfile )
1219+ if (SalvageStaleProfile )
12191220 UndriftMaps = computeUndriftMap (M, MemProfReader.get (), TLI);
12201221
12211222 // Map from the stack has of each allocation context in the function profiles
0 commit comments