MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / annotate_code

Method annotate_code

lib/asmjit/asmjit/core/rapass.cpp:2238–2270  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2236}
2237
2238ASMJIT_FAVOR_SIZE Error BaseRAPass::annotate_code() noexcept {
2239 StringTmp<1024> sb;
2240
2241 for (const RABlock* block : _blocks) {
2242 BaseNode* node = block->first();
2243 if (!node) {
2244 continue;
2245 }
2246
2247 BaseNode* last = block->last();
2248 for (;;) {
2249 sb.clear();
2250 Formatter::format_node(sb, _format_options, &_cb, node);
2251
2252 if (has_diagnostic_option(DiagnosticOptions::kRADebugLiveness) && node->is_inst() && node->has_pass_data()) {
2253 const RAInst* ra_inst = node->pass_data<RAInst>();
2254 if (ra_inst->tied_count() > 0) {
2255 sb.pad_end(40);
2256 sb.append(" | ");
2257 RAPass_formatLiveness(this, sb, ra_inst);
2258 }
2259 }
2260
2261 node->set_inline_comment(static_cast<char*>(cc()._builder_arena.dup(sb.data(), sb.size(), true)));
2262 if (node == last) {
2263 break;
2264 }
2265 node = node->next();
2266 }
2267 }
2268
2269 return Error::kOk;
2270}
2271
2272ASMJIT_FAVOR_SIZE Error BaseRAPass::dump_block_ids(String& sb, Span<RABlock*> blocks) noexcept {
2273 for (size_t i = 0; i < blocks.size(); i++) {

Callers

nothing calls this directly

Calls 15

format_nodeFunction · 0.85
RAPass_formatLivenessFunction · 0.85
is_instMethod · 0.80
has_pass_dataMethod · 0.80
pad_endMethod · 0.80
set_inline_commentMethod · 0.80
has_diagnostic_optionFunction · 0.70
firstMethod · 0.45
lastMethod · 0.45
clearMethod · 0.45
appendMethod · 0.45
dupMethod · 0.45

Tested by

no test coverage detected