summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/CodeGen/CodeGenPGO.cpp16
-rw-r--r--clang/lib/CodeGen/CodeGenPGO.h2
-rw-r--r--clang/lib/Driver/ToolChains.cpp2
3 files changed, 10 insertions, 10 deletions
diff --git a/clang/lib/CodeGen/CodeGenPGO.cpp b/clang/lib/CodeGen/CodeGenPGO.cpp
index 96409fef64b..2dbe88cb277 100644
--- a/clang/lib/CodeGen/CodeGenPGO.cpp
+++ b/clang/lib/CodeGen/CodeGenPGO.cpp
@@ -178,7 +178,7 @@ void CodeGenPGO::setFuncName(llvm::Function *Fn) {
}
static llvm::Function *getRegisterFunc(CodeGenModule &CGM) {
- return CGM.getModule().getFunction("__llvm_pgo_register_functions");
+ return CGM.getModule().getFunction("__llvm_profile_register_functions");
}
static llvm::BasicBlock *getOrInsertRegisterBB(CodeGenModule &CGM) {
@@ -195,7 +195,7 @@ static llvm::BasicBlock *getOrInsertRegisterBB(CodeGenModule &CGM) {
auto *RegisterFTy = llvm::FunctionType::get(VoidTy, false);
auto *RegisterF = llvm::Function::Create(RegisterFTy,
llvm::GlobalValue::InternalLinkage,
- "__llvm_pgo_register_functions",
+ "__llvm_profile_register_functions",
&CGM.getModule());
RegisterF->setUnnamedAddr(true);
if (CGM.getCodeGenOpts().DisableRedZone)
@@ -212,7 +212,7 @@ static llvm::Constant *getOrInsertRuntimeRegister(CodeGenModule &CGM) {
auto *VoidTy = llvm::Type::getVoidTy(CGM.getLLVMContext());
auto *VoidPtrTy = llvm::Type::getInt8PtrTy(CGM.getLLVMContext());
auto *RuntimeRegisterTy = llvm::FunctionType::get(VoidTy, VoidPtrTy, false);
- return CGM.getModule().getOrInsertFunction("__llvm_pgo_register_function",
+ return CGM.getModule().getOrInsertFunction("__llvm_profile_register_function",
RuntimeRegisterTy);
}
@@ -221,15 +221,15 @@ static bool isMachO(const CodeGenModule &CGM) {
}
static StringRef getCountersSection(const CodeGenModule &CGM) {
- return isMachO(CGM) ? "__DATA,__llvm_pgo_cnts" : "__llvm_pgo_cnts";
+ return isMachO(CGM) ? "__DATA,__llvm_prf_cnts" : "__llvm_prf_cnts";
}
static StringRef getNameSection(const CodeGenModule &CGM) {
- return isMachO(CGM) ? "__DATA,__llvm_pgo_names" : "__llvm_pgo_names";
+ return isMachO(CGM) ? "__DATA,__llvm_prf_names" : "__llvm_prf_names";
}
static StringRef getDataSection(const CodeGenModule &CGM) {
- return isMachO(CGM) ? "__DATA,__llvm_pgo_data" : "__llvm_pgo_data";
+ return isMachO(CGM) ? "__DATA,__llvm_prf_data" : "__llvm_prf_data";
}
llvm::GlobalVariable *CodeGenPGO::buildDataVar() {
@@ -295,7 +295,7 @@ llvm::Function *CodeGenPGO::emitInitialization(CodeGenModule &CGM) {
return nullptr;
// Only need to create this once per module.
- if (CGM.getModule().getFunction("__llvm_pgo_init"))
+ if (CGM.getModule().getFunction("__llvm_profile_init"))
return nullptr;
// Get the function to call at initialization.
@@ -307,7 +307,7 @@ llvm::Function *CodeGenPGO::emitInitialization(CodeGenModule &CGM) {
auto *VoidTy = llvm::Type::getVoidTy(CGM.getLLVMContext());
auto *F = llvm::Function::Create(llvm::FunctionType::get(VoidTy, false),
llvm::GlobalValue::InternalLinkage,
- "__llvm_pgo_init", &CGM.getModule());
+ "__llvm_profile_init", &CGM.getModule());
F->setUnnamedAddr(true);
F->addFnAttr(llvm::Attribute::NoInline);
if (CGM.getCodeGenOpts().DisableRedZone)
diff --git a/clang/lib/CodeGen/CodeGenPGO.h b/clang/lib/CodeGen/CodeGenPGO.h
index e859324ae08..d22486d372d 100644
--- a/clang/lib/CodeGen/CodeGenPGO.h
+++ b/clang/lib/CodeGen/CodeGenPGO.h
@@ -83,7 +83,7 @@ public:
/// For functions with local linkage, this includes the main file name.
StringRef getFuncName() const { return StringRef(*PrefixedFuncName); }
std::string getFuncVarName(StringRef VarName) const {
- return ("__llvm_pgo_" + VarName + "_" + RawFuncName).str();
+ return ("__llvm_profile_" + VarName + "_" + RawFuncName).str();
}
/// Return the counter value of the current region.
diff --git a/clang/lib/Driver/ToolChains.cpp b/clang/lib/Driver/ToolChains.cpp
index 936acec3c52..4090a9ad1b8 100644
--- a/clang/lib/Driver/ToolChains.cpp
+++ b/clang/lib/Driver/ToolChains.cpp
@@ -329,7 +329,7 @@ void DarwinClang::AddLinkRuntimeLibArgs(const ArgList &Args,
// there are no calls to the runtime in the code.
if (Args.hasArg(options::OPT_fprofile_instr_generate)) {
CmdArgs.push_back("-u");
- CmdArgs.push_back("___llvm_pgo_runtime");
+ CmdArgs.push_back("___llvm_profile_runtime");
}
// Select the appropriate runtime library for the target.
OpenPOWER on IntegriCloud