| 343 | } |
| 344 | |
| 345 | Stack StackLayoutGenerator::propagateStackThroughBlock(Stack _exitStack, CFG::BasicBlock const& _block, bool _aggressiveStackCompression) |
| 346 | { |
| 347 | Stack stack = _exitStack; |
| 348 | for (auto&& [idx, operation]: _block.operations | ranges::views::enumerate | ranges::views::reverse) |
| 349 | { |
| 350 | Stack newStack = propagateStackThroughOperation(stack, operation, _aggressiveStackCompression); |
| 351 | if (!_aggressiveStackCompression && !findStackTooDeep(newStack, stack, reachableStackDepth()).empty()) |
| 352 | // If we had stack errors, run again with aggressive stack compression. |
| 353 | return propagateStackThroughBlock(std::move(_exitStack), _block, true); |
| 354 | stack = std::move(newStack); |
| 355 | } |
| 356 | |
| 357 | return stack; |
| 358 | } |
| 359 | |
| 360 | void StackLayoutGenerator::processEntryPoint(CFG::BasicBlock const& _entry, CFG::FunctionInfo const* _functionInfo) |
| 361 | { |
nothing calls this directly
no test coverage detected