Adapt merged 5.x Scan helpers to the LayerInfo split

# Ptr<LayerInfo> over body->prog().
 # (matches sibling parseLoop/parseIf).
 # sliceScanAxis/stackScanAxis helpers (definition order only).
This commit is contained in:
Abhishek Gola
2026-07-29 20:27:05 +05:30
parent 58c28e1e82
commit 34c478016d
3 changed files with 46 additions and 45 deletions

View File

@@ -143,13 +143,13 @@ struct BufferAllocator
std::unordered_set<int> bodyDefined;
for (Arg ba : body->inputs())
bodyDefined.insert(ba.idx);
for (const Ptr<Layer>& blayer : body->prog()) {
for (const Ptr<LayerInfo>& blayer : body->prog()) {
if (!blayer) continue;
for (Arg bo : blayer->outputs)
bodyDefined.insert(bo.idx);
}
std::unordered_set<int> closureBumped;
for (const Ptr<Layer>& blayer : body->prog()) {
for (const Ptr<LayerInfo>& blayer : body->prog()) {
if (!blayer) continue;
for (Arg bi : blayer->inputs) {
if (bi.idx <= 0) continue;