Mesa (master): radeon/llvm: Set the neverHasSideEffects bit on more instructions

Tom Stellard tstellar at kemper.freedesktop.org
Wed Aug 29 20:43:44 UTC 2012


Module: Mesa
Branch: master
Commit: 733c28a0d95c1da87b14ef893f8a59b1f940322a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=733c28a0d95c1da87b14ef893f8a59b1f940322a

Author: Tom Stellard <thomas.stellard at amd.com>
Date:   Wed Aug 29 10:20:24 2012 -0400

radeon/llvm: Set the neverHasSideEffects bit on more instructions

This flag makes these instructions candidates for the dead code
elimination and common subexpression elimination.

---

 src/gallium/drivers/radeon/SIInstructions.td |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/gallium/drivers/radeon/SIInstructions.td b/src/gallium/drivers/radeon/SIInstructions.td
index 11bc801..8bc311b 100644
--- a/src/gallium/drivers/radeon/SIInstructions.td
+++ b/src/gallium/drivers/radeon/SIInstructions.td
@@ -12,6 +12,7 @@ def isSI : Predicate<"Subtarget.device()"
 
 let Predicates = [isSI] in {
 
+let neverHasSideEffects = 1 in {
 def S_MOV_B32 : SOP1_32 <0x00000003, "S_MOV_B32", []>;
 def S_MOV_B64 : SOP1_64 <0x00000004, "S_MOV_B64", []>;
 def S_CMOV_B32 : SOP1_32 <0x00000005, "S_CMOV_B32", []>;
@@ -22,6 +23,7 @@ def S_WQM_B32 : SOP1_32 <0x00000009, "S_WQM_B32", []>;
 def S_WQM_B64 : SOP1_64 <0x0000000a, "S_WQM_B64", []>;
 def S_BREV_B32 : SOP1_32 <0x0000000b, "S_BREV_B32", []>;
 def S_BREV_B64 : SOP1_64 <0x0000000c, "S_BREV_B64", []>;
+} // End neverHasSideEffects = 1
 ////def S_BCNT0_I32_B32 : SOP1_BCNT0 <0x0000000d, "S_BCNT0_I32_B32", []>;
 ////def S_BCNT0_I32_B64 : SOP1_BCNT0 <0x0000000e, "S_BCNT0_I32_B64", []>;
 ////def S_BCNT1_I32_B32 : SOP1_BCNT1 <0x0000000f, "S_BCNT1_I32_B32", []>;




More information about the mesa-commit mailing list