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

Class OpcodeCounter

include/OpcodeCounter.h:26–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24using ResultOpcodeCounter = llvm::StringMap<unsigned>;
25
26struct OpcodeCounter : public llvm::AnalysisInfoMixin<OpcodeCounter> {
27 using Result = ResultOpcodeCounter;
28 Result run(llvm::Function &F,
29 llvm::FunctionAnalysisManager &);
30
31 OpcodeCounter::Result generateOpcodeMap(llvm::Function &F);
32 // Part of the official API:
33 // https://llvm.org/docs/WritingAnLLVMNewPMPass.html#required-passes
34 static bool isRequired() { return true; }
35
36private:
37 // A special type used by analysis passes to provide an address that
38 // identifies that particular analysis pass type.
39 static llvm::AnalysisKey Key;
40 friend struct llvm::AnalysisInfoMixin<OpcodeCounter>;
41};
42
43//------------------------------------------------------------------------------
44// New PM interface for the printer pass

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected