//===- DAGISelEmitter.cpp - Generate an instruction selector --------------===////// The LLVM Compiler Infrastructure//// This file was developed by Chris Lattner and is distributed under// the University of Illinois Open Source License. See LICENSE.TXT for details.////===----------------------------------------------------------------------===////// This tablegen backend emits a DAG instruction selector.////===----------------------------------------------------------------------===//#include"DAGISelEmitter.h"#include"Record.h"#include"llvm/ADT/StringExtras.h"#include"llvm/Support/Debug.h"#include<algorithm>#include<set>usingnamespacellvm;//===----------------------------------------------------------------------===//// SDTypeConstraint implementation//SDTypeConstraint::SDTypeConstraint(Record*R){OperandNo=R->getValueAsInt("OperandNum");if(R->isSubClassOf("SDTCisVT")){ConstraintType=SDTCisVT;x.SDTCisVT_Info.VT=getValueType(R->getValueAsDef("VT"));}elseif(R->isSubClassOf("SDTCisInt")){ConstraintType=SDTCisInt;}elseif(R->isSubClassOf("SDTCisFP")){ConstraintType=SDTCisFP;}elseif(R->isSubClassOf("SDTCisSameAs")){ConstraintType=SDTCisSameAs;x.SDTCisSameAs_Info.OtherOperandNum=R->getValueAsInt("OtherOperandNum");}elseif(R->isSubClassOf("SDTCisVTSmallerThanOp")){ConstraintType=SDTCisVTSmallerThanOp;x.SDTCisVTSmallerThanOp_Info.OtherOperandNum=R->getValueAsInt("OtherOperandNum");}else{std::cerr<<"Unrecognized SD