Closed dkoeplin closed 6 years ago
After discussion with Arvind, there will be a DSL-based configuration flag for enabling/disabling mutable aliases. Spatial will be enabled by default. In the future we may also want to make this type-specific, e.g. the staged type has an "allowMutableAliases" flag.
Added in 7d1fb58acb6675ae93afc87e1e550336df6093e2
In part due to its roots in LMS, argon currently disallows mutable aliases of data structures. However, we're now regularly violating this due to the way DRAM views are created.
becomes:
in the above example, y is a mutable view of a slice of the mutable DRAM x.
Statically resolvable mutable aliases shouldn't be too much of an issue, as a write to an symbol can be considered a write to all of its static aliases. Since Spatial is generating hardware, all aliases have to be statically resolvable anyway.
Long story short we need to rewrite, at least in part, the way we handle write effects / aliasing in argon to correctly handle these cases. @raghup17 @mattfel1 let me know if you have any thoughts on the design.