[Mesa-dev] [PATCH 4/7] AMDGPU: Prevent instructions modifying the SI EXEC register from being moved.

Michel Dänzer michel at daenzer.net
Tue Oct 30 11:39:09 PDT 2012


From: Michel Dänzer <michel.daenzer at amd.com>

Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
 lib/Target/AMDGPU/SIInstrInfo.cpp |    5 +++++
 lib/Target/AMDGPU/SIInstrInfo.h   |    1 +
 2 files changed, 6 insertions(+)

diff --git a/lib/Target/AMDGPU/SIInstrInfo.cpp b/lib/Target/AMDGPU/SIInstrInfo.cpp
index ccd1ecb..bed9e77 100644
--- a/lib/Target/AMDGPU/SIInstrInfo.cpp
+++ b/lib/Target/AMDGPU/SIInstrInfo.cpp
@@ -85,3 +85,8 @@ bool SIInstrInfo::isMov(unsigned Opcode) const
     return true;
   }
 }
+
+bool
+SIInstrInfo::isSafeToMoveRegClassDefs(const TargetRegisterClass *RC) const {
+  return RC != &AMDGPU::EXECRegRegClass;
+}
diff --git a/lib/Target/AMDGPU/SIInstrInfo.h b/lib/Target/AMDGPU/SIInstrInfo.h
index a60fd8c..d20c733 100644
--- a/lib/Target/AMDGPU/SIInstrInfo.h
+++ b/lib/Target/AMDGPU/SIInstrInfo.h
@@ -47,6 +47,7 @@ public:
   virtual unsigned getIEQOpcode() const { assert(!"Implement"); return 0;}
   virtual bool isMov(unsigned Opcode) const;
 
+  virtual bool isSafeToMoveRegClassDefs(const TargetRegisterClass *RC) const;
   };
 
 } // End namespace llvm
-- 
1.7.10.4



More information about the mesa-dev mailing list