[MachineVerifier][GlobalISel] NFC, Improving MO printing and refactoring visitMachine...
authorRoman Tereshin <rtereshin@apple.com>
Mon, 7 May 2018 22:31:12 +0000 (22:31 +0000)
committerRoman Tereshin <rtereshin@apple.com>
Mon, 7 May 2018 22:31:12 +0000 (22:31 +0000)
commitf487edae49368e1fb620a3597c61deef4275aa86
tree2a31d538f7aa5de387d5567e3e7eb54d3f23a298
parenta6cede6d8ee2ad78710e248463c346c6ec5e72ec
[MachineVerifier][GlobalISel] NFC, Improving MO printing and refactoring visitMachineInstrBefore

This is an NFC pre-commit for the following "Checking that generic
instrs have LLTs on all vregs" commit.

This overloads MachineOperand::print to make it possible to print LLTs
with standalone machine operands.

This also overloads MachineVerifier::print(...MachineOperand...) with
an optional LLT using the newly introduced MachineOperand::print
variant; no actual calls added.

This also refactors MachineVerifier::visitMachineInstrBefore in the
parts dealing with all generic instructions (checking Selected
property, LLTs, and phys regs).

llvm-svn: 331693
llvm/include/llvm/CodeGen/MachineOperand.h
llvm/lib/CodeGen/MachineOperand.cpp
llvm/lib/CodeGen/MachineVerifier.cpp
llvm/test/CodeGen/X86/verifier-generic-types-1.mir [new file with mode: 0644]
llvm/test/CodeGen/X86/verifier-generic-types-2.mir [new file with mode: 0644]