Back to home page

EIC code displayed by LXR

 
 

    


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

0001 //===- EntryExitInstrumenter.h - Function Entry/Exit Instrumentation ------===//
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 //
0009 // EntryExitInstrumenter pass - Instrument function entry/exit with calls to
0010 // mcount(), @__cyg_profile_func_{enter,exit} and the like. There are two
0011 // variants, intended to run pre- and post-inlining, respectively.
0012 //
0013 //===----------------------------------------------------------------------===//
0014 
0015 #ifndef LLVM_TRANSFORMS_UTILS_ENTRYEXITINSTRUMENTER_H
0016 #define LLVM_TRANSFORMS_UTILS_ENTRYEXITINSTRUMENTER_H
0017 
0018 #include "llvm/IR/PassManager.h"
0019 
0020 namespace llvm {
0021 
0022 class Function;
0023 
0024 struct EntryExitInstrumenterPass
0025     : public PassInfoMixin<EntryExitInstrumenterPass> {
0026   EntryExitInstrumenterPass(bool PostInlining) : PostInlining(PostInlining) {}
0027 
0028   PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
0029 
0030   void printPipeline(raw_ostream &OS,
0031                      function_ref<StringRef(StringRef)> MapClassName2PassName);
0032 
0033   bool PostInlining;
0034 
0035   static bool isRequired() { return true; }
0036 };
0037 
0038 } // namespace llvm
0039 
0040 #endif // LLVM_TRANSFORMS_UTILS_ENTRYEXITINSTRUMENTER_H