summaryrefslogtreecommitdiffstats
path: root/llvm/include/llvm/Transforms/InstrProfiling.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/include/llvm/Transforms/InstrProfiling.h')
-rw-r--r--llvm/include/llvm/Transforms/InstrProfiling.h22
1 files changed, 15 insertions, 7 deletions
diff --git a/llvm/include/llvm/Transforms/InstrProfiling.h b/llvm/include/llvm/Transforms/InstrProfiling.h
index b7c2935f4d8..e3897df073b 100644
--- a/llvm/include/llvm/Transforms/InstrProfiling.h
+++ b/llvm/include/llvm/Transforms/InstrProfiling.h
@@ -1,4 +1,4 @@
-//===- Transforms/InstrProfiling.h - Instrumentation passes ---*- C++ -*-===//
+//===- Transforms/InstrProfiling.h - Instrumentation passes -----*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -14,10 +14,16 @@
#ifndef LLVM_TRANSFORMS_INSTRPROFILING_H
#define LLVM_TRANSFORMS_INSTRPROFILING_H
+#include "llvm/ADT/DenseMap.h"
+#include "llvm/ADT/StringRef.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/PassManager.h"
#include "llvm/ProfileData/InstrProf.h"
#include "llvm/Transforms/Instrumentation.h"
+#include <cstddef>
+#include <cstdint>
+#include <cstring>
+#include <vector>
namespace llvm {
@@ -28,7 +34,7 @@ class TargetLibraryInfo;
/// instrumentation pass.
class InstrProfiling : public PassInfoMixin<InstrProfiling> {
public:
- InstrProfiling() {}
+ InstrProfiling() = default;
InstrProfiling(const InstrProfOptions &Options) : Options(Options) {}
PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
@@ -40,9 +46,10 @@ private:
const TargetLibraryInfo *TLI;
struct PerFunctionProfileData {
uint32_t NumValueSites[IPVK_Last + 1];
- GlobalVariable *RegionCounters;
- GlobalVariable *DataVar;
- PerFunctionProfileData() : RegionCounters(nullptr), DataVar(nullptr) {
+ GlobalVariable *RegionCounters = nullptr;
+ GlobalVariable *DataVar = nullptr;
+
+ PerFunctionProfileData() {
memset(NumValueSites, 0, sizeof(uint32_t) * (IPVK_Last + 1));
}
};
@@ -104,5 +111,6 @@ private:
void emitInitialization();
};
-} // End llvm namespace
-#endif
+} // end namespace llvm
+
+#endif // LLVM_TRANSFORMS_INSTRPROFILING_H
OpenPOWER on IntegriCloud