mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 09:27:34 +00:00
LibJS: Avoid unnecessary copies in PlaceBlocks codegen pass
This commit is contained in:
parent
8b8cd18482
commit
a1aea5b9e0
1 changed files with 5 additions and 1 deletions
|
@ -26,7 +26,11 @@ void PlaceBlocks::perform(PassPipelineExecutable& executable)
|
||||||
reachable_blocks.set(block);
|
reachable_blocks.set(block);
|
||||||
replaced_blocks.append(*const_cast<BasicBlock*>(block));
|
replaced_blocks.append(*const_cast<BasicBlock*>(block));
|
||||||
|
|
||||||
for (auto& entry : cfg.get(block).value_or({}))
|
auto children = cfg.find(block);
|
||||||
|
if (children == cfg.end())
|
||||||
|
return;
|
||||||
|
|
||||||
|
for (auto& entry : children->value)
|
||||||
visit(entry);
|
visit(entry);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue