[PATCH] D34798: [Dominators] Add CFGBuilder testing utility

Jakub Kuderski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 28 18:30:51 PDT 2017


kuhar created this revision.
Herald added a subscriber: mgorny.

This patch introduces a new testing utility for building and modifying CFG -- CFGBuilder. The primary use case for the utility is testing the upcoming incremental dominator tree update API.

The current design provides a simple mechanism of constructing arbitrary graphs and then applying series of updates to them. CFGBuilder takes care of creating empty functions, connecting and disconnecting basic blocks. Under the hood it uses SwitchInst and UnreachableInst.

It will be also possible to create a thin wrapper over CFGBuilder for parsing string input and to hook it up to other textual tools (e.g. opt used with FileCheck).


https://reviews.llvm.org/D34798

Files:
  unittests/IR/CFGBuilder.cpp
  unittests/IR/CFGBuilder.h
  unittests/IR/CMakeLists.txt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34798.104572.patch
Type: text/x-patch
Size: 12204 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170629/543503f1/attachment.bin>


More information about the llvm-commits mailing list