summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Instrumentation
diff options
context:
space:
mode:
authorRong Xu <xur@google.com>2016-02-08 23:11:16 +0000
committerRong Xu <xur@google.com>2016-02-08 23:11:16 +0000
commitd0dfb67fe18e24de6e45d6cfaca8ef91f36cbd26 (patch)
treea8c2d74dd528081fae5ca618885afa116b127f7a /llvm/lib/Transforms/Instrumentation
parent1da4afdfc9fe6cb8848e9fb7aa55ff53d06bd16b (diff)
downloadbcm5719-llvm-d0dfb67fe18e24de6e45d6cfaca8ef91f36cbd26.tar.gz
bcm5719-llvm-d0dfb67fe18e24de6e45d6cfaca8ef91f36cbd26.zip
[PGO] Revert r260146 as it breaks Darwin platforms.
r260146 | xur | 2016-02-08 13:07:46 -0800 (Mon, 08 Feb 2016) | 13 lines [PGO] Differentiate Clang instrumentation and IR level instrumentation profiles llvm-svn: 260170
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation')
-rw-r--r--llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp22
1 files changed, 0 insertions, 22 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp b/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
index 99c9e3eab74..f9e421df354 100644
--- a/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
+++ b/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
@@ -713,22 +713,7 @@ void PGOUseFunc::setBranchWeights() {
}
} // end anonymous namespace
-// Create a COMDAT variable IR_LEVEL_PROF_VARNAME to make the runtime
-// aware this is an ir_level profile so it can set the version flag.
-static void createIRLevelProfileFlagVariable(Module &M) {
- Type *IntTy64 = Type::getInt64Ty(M.getContext());
- uint64_t ProfileVersion = (INSTR_PROF_RAW_VERSION | VARIANT_MASK_IR_PROF);
- auto IRLevelVersionVariable =
- new GlobalVariable(M, IntTy64, true, GlobalVariable::ExternalLinkage,
- Constant::getIntegerValue(IntTy64, APInt(64, ProfileVersion)),
- INSTR_PROF_QUOTE(IR_LEVEL_PROF_VERSION_VAR));
- IRLevelVersionVariable->setVisibility(GlobalValue::DefaultVisibility);
- IRLevelVersionVariable->setComdat(
- M.getOrInsertComdat(StringRef(INSTR_PROF_QUOTE(IR_LEVEL_PROF_VERSION_VAR))));
-}
-
bool PGOInstrumentationGen::runOnModule(Module &M) {
- createIRLevelProfileFlagVariable(M);
for (auto &F : M) {
if (F.isDeclaration())
continue;
@@ -766,13 +751,6 @@ bool PGOInstrumentationUse::runOnModule(Module &M) {
"Cannot get PGOReader"));
return false;
}
- // TODO: might need to change the warning once the clang option is finalized.
- if (!PGOReader->isIRLevelProfile()) {
- Ctx.diagnose(DiagnosticInfoPGOProfile(
- ProfileFileName.data(), "Not an IR level instrumentation profile"));
- return false;
- }
-
for (auto &F : M) {
if (F.isDeclaration())
OpenPOWER on IntegriCloud