Displaying 1 result from an estimated 1 matches for "applynextupdate".
2017 Jun 27
3
Testing utility for building and updating CFG
...if bar // Insert an edge from if to bar.
Under the hood, the utility would build IR with just switch instructions.
Then you could assign it to a string and use in a unit test:
CFGBuilder B(MyString);
Function *F = B.getFunction();
…
while (!B.finished()) {
Update U = B.applyNextUpdate(); // B changes the CFG.
// U stores type of update (insertion/deletion) and a pair of BB’s
// (From and To).
doSomethingWithTheUpdate(U);
}
Other CFG passes (e.g. LoopInfo, NewGVN) could also use it for testing. It
would be also possible to hook it up to a fuzzer at some point in the
futur...