[ADT] Implement the Waymarking as an independent utility
authorEhud Katz <ehudkatz@gmail.com>
Tue, 31 Mar 2020 13:46:01 +0000 (16:46 +0300)
committerEhud Katz <ehudkatz@gmail.com>
Tue, 31 Mar 2020 14:08:24 +0000 (17:08 +0300)
commit154d517bc7d600dbf9a0d6e2554467249370316b
tree33b36cbac6db0b668ad71758b8feaeb0a3de150e
parenta9c22739e675ad26093a8e584ab6bbc24f6a7bb3
[ADT] Implement the Waymarking as an independent utility

This is the Waymarking algorithm implemented as an independent utility.
The utility is operating on a range of sequential elements.
First we "tag" the elements, by calling `fillWaymarks`.
Then we can "follow" the tags from every element inside the tagged
range, and reach the "head" (the first element), by calling
`followWaymarks`.

Differential Revision: https://reviews.llvm.org/D74415
llvm/include/llvm/ADT/Waymarking.h [new file with mode: 0644]
llvm/unittests/ADT/CMakeLists.txt
llvm/unittests/ADT/WaymarkingTest.cpp [new file with mode: 0644]