[CPU] Increase amount of possible labels used in FinalizationPass

Instead of using decimal notaation for labels let's use hexadecimal.
That will increase amount of possible combination by a lot.
This commit is contained in:
Gliniak 2022-10-27 20:59:15 +02:00 committed by Rick Gibbed
parent 9eef64d3fb
commit eb25fe4f4a
1 changed files with 2 additions and 2 deletions

View File

@ -46,8 +46,8 @@ bool FinalizationPass::Run(HIRBuilder* builder) {
if (!label->name) {
const size_t label_len = 6 + 4;
char* name = reinterpret_cast<char*>(arena->Alloc(label_len + 1, 1));
assert_true(label->id <= 9999);
auto end = fmt::format_to_n(name, label_len, "_label{}", label->id);
assert_true(label->id <= 65535);
auto end = fmt::format_to_n(name, label_len, "_label{:04X}", label->id);
name[end.size] = '\0';
label->name = name;
}