As a follow-up to #21160 we should change DI to not do AssignInst lowering itself.
Instead, amend AssignInst with an initialization kind, either Unknown, Init, Reinit or Assign. New AssignInsts emitted by SILGen begin as Unknown. DI sets them to Init, Reinit or Assign. Then the RawSILInstructionLowering pass rewrites them as follows:
Init becomes a StoreInst Init
Reinit becomes a LoadInst, DeallocRefInst, and StoreInst
Assign becomes a StoreInst Assign
The text was updated successfully, but these errors were encountered: