[GraphDiff] Extend GraphDiff to track a list of updates.

Authored by asbirlea on Mar 27 2020, 3:02 PM.


[GraphDiff] Extend GraphDiff to track a list of updates.

This patch includes two extensions:

  1. It extends the GraphDiff to also keep the original list of updates

after legalization, not just the deletes/insert vectors.
It also provides an API to pop the first update (the updates are store
in reverse, such that the first update is at the end of the list)

  1. It adds a bool to mark whether the given updates should be applied as

given, or applied in reverse. This moves the task of reversing the
updates (when the caller needs this) to a functionality inside
GraphDiff, versus having the caller do this.

The two changes could be split into two patches, but they seemed
reasonably small to be reviewed together.

Reviewers: kuhar, dblaikie

Subscribers: hiraditya, george.burgess.iv, mgrang, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D77167