mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-03 22:59:33 +00:00
LibJS: Avoid unnecessary copies in PlaceBlocks codegen pass
This commit is contained in:
parent
8b8cd18482
commit
a1aea5b9e0
Notes:
sideshowbarker
2024-07-18 03:23:00 +09:00
Author: https://github.com/BenWiederhake
Commit: a1aea5b9e0
Pull-request: https://github.com/SerenityOS/serenity/pull/11408
1 changed files with 5 additions and 1 deletions
|
@ -26,7 +26,11 @@ void PlaceBlocks::perform(PassPipelineExecutable& executable)
|
|||
reachable_blocks.set(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);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue