| 2236 | } |
| 2237 | |
| 2238 | ASMJIT_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 | |
| 2272 | ASMJIT_FAVOR_SIZE Error BaseRAPass::dump_block_ids(String& sb, Span<RABlock*> blocks) noexcept { |
| 2273 | for (size_t i = 0; i < blocks.size(); i++) { |
nothing calls this directly
no test coverage detected