diff options
| author | Eugene Zelenko <eugene.zelenko@gmail.com> | 2017-10-21 00:57:46 +0000 |
|---|---|---|
| committer | Eugene Zelenko <eugene.zelenko@gmail.com> | 2017-10-21 00:57:46 +0000 |
| commit | fce435764e6777fc2883d54f73224bc4ae141caf (patch) | |
| tree | a1c288ba4bc8c819f759b86dcdbdfa3052c5fa0e /llvm/include | |
| parent | 849d499e6d402f33c3e8e579476c3604d4cb1350 (diff) | |
| download | bcm5719-llvm-fce435764e6777fc2883d54f73224bc4ae141caf.tar.gz bcm5719-llvm-fce435764e6777fc2883d54f73224bc4ae141caf.zip | |
[Transforms] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 316253
Diffstat (limited to 'llvm/include')
| -rw-r--r-- | llvm/include/llvm/Transforms/PGOInstrumentation.h | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/llvm/include/llvm/Transforms/PGOInstrumentation.h b/llvm/include/llvm/Transforms/PGOInstrumentation.h index 19263f0f807..fa7a68624ec 100644 --- a/llvm/include/llvm/Transforms/PGOInstrumentation.h +++ b/llvm/include/llvm/Transforms/PGOInstrumentation.h @@ -1,4 +1,4 @@ -//===- Transforms/PGOInstrumentation.h - PGO gen/use passes ---*- C++ -*-===// +//===- Transforms/PGOInstrumentation.h - PGO gen/use passes -----*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -6,19 +6,27 @@ // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// +// /// \file /// This file provides the interface for IR based instrumentation passes ( /// (profile-gen, and profile-use). +// //===----------------------------------------------------------------------===// #ifndef LLVM_TRANSFORMS_PGOINSTRUMENTATION_H #define LLVM_TRANSFORMS_PGOINSTRUMENTATION_H +#include "llvm/ADT/ArrayRef.h" #include "llvm/IR/PassManager.h" -#include "llvm/Transforms/Instrumentation.h" +#include <cstdint> +#include <string> namespace llvm { +class Function; +class Instruction; +class Module; + /// The instrumentation (profile-instr-gen) pass for IR based PGO. class PGOInstrumentationGen : public PassInfoMixin<PGOInstrumentationGen> { public: @@ -28,9 +36,10 @@ public: /// The profile annotation (profile-instr-use) pass for IR based PGO. class PGOInstrumentationUse : public PassInfoMixin<PGOInstrumentationUse> { public: - PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM); PGOInstrumentationUse(std::string Filename = ""); + PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM); + private: std::string ProfileFileName; }; @@ -40,6 +49,7 @@ class PGOIndirectCallPromotion : public PassInfoMixin<PGOIndirectCallPromotion> public: PGOIndirectCallPromotion(bool IsInLTO = false, bool SamplePGO = false) : InLTO(IsInLTO), SamplePGO(SamplePGO) {} + PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM); private: @@ -50,12 +60,14 @@ private: /// The profile size based optimization pass for memory intrinsics. class PGOMemOPSizeOpt : public PassInfoMixin<PGOMemOPSizeOpt> { public: - PGOMemOPSizeOpt() {} + PGOMemOPSizeOpt() = default; + PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM); }; void setProfMetadata(Module *M, Instruction *TI, ArrayRef<uint64_t> EdgeCounts, uint64_t MaxCount); -} // End llvm namespace -#endif +} // end namespace llvm + +#endif // LLVM_TRANSFORMS_PGOINSTRUMENTATION_H |

