summaryrefslogtreecommitdiff
path: root/include/llvm/Transforms/InstrProfiling.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Transforms/InstrProfiling.h')
-rw-r--r--include/llvm/Transforms/InstrProfiling.h40
1 files changed, 20 insertions, 20 deletions
diff --git a/include/llvm/Transforms/InstrProfiling.h b/include/llvm/Transforms/InstrProfiling.h
index b7c2935f4d841..65e69761baddd 100644
--- a/include/llvm/Transforms/InstrProfiling.h
+++ b/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);
@@ -37,12 +43,14 @@ public:
private:
InstrProfOptions Options;
Module *M;
+ Triple TT;
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));
}
};
@@ -52,19 +60,10 @@ private:
GlobalVariable *NamesVar;
size_t NamesSize;
- bool isMachO() const;
-
- /// Get the section name for the counter variables.
- StringRef getCountersSection() const;
-
- /// Get the section name for the name variables.
- StringRef getNameSection() const;
-
- /// Get the section name for the profile data variables.
- StringRef getDataSection() const;
-
- /// Get the section name for the coverage mapping data.
- StringRef getCoverageSection() const;
+ // The start value of precise value profile range for memory intrinsic sizes.
+ int64_t MemOPSizeRangeStart;
+ // The end value of precise value profile range for memory intrinsic sizes.
+ int64_t MemOPSizeRangeLast;
/// Count the number of instrumented value sites for the function.
void computeNumValueSiteCounts(InstrProfValueProfileInst *Ins);
@@ -104,5 +103,6 @@ private:
void emitInitialization();
};
-} // End llvm namespace
-#endif
+} // end namespace llvm
+
+#endif // LLVM_TRANSFORMS_INSTRPROFILING_H