From 2141fd99889a84def38fe726ca1e1e954c6beb08 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Fri, 10 Jul 2020 19:13:47 +0200 Subject: [PATCH] [CGProfile] Fix layering, IPO depends in Instrumentation. --- include/llvm/Transforms/IPO.h | 2 -- include/llvm/Transforms/Instrumentation.h | 2 ++ lib/Transforms/Instrumentation/CGProfile.cpp | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/include/llvm/Transforms/IPO.h b/include/llvm/Transforms/IPO.h index d1b9f269d5d..28e454d3b0f 100644 --- a/include/llvm/Transforms/IPO.h +++ b/include/llvm/Transforms/IPO.h @@ -282,8 +282,6 @@ ModulePass *createSampleProfileLoaderPass(StringRef Name); ModulePass *createWriteThinLTOBitcodePass(raw_ostream &Str, raw_ostream *ThinLinkOS = nullptr); -ModulePass *createCGProfileLegacyPass(); - } // End llvm namespace #endif diff --git a/include/llvm/Transforms/Instrumentation.h b/include/llvm/Transforms/Instrumentation.h index 04f211da981..d4373d7b39e 100644 --- a/include/llvm/Transforms/Instrumentation.h +++ b/include/llvm/Transforms/Instrumentation.h @@ -88,6 +88,8 @@ ModulePass *createPGOIndirectCallPromotionLegacyPass(bool InLTO = false, bool SamplePGO = false); FunctionPass *createPGOMemOPSizeOptLegacyPass(); +ModulePass *createCGProfileLegacyPass(); + // The pgo-specific indirect call promotion function declared below is used by // the pgo-driven indirect call promotion and sample profile passes. It's a // wrapper around llvm::promoteCall, et al. that additionally computes !prof diff --git a/lib/Transforms/Instrumentation/CGProfile.cpp b/lib/Transforms/Instrumentation/CGProfile.cpp index 05451733625..0cc0d9b0738 100644 --- a/lib/Transforms/Instrumentation/CGProfile.cpp +++ b/lib/Transforms/Instrumentation/CGProfile.cpp @@ -18,7 +18,6 @@ #include "llvm/IR/PassManager.h" #include "llvm/InitializePasses.h" #include "llvm/ProfileData/InstrProf.h" -#include "llvm/Transforms/IPO.h" #include "llvm/Transforms/Instrumentation.h" #include