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

Function printOpcodeCounterResult

lib/OpcodeCounter.cpp:127–144  ·  view source on GitHub ↗

------------------------------------------------------------------------------ Helper functions - implementation ------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

125// Helper functions - implementation
126//------------------------------------------------------------------------------
127static void printOpcodeCounterResult(raw_ostream &OutS,
128 const ResultOpcodeCounter &OpcodeMap) {
129 OutS << "================================================="
130 << "\n";
131 OutS << "LLVM-TUTOR: OpcodeCounter results\n";
132 OutS << "=================================================\n";
133 const char *str1 = "OPCODE";
134 const char *str2 = "#TIMES USED";
135 OutS << format("%-20s %-10s\n", str1, str2);
136 OutS << "-------------------------------------------------"
137 << "\n";
138 for (auto &Inst : OpcodeMap) {
139 OutS << format("%-20s %-10lu\n", Inst.first().str().c_str(),
140 Inst.second);
141 }
142 OutS << "-------------------------------------------------"
143 << "\n\n";
144}

Callers 1

runMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected