cmd/compile: allow ; on the RHS of rewrite rules for side-effects #30818
Labels
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
Consider this rewrite rule:
The
canMergeLoadClobber
condition is pure (free from side-effects). Theclobber
condition is not really a condition at all, but pretends to be one and is there for side-effects instead.It'd be nice, for both clarity and reusability, to be able to put side-effects on the RHS of the rule. Something like:
noteRule
,warnRule
, andclobberIfDead
all belong on the RHS.@mundaym's hypothetical
mergeSuccessor
function could also be naturally split into pure conditional LHS and impure RHS.Thoughts?
cc @randall77 @cherrymui @mvdan @mundaym
The text was updated successfully, but these errors were encountered: