From 1134aae4e743290da2ad29a7ac76d3a1f9dcfce8 Mon Sep 17 00:00:00 2001 From: Jakob Stoklund Olesen Date: Thu, 9 Aug 2012 23:31:36 +0000 Subject: Revert r161633-161634 "Partition use lists so defs always come before uses." These commits broke a number of buildbots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161640 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/MachineOperand.h | 2 +- include/llvm/CodeGen/MachineRegisterInfo.h | 23 +++++++++-------------- 2 files changed, 10 insertions(+), 15 deletions(-) (limited to 'include') diff --git a/include/llvm/CodeGen/MachineOperand.h b/include/llvm/CodeGen/MachineOperand.h index adf2095..0cde75d 100644 --- a/include/llvm/CodeGen/MachineOperand.h +++ b/include/llvm/CodeGen/MachineOperand.h @@ -150,7 +150,7 @@ private: struct { // For MO_Register. // Register number is in SmallContents.RegNo. - MachineOperand *Prev; // Access list for register. See MRI. + MachineOperand **Prev; // Access list for register. MachineOperand *Next; } Reg; diff --git a/include/llvm/CodeGen/MachineRegisterInfo.h b/include/llvm/CodeGen/MachineRegisterInfo.h index 42a8aa4..0fac1a8 100644 --- a/include/llvm/CodeGen/MachineRegisterInfo.h +++ b/include/llvm/CodeGen/MachineRegisterInfo.h @@ -468,6 +468,10 @@ public: const TargetRegisterInfo &TRI, const TargetInstrInfo &TII); +private: + void HandleVRegListReallocation(); + +public: /// defusechain_iterator - This class provides iterator support for machine /// operands in the function that use or define a specific register. If /// ReturnUses is true it returns uses of registers, if ReturnDefs is true it @@ -513,20 +517,11 @@ public: assert(Op && "Cannot increment end iterator!"); Op = getNextOperandForReg(Op); - // All defs come before the uses, so stop def_iterator early. - if (!ReturnUses) { - if (Op) { - if (Op->isUse()) - Op = 0; - else - assert(!Op->isDebug() && "Can't have debug defs"); - } - } else { - // If this is an operand we don't care about, skip it. - while (Op && ((!ReturnDefs && Op->isDef()) || - (SkipDebug && Op->isDebug()))) - Op = getNextOperandForReg(Op); - } + // If this is an operand we don't care about, skip it. + while (Op && ((!ReturnUses && Op->isUse()) || + (!ReturnDefs && Op->isDef()) || + (SkipDebug && Op->isDebug()))) + Op = getNextOperandForReg(Op); return *this; } -- cgit v1.1