diff options
Diffstat (limited to 'include/llvm/Transforms/Instrumentation/InstrProfiling.h')
-rw-r--r-- | include/llvm/Transforms/Instrumentation/InstrProfiling.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/include/llvm/Transforms/Instrumentation/InstrProfiling.h b/include/llvm/Transforms/Instrumentation/InstrProfiling.h index 13fb3db4ae6f..8f76d4a1ce55 100644 --- a/include/llvm/Transforms/Instrumentation/InstrProfiling.h +++ b/include/llvm/Transforms/Instrumentation/InstrProfiling.h @@ -1,9 +1,8 @@ //===- Transforms/Instrumentation/InstrProfiling.h --------------*- C++ -*-===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// /// \file @@ -35,8 +34,9 @@ using LoadStorePair = std::pair<Instruction *, Instruction *>; /// instrumentation pass. class InstrProfiling : public PassInfoMixin<InstrProfiling> { public: - InstrProfiling() = default; - InstrProfiling(const InstrProfOptions &Options) : Options(Options) {} + InstrProfiling() : IsCS(false) {} + InstrProfiling(const InstrProfOptions &Options, bool IsCS = false) + : Options(Options), IsCS(IsCS) {} PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM); bool run(Module &M, const TargetLibraryInfo &TLI); @@ -61,6 +61,9 @@ private: GlobalVariable *NamesVar; size_t NamesSize; + // Is this lowering for the context-sensitive instrumentation. + bool IsCS; + // vector of counter load/store pairs to be register promoted. std::vector<LoadStorePair> PromotionCandidates; |