Temporarily disallow asm
blocks from writing an initialized registers
#3155
Labels
compiler: frontend
Everything to do with type checking, control flow analysis, and everything between parsing and IRgen
compiler: parser
Everything to do with the parser
P: critical
Should be looked at before anything else
This is due to the addition of
mem2reg
in #3128. Some odd patterns arise when you allowasm
blocks toread and write the same value in IR, which causeswrite an initialized register.mem2reg
not to behave well. In any case, we should disallow these patterns temporarily until #2819 is resolved and we have a better mental model regardingasm
blocks in IR.I think this change can be done in the parser or type checking. Example use cases:
Reading and writing the same register in the same instructionWriting register
r1
even thoughr1
is initialized toptr
.Reading and writing the same register in different instructionsWriting registers
r1
andr2
even though both are initialized.The text was updated successfully, but these errors were encountered: