From 8ca5c67c6e95fdcf5ddb2f06586873c843dd0cde Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 7 Jan 2008 02:39:19 +0000 Subject: Add predicates methods to TargetOperandInfo, and switch all clients over to using them, instead of diddling Flags directly. Change the various flags from const variables to enums. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45677 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/MachineInstr.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/CodeGen/MachineInstr.cpp') diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp index 40ab4c2dd9..49b7ef2682 100644 --- a/lib/CodeGen/MachineInstr.cpp +++ b/lib/CodeGen/MachineInstr.cpp @@ -541,7 +541,7 @@ int MachineInstr::findFirstPredOperandIdx() const { const TargetInstrDescriptor *TID = getDesc(); if (TID->isPredicable()) { for (unsigned i = 0, e = getNumOperands(); i != e; ++i) - if ((TID->OpInfo[i].Flags & M_PREDICATE_OPERAND)) + if (TID->OpInfo[i].isPredicate()) return i; } @@ -591,7 +591,7 @@ void MachineInstr::copyPredicates(const MachineInstr *MI) { const TargetInstrDescriptor *TID = MI->getDesc(); if (TID->isPredicable()) { for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { - if ((TID->OpInfo[i].Flags & M_PREDICATE_OPERAND)) { + if (TID->OpInfo[i].isPredicate()) { // Predicated operands must be last operands. addOperand(MI->getOperand(i)); } -- cgit v1.2.3