-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Wasm] Fix emitting setup code too late.
Setup code should *always* be emitted before emitting of the own computation code, e.g. the setup code must be emitted before compiling a data layout since this compilation may temporarily introduce boolean variables and emit code using them into the returned blocks, however, these blocks may be placed between setup and teardown code which may represent the lifespan of another boolean variable which then overrides the value of the other one (our DSL is able to use the same bit again since the `Variable` object is already distroyed and thus its bit is free to use). We had this issue previously and thus introduced the `referenced_bits_` field for `PrimitiveExpr`s, however, beeing able to return blocks of Wasm code and place them somewhere else circumvents our former solution. Maybe we can extend the idea of memorizing referenced bits to blocks as well until they are attached or destroyed.
- Loading branch information
1 parent
48e00d0
commit 9918e30
Showing
2 changed files
with
25 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters