1 //===-- TargetInstrInfo.cpp - Target Instruction Information --------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file implements the TargetInstrInfo class.
12 //===----------------------------------------------------------------------===//
14 #include "llvm/Target/TargetInstrInfo.h"
15 #include "llvm/Constant.h"
16 #include "llvm/DerivedTypes.h"
19 TargetInstrInfo::TargetInstrInfo(const TargetInstrDesc
* Desc
,
21 : Descriptors(Desc
), NumOpcodes(numOpcodes
) {
24 TargetInstrInfo::~TargetInstrInfo() {
27 bool TargetInstrInfo::isUnpredicatedTerminator(const MachineInstr
*MI
) const {
28 const TargetInstrDesc
&TID
= MI
->getDesc();
29 if (!TID
.isTerminator()) return false;
31 // Conditional branch is a special case.
32 if (TID
.isBranch() && !TID
.isBarrier())
34 if (!TID
.isPredicable())
36 return !isPredicated(MI
);