Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:44:38

0001 //===- Transforms/Instrumentation/InstrProfiling.h --------------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 /// \file
0009 /// This file provides the interface for LLVM's PGO Instrumentation lowering
0010 /// pass.
0011 //===----------------------------------------------------------------------===//
0012 
0013 #ifndef LLVM_TRANSFORMS_INSTRUMENTATION_INSTRPROFILING_H
0014 #define LLVM_TRANSFORMS_INSTRUMENTATION_INSTRPROFILING_H
0015 
0016 #include "llvm/IR/PassManager.h"
0017 #include "llvm/Transforms/Utils/Instrumentation.h"
0018 
0019 namespace llvm {
0020 
0021 class TargetLibraryInfo;
0022 /// Instrumentation based profiling lowering pass. This pass lowers
0023 /// the profile instrumented code generated by FE or the IR based
0024 /// instrumentation pass.
0025 class InstrProfilingLoweringPass
0026     : public PassInfoMixin<InstrProfilingLoweringPass> {
0027   const InstrProfOptions Options = {};
0028   // Is this lowering for the context-sensitive instrumentation.
0029   const bool IsCS = false;
0030 
0031 public:
0032   InstrProfilingLoweringPass() = default;
0033   InstrProfilingLoweringPass(const InstrProfOptions &Options, bool IsCS = false)
0034       : Options(Options), IsCS(IsCS) {}
0035 
0036   PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
0037 };
0038 } // end namespace llvm
0039 
0040 #endif // LLVM_TRANSFORMS_INSTRUMENTATION_INSTRPROFILING_H