Skip to content

snapshot-20211214.709

@stellaraccident stellaraccident tagged this 14 Dec 05:34
Introduces an explicit `vm.toplevel` attribute when setting up the nesting and then uses this as a signal that a nested module should be considered legal and left alone. The heuristic previously in use was to attempt to infer this based on parents. This turned out to be fragile if nesting a new module in an existing module (i.e. to extract a partial program and compile it without intending to create a layering issue).

I was going to clean the attribute up at the end but opted to leave it there as it was a good debugging aid as I tried to figure out what was going on.

Moved the one nesting test to a new nesting.mlir test case and reworked it to use a non-root based pipeline, which is more realistic for this scenario. Also, verified that what this test was doing was wrong (checks on "module" were inadvertently matching "vm.module", which was not the desired outcome). I believe the current tested behavior is desired.
Assets 2
Loading