[llvm] r355346 - [NFC] Fix PGO link error in shared libs build
Jordan Rupprecht via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 4 14:54:44 PST 2019
Author: rupprecht
Date: Mon Mar 4 14:54:44 2019
New Revision: 355346
URL: http://llvm.org/viewvc/llvm-project?rev=355346&view=rev
Log:
[NFC] Fix PGO link error in shared libs build
Modified:
llvm/trunk/include/llvm/Transforms/Instrumentation/PGOInstrumentation.h
llvm/trunk/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
Modified: llvm/trunk/include/llvm/Transforms/Instrumentation/PGOInstrumentation.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/Instrumentation/PGOInstrumentation.h?rev=355346&r1=355345&r2=355346&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/Instrumentation/PGOInstrumentation.h (original)
+++ llvm/trunk/include/llvm/Transforms/Instrumentation/PGOInstrumentation.h Mon Mar 4 14:54:44 2019
@@ -17,7 +17,6 @@
#include "llvm/ADT/ArrayRef.h"
#include "llvm/IR/PassManager.h"
-#include "llvm/ProfileData/InstrProf.h"
#include <cstdint>
#include <string>
@@ -38,11 +37,7 @@ class PGOInstrumentationGenCreateVar
public:
PGOInstrumentationGenCreateVar(std::string CSInstrName = "")
: CSInstrName(CSInstrName) {}
- PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM) {
- createProfileFileNameVar(M, CSInstrName);
- createIRLevelProfileFlagVar(M, /* IsCS */ true);
- return PreservedAnalyses::all();
- }
+ PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
private:
std::string CSInstrName;
Modified: llvm/trunk/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/PGOInstrumentation.cpp?rev=355346&r1=355345&r2=355346&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/PGOInstrumentation.cpp (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/PGOInstrumentation.cpp Mon Mar 4 14:54:44 2019
@@ -47,7 +47,6 @@
//
//===----------------------------------------------------------------------===//
-#include "llvm/Transforms/Instrumentation/PGOInstrumentation.h"
#include "CFGMST.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/ArrayRef.h"
@@ -107,6 +106,7 @@
#include "llvm/Support/JamCRC.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Transforms/Instrumentation.h"
+#include "llvm/Transforms/Instrumentation/PGOInstrumentation.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
#include <algorithm>
#include <cassert>
@@ -1477,6 +1477,13 @@ static bool InstrumentAllFunctions(
return true;
}
+PreservedAnalyses
+PGOInstrumentationGenCreateVar::run(Module &M, ModuleAnalysisManager &AM) {
+ createProfileFileNameVar(M, CSInstrName);
+ createIRLevelProfileFlagVar(M, /* IsCS */ true);
+ return PreservedAnalyses::all();
+}
+
bool PGOInstrumentationGenLegacyPass::runOnModule(Module &M) {
if (skipModule(M))
return false;
More information about the llvm-commits
mailing list