================
@@ -24,15 +24,38 @@
using namespace llvm;
-/// Get the __llvm_prf_cnts section.
-Expected<object::SectionRef> getCountersSection(const object::ObjectFile &Obj)
{
+namespace llvm {
+// Deprecated. Use -profile-correlate=debug-info.
+cl::opt<bool> DebugInfoCorrelate(
+ "debug-info-correlate",
+ cl::desc("Use debug info to correlate profiles (Deprecated). Use "
+ "-profile-correlate=debug-info instead."),
+ cl::init(false));
+
+cl::opt<InstrProfCorrelator::ProfCorrelatorKind> ProfileCorrelate(
+ "profile-correlate",
+ cl::desc("Use debug info or binary file to correlate profiles."),
+ cl::init(InstrProfCorrelator::NONE),
+ cl::values(clEnumValN(InstrProfCorrelator::NONE, "",
+ "No profile correlation"),
+ clEnumValN(InstrProfCorrelator::DEBUG_INFO, "debug-info",
+ "Use debug info to correlate")));
----------------
ZequanWu wrote:
Using extern decl of `ProfileCorrelate` in `TargetLoweringObjectFileImpl.cpp`
doesn't work for binary correlation when linking
`unittests/Target/PowerPC/PowerPCTests` because `InstrProfiling.o` which
contains the definition is not linked for PowerPCTests.
https://github.com/llvm/llvm-project/pull/69656
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits