//===-- MachineVerifier.cpp - Machine Code Verifier -----------------------===////// The LLVM Compiler Infrastructure//// This file is distributed under the University of Illinois Open Source// License. See LICENSE.TXT for details.////===----------------------------------------------------------------------===////// Pass to verify generated machine code. The following is checked://// Operand counts: All explicit operands must be present.//// Register classes: All physical and virtual register operands must be// compatible with the register class required by the instruction descriptor.//// Register live intervals: Registers must be defined only once, and must be// defined before use.//// The machine code verifier is enabled from LLVMTargetMachine.cpp with the// command-line option -verify-machineinstrs, or by defining the environment// variable LLVM_VERIFY_MACHINEINSTRS to the name of a file that will receive// the verifier errors.//===----------------------------------------------------------------------===//#include"llvm/Instructions.h"#include"llvm/Function.h"#include"llvm/CodeGen/LiveIntervalAnalysis.h"#include"llvm/CodeGen/LiveVariables.h"#include"llvm/CodeGen/LiveStackAnalysis.h"#include"llvm/CodeGen/MachineInstrBundle.h"#include"llvm/CodeGen/MachineFunctionPass.h"#include"llvm/CodeGen/MachineFrameInfo.h"#include"llvm/CodeGen/MachineMemOperand.h"#include"llvm/CodeGen/MachineRegisterInfo.h"#include"llvm/CodeGen/Passes.h"#include"llvm/MC/MCAsmInfo.h"#include"llvm/Target/TargetMachine.h"#include"llvm/Target/TargetRegisterInfo.h"#include"llvm/Target/TargetInstrInfo.h"#include"llvm/ADT/DenseSet.h"#include"llvm/ADT/SetOperations.h"#include"llvm/ADT/SmallVector.h"#include"llvm/Support/Debug.h"#include"llvm/Support/ErrorHandling.h"#include"llvm/Support/raw_ostream.h"usingnamespacellvm;namespace{structMachineVerifier{MachineVerifier(Pass*pass,constchar*b):PASS(