MCPcopy Create free account
hub / github.com/argotorg/solidity / markNeedsCleanStack

Function markNeedsCleanStack

libyul/backends/evm/ControlFlowGraphBuilder.cpp:217–226  ·  view source on GitHub ↗

Marks each block that needs to maintain a clean stack. That is each block that has an outgoing path to a function return.

Source from the content-addressed store, hash-verified

215/// Marks each block that needs to maintain a clean stack. That is each block that has an outgoing
216/// path to a function return.
217void markNeedsCleanStack(CFG& _cfg)
218{
219 for (auto& functionInfo: _cfg.functionInfo | ranges::views::values)
220 for (CFG::BasicBlock* exit: functionInfo.exits)
221 util::BreadthFirstSearch<CFG::BasicBlock*>{{exit}}.run([&](CFG::BasicBlock* _block, auto _addChild) {
222 _block->needsCleanStack = true;
223 for (CFG::BasicBlock* entry: _block->entries)
224 _addChild(entry);
225 });
226}
227}
228
229std::unique_ptr<CFG> ControlFlowGraphBuilder::build(

Callers 1

buildMethod · 0.85

Calls 1

runMethod · 0.45

Tested by

no test coverage detected