R600: Mark all members of the TRegMem register class as reserved
authorTom Stellard <thomas.stellard@amd.com>
Tue, 19 Feb 2013 15:22:45 +0000 (15:22 +0000)
committerTom Stellard <thomas.stellard@amd.com>
Tue, 19 Feb 2013 15:22:45 +0000 (15:22 +0000)
This stops the Machine Verifier from complaining about uses of undefined
physical registers.

NOTE: This is a candidate for the Mesa stable branch.
llvm-svn: 175518

llvm/lib/Target/R600/R600RegisterInfo.cpp

index 33e858d..bbd7995 100644 (file)
@@ -49,6 +49,12 @@ BitVector R600RegisterInfo::getReservedRegs(const MachineFunction &MF) const {
     Reserved.set(*I);
   }
 
+  for (TargetRegisterClass::iterator I = AMDGPU::TRegMemRegClass.begin(),
+                                     E = AMDGPU::TRegMemRegClass.end();
+                                     I !=  E; ++I) {
+    Reserved.set(*I);
+  }
+
   const R600InstrInfo *RII = static_cast<const R600InstrInfo*>(&TII);
   std::vector<unsigned> IndirectRegs = RII->getIndirectReservedRegs(MF);
   for (std::vector<unsigned>::iterator I = IndirectRegs.begin(),