Checkpointing was discussed in a couple of RFCs:
This set of patches implement the former local per-component checkpointing.
In short checkpointing provides a simple API for saving and restoring parts
of the IR state. For example if we want to save/restore the state of BB:
auto Chkpnt = Context.getCheckpoint(); Chkpnt.track(BB); // Make changes to instructions in `BB` Chkpnt.restore();
This patch includes the main body of the checkpointing infrastructure and also
implements part of tracking name changes of a BasicBlock component.