This PR makes the optimizer add context nodes before sending the program to egglog.
To ensure linearity of the state edge on the way back, it removes these context nodes again. This is a hack that should be fixed by a linearity-preserving extractor in the future. Right now, eggcc assumes the extracted program uses memory linearly.
This PR makes the optimizer add context nodes before sending the program to egglog. To ensure linearity of the state edge on the way back, it removes these context nodes again. This is a hack that should be fixed by a linearity-preserving extractor in the future. Right now, eggcc assumes the extracted program uses memory linearly.