[llvm-commits] [llvm] r139698 - in /llvm/trunk/lib/CodeGen: SplitKit.cpp SplitKit.h

Jakob Stoklund Olesen stoklund at 2pi.dk
Wed Sep 14 15:17:20 PDT 2011


On Sep 14, 2011, at 11:47 AM, Chandler Carruth wrote:

> I wonder if using a more "unit test" approach might work here. You could probably write some helper C++ routines that build up the various data structures directly, and immediately feed them into SplitKit and check the result. Shouldn't be hard to write helper routines to check the output concisely either.
> 
> Still, as Evan said, likely non-trivial, but might be more straightforward than a fully general injection of machine code. On the other hand, it wouldn't solve as many different problems.

It's a lot of work since most codegen classes depend on the framework provided by MachineFunction and friends.  It's a lot of work to build even a small MF by hand, and you would also need a dominator tree and loop info (or mock objects).

The unit test approach makes more sense for the kind of classes we put in llvm/ADT.

/jakob




More information about the llvm-commits mailing list