MCPcopy Create free account
hub / github.com/banach-space/llvm-tutor / OpcodeCounterPrinter

Class OpcodeCounterPrinter

include/OpcodeCounter.h:46–57  ·  view source on GitHub ↗

------------------------------------------------------------------------------ New PM interface for the printer pass ------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

44// New PM interface for the printer pass
45//------------------------------------------------------------------------------
46class OpcodeCounterPrinter : public llvm::PassInfoMixin<OpcodeCounterPrinter> {
47public:
48 explicit OpcodeCounterPrinter(llvm::raw_ostream &OutS) : OS(OutS) {}
49 llvm::PreservedAnalyses run(llvm::Function &Func,
50 llvm::FunctionAnalysisManager &FAM);
51 // Part of the official API:
52 // https://llvm.org/docs/WritingAnLLVMNewPMPass.html#required-passes
53 static bool isRequired() { return true; }
54
55private:
56 llvm::raw_ostream &OS;
57};
58#endif

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected