You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the first program, we're saying something like: if a.out or b.out is active, forward 1'd1 to w.in, otherwise forward nothing. In the second program, we're saying unconditionally forward both a.out and b.out to w.in which is an obvious runtime conflict.
The first program can be optimized into:
w.in = a.out | b.out ? 1'd1;
However, the canonicalization pass currently transforms program (1) to (2), altering the semantics. We should disable rewrites of the form a = g ? 1'd1 -> a = g and instead only allow the canonicalizer to perform a = 1'd1 ? b to a = b.
The text was updated successfully, but these errors were encountered:
It's a good example, and I think it clearly depends on nailing down semantics for undefinedness as suggested in #922… namely, I don't think it's a foregone conclusion that this is always a conflict:
w.in = a.out;
w.in = b.out;
We don't right now, but we could decide that this is perfectly safe ifa.out and b.out are never defined simultaneously.
Consider the following two sets of assignments:
and
In the first program, we're saying something like: if
a.out
orb.out
is active, forward1'd1
tow.in
, otherwise forward nothing. In the second program, we're saying unconditionally forward botha.out
andb.out
tow.in
which is an obvious runtime conflict.The first program can be optimized into:
However, the canonicalization pass currently transforms program (1) to (2), altering the semantics. We should disable rewrites of the form
a = g ? 1'd1 -> a = g
and instead only allow the canonicalizer to performa = 1'd1 ? b
toa = b
.The text was updated successfully, but these errors were encountered: