Variable Assignment Fix #287
No reviewers
Labels
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: M-Labs/nac3#287
Loading…
Reference in New Issue
No description provided.
Delete Branch "285-fix-var-assign"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This is an attempt to fix #285 by fixing the
gen_store_target
function: when generating assignment target of an existing variable, the static value stored previously inctx.var_assignment
should be cleared in case that the assigned value is not an static value anymore. Some cases of assignment to aStaticValue
is possible and should pass the type check of kernel invariant, just like the case of #285.Doing this should not harm
KernelInvariant
optimization, since the static value invar_assignment
will still get updated if the assignment value is static, which will be used when accessing the value herefor this code
IR before this patch
IR after this patch