summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Instrumentation
diff options
context:
space:
mode:
authorXinliang David Li <davidxl@google.com>2016-05-16 16:31:07 +0000
committerXinliang David Li <davidxl@google.com>2016-05-16 16:31:07 +0000
commitf3c7a3523857a4b8d6aa50bcc14e4a379d6388c7 (patch)
tree694cb52baa4d336c54ecbd8c6dc986e76e448cff /llvm/lib/Transforms/Instrumentation
parente43198dc4b8bcce0518575d16bff52a6d38cea1f (diff)
downloadbcm5719-llvm-f3c7a3523857a4b8d6aa50bcc14e4a379d6388c7.tar.gz
bcm5719-llvm-f3c7a3523857a4b8d6aa50bcc14e4a379d6388c7.zip
[PM] Port indirect call promotion pass to new pass manager
llvm-svn: 269660
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation')
-rw-r--r--llvm/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp b/llvm/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp
index b68be789721..ef1d81a8679 100644
--- a/llvm/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp
+++ b/llvm/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp
@@ -31,6 +31,7 @@
#include "llvm/ProfileData/InstrProfReader.h"
#include "llvm/Support/Debug.h"
#include "llvm/Transforms/Instrumentation.h"
+#include "llvm/Transforms/PGOInstrumentation.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
#include <string>
#include <utility>
@@ -693,3 +694,11 @@ bool PGOIndirectCallPromotionLegacyPass::runOnModule(Module &M) {
InLTO |= ICPLTOMode;
return promoteIndirectCalls(M, InLTO);
}
+
+PreservedAnalyses PGOIndirectCallPromotion::run(Module &M, AnalysisManager<Module> &AM) {
+ InLTO |= ICPLTOMode;
+ if (!promoteIndirectCalls(M, InLTO))
+ return PreservedAnalyses::all();
+
+ return PreservedAnalyses::none();
+}
OpenPOWER on IntegriCloud