Files
gps/tools/local/circt/include/llvm/Transforms/Utils/EntryExitInstrumenter.h
T
2026-07-12 11:01:51 +03:00

40 lines
1.3 KiB
C++

//===- EntryExitInstrumenter.h - Function Entry/Exit Instrumentation ------===//
//
// 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
//
//===----------------------------------------------------------------------===//
//
// EntryExitInstrumenter pass - Instrument function entry/exit with calls to
// mcount(), @__cyg_profile_func_{enter,exit} and the like. There are two
// variants, intended to run pre- and post-inlining, respectively.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_TRANSFORMS_UTILS_ENTRYEXITINSTRUMENTER_H
#define LLVM_TRANSFORMS_UTILS_ENTRYEXITINSTRUMENTER_H
#include "llvm/IR/PassManager.h"
namespace llvm {
class Function;
struct EntryExitInstrumenterPass
: public RequiredPassInfoMixin<EntryExitInstrumenterPass> {
EntryExitInstrumenterPass(bool PostInlining) : PostInlining(PostInlining) {}
LLVM_ABI PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
LLVM_ABI void
printPipeline(raw_ostream &OS,
function_ref<StringRef(StringRef)> MapClassName2PassName);
bool PostInlining;
};
} // namespace llvm
#endif // LLVM_TRANSFORMS_UTILS_ENTRYEXITINSTRUMENTER_H