From ab331504452a833f27a030f13525b964545d768a Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Fri, 10 Jul 2009 01:38:27 +0000 Subject: [PATCH] Move isPredicated from .cpp to .h git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75217 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/ARM/ARMBaseInstrInfo.cpp | 5 ----- lib/Target/ARM/ARMBaseInstrInfo.h | 5 ++++- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/Target/ARM/ARMBaseInstrInfo.cpp b/lib/Target/ARM/ARMBaseInstrInfo.cpp index f659cb50a05..f7e634a48cc 100644 --- a/lib/Target/ARM/ARMBaseInstrInfo.cpp +++ b/lib/Target/ARM/ARMBaseInstrInfo.cpp @@ -338,11 +338,6 @@ ReverseBranchCondition(SmallVectorImpl &Cond) const { return false; } -bool ARMBaseInstrInfo::isPredicated(const MachineInstr *MI) const { - int PIdx = MI->findFirstPredOperandIdx(); - return PIdx != -1 && MI->getOperand(PIdx).getImm() != ARMCC::AL; -} - bool ARMBaseInstrInfo:: PredicateInstruction(MachineInstr *MI, const SmallVectorImpl &Pred) const { diff --git a/lib/Target/ARM/ARMBaseInstrInfo.h b/lib/Target/ARM/ARMBaseInstrInfo.h index 9c67c21a1ba..c300264c822 100644 --- a/lib/Target/ARM/ARMBaseInstrInfo.h +++ b/lib/Target/ARM/ARMBaseInstrInfo.h @@ -222,7 +222,10 @@ public: bool ReverseBranchCondition(SmallVectorImpl &Cond) const; // Predication support. - virtual bool isPredicated(const MachineInstr *MI) const; + bool isPredicated(const MachineInstr *MI) const { + int PIdx = MI->findFirstPredOperandIdx(); + return PIdx != -1 && MI->getOperand(PIdx).getImm() != ARMCC::AL; + } ARMCC::CondCodes getPredicate(const MachineInstr *MI) const { int PIdx = MI->findFirstPredOperandIdx();