@@ -69,14 +69,6 @@ namespace llvm {
6969// Command line option to enable vtable value profiling. Defined in
7070// ProfileData/InstrProf.cpp: -enable-vtable-value-profiling=
7171extern cl::opt<bool > EnableVTableValueProfiling;
72- // TODO: Remove -debug-info-correlate in next LLVM release, in favor of
73- // -profile-correlate=debug-info.
74- cl::opt<bool > DebugInfoCorrelate (
75- " debug-info-correlate" ,
76- cl::desc (" Use debug info to correlate profiles. (Deprecated, use "
77- " -profile-correlate=debug-info)" ),
78- cl::init(false ));
79-
8072LLVM_ABI cl::opt<InstrProfCorrelator::ProfCorrelatorKind> ProfileCorrelate (
8173 " profile-correlate" ,
8274 cl::desc (" Use debug info or binary file to correlate profiles." ),
@@ -1047,7 +1039,7 @@ void InstrLowerer::lowerValueProfileInst(InstrProfValueProfileInst *Ind) {
10471039 // in lightweight mode. We need to move the value profile pointer to the
10481040 // Counter struct to get this working.
10491041 assert (
1050- !DebugInfoCorrelate && ProfileCorrelate == InstrProfCorrelator::NONE &&
1042+ ProfileCorrelate == InstrProfCorrelator::NONE &&
10511043 " Value profiling is not yet supported with lightweight instrumentation" );
10521044 GlobalVariable *Name = Ind->getName ();
10531045 auto It = ProfileDataMap.find (Name);
@@ -1504,7 +1496,7 @@ static inline Constant *getVTableAddrForProfData(GlobalVariable *GV) {
15041496}
15051497
15061498void InstrLowerer::getOrCreateVTableProfData (GlobalVariable *GV) {
1507- assert (!DebugInfoCorrelate &&
1499+ assert (ProfileCorrelate != InstrProfCorrelator::DEBUG_INFO &&
15081500 " Value profiling is not supported with lightweight instrumentation" );
15091501 if (GV->isDeclaration () || GV->hasAvailableExternallyLinkage ())
15101502 return ;
@@ -1584,8 +1576,7 @@ GlobalVariable *InstrLowerer::setupProfileSection(InstrProfInstBase *Inc,
15841576
15851577 // Use internal rather than private linkage so the counter variable shows up
15861578 // in the symbol table when using debug info for correlation.
1587- if ((DebugInfoCorrelate ||
1588- ProfileCorrelate == InstrProfCorrelator::DEBUG_INFO) &&
1579+ if (ProfileCorrelate == InstrProfCorrelator::DEBUG_INFO &&
15891580 TT.isOSBinFormatMachO () && Linkage == GlobalValue::PrivateLinkage)
15901581 Linkage = GlobalValue::InternalLinkage;
15911582
@@ -1691,8 +1682,7 @@ InstrLowerer::getOrCreateRegionCounters(InstrProfCntrInstBase *Inc) {
16911682 auto *CounterPtr = setupProfileSection (Inc, IPSK_cnts);
16921683 PD.RegionCounters = CounterPtr;
16931684
1694- if (DebugInfoCorrelate ||
1695- ProfileCorrelate == InstrProfCorrelator::DEBUG_INFO) {
1685+ if (ProfileCorrelate == InstrProfCorrelator::DEBUG_INFO) {
16961686 LLVMContext &Ctx = M.getContext ();
16971687 Function *Fn = Inc->getParent ()->getParent ();
16981688 if (auto *SP = Fn->getSubprogram ()) {
@@ -1737,7 +1727,7 @@ InstrLowerer::getOrCreateRegionCounters(InstrProfCntrInstBase *Inc) {
17371727void InstrLowerer::createDataVariable (InstrProfCntrInstBase *Inc) {
17381728 // When debug information is correlated to profile data, a data variable
17391729 // is not needed.
1740- if (DebugInfoCorrelate || ProfileCorrelate == InstrProfCorrelator::DEBUG_INFO)
1730+ if (ProfileCorrelate == InstrProfCorrelator::DEBUG_INFO)
17411731 return ;
17421732
17431733 GlobalVariable *NamePtr = Inc->getName ();
0 commit comments