This is an archive of the discontinued LLVM Phabricator instance.

[Chkpnt] Initial patch for checkpointing.
Needs ReviewPublic

Authored by vporpo on Mar 30 2023, 11:43 AM.

Details

Summary

Checkpointing was discussed in a couple of RFCs:
https://discourse.llvm.org/t/rfc-local-per-component-ir-checkpointing/69071
https://discourse.llvm.org/t/rfc-lightweight-llvm-ir-checkpointing/68446
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.

Diff Detail

Event Timeline

vporpo created this revision.Mar 30 2023, 11:43 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 30 2023, 11:43 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
vporpo requested review of this revision.Mar 30 2023, 11:43 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 30 2023, 11:43 AM