[PATCH] D30480: [CodeGen] Add a basic MachineInstr unittest. NFC.

Ahmed Bougacha via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 28 16:16:41 PST 2017


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

David pointed out the lack of tests in r296007, which adds another mode to MI::print().

I'm not entirely convinced it's valuable, but I figured I'd give it a shot.  I was wondering just how much effort it would take to write an MI test (turns out, a lot.)

So, this tests adds enough machinery to translate one MI from MIR (+IR), and uses that to test the 3 variants of print().

When (if) we merge MIR and MI dump, these tests should really just be replaced with our existing llc mir tests.


https://reviews.llvm.org/D30480

Files:
  unittests/CodeGen/CMakeLists.txt
  unittests/CodeGen/MachineInstrTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30480.90100.patch
Type: text/x-patch
Size: 5184 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170301/20f912a7/attachment.bin>


More information about the llvm-commits mailing list