[PATCH] D43551: AMDGPU: Stop using .NAME in .td files

Phabricator via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 22 07:27:32 PST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL325794: AMDGPU: Stop using .NAME in .td files (authored by nha, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D43551?vs=135212&id=135417#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D43551

Files:
  llvm/trunk/lib/Target/AMDGPU/DSInstructions.td


Index: llvm/trunk/lib/Target/AMDGPU/DSInstructions.td
===================================================================
--- llvm/trunk/lib/Target/AMDGPU/DSInstructions.td
+++ llvm/trunk/lib/Target/AMDGPU/DSInstructions.td
@@ -600,16 +600,14 @@
   (inst $ptr, (as_i16imm $offset), (i1 0))
 >;
 
-// FIXME: Passing name of PatFrag in workaround. Why doesn't
-// !cast<PatFrag>(frag.NAME#"_m0") work!?
 multiclass DSReadPat_mc<DS_Pseudo inst, ValueType vt, string frag> {
 
   let OtherPredicates = [LDSRequiresM0Init] in {
     def : DSReadPat<inst, vt, !cast<PatFrag>(frag#"_m0")>;
   }
 
   let OtherPredicates = [NotLDSRequiresM0Init] in {
-    def : DSReadPat<!cast<DS_Pseudo>(inst.NAME#"_gfx9"), vt, !cast<PatFrag>(frag)>;
+    def : DSReadPat<!cast<DS_Pseudo>(!cast<string>(inst)#"_gfx9"), vt, !cast<PatFrag>(frag)>;
   }
 }
 
@@ -678,7 +676,7 @@
   }
 
   let OtherPredicates = [NotLDSRequiresM0Init] in {
-    def : DSWritePat<!cast<DS_Pseudo>(inst.NAME#"_gfx9"), vt, !cast<PatFrag>(frag)>;
+    def : DSWritePat<!cast<DS_Pseudo>(!cast<string>(inst)#"_gfx9"), vt, !cast<PatFrag>(frag)>;
   }
 }
 
@@ -732,7 +730,8 @@
   }
 
   let OtherPredicates = [NotLDSRequiresM0Init] in {
-    def : DSAtomicRetPat<!cast<DS_Pseudo>(inst.NAME#"_gfx9"), vt, !cast<PatFrag>(frag)>;
+    def : DSAtomicRetPat<!cast<DS_Pseudo>(!cast<string>(inst)#"_gfx9"), vt,
+                         !cast<PatFrag>(frag)>;
   }
 }
 
@@ -749,7 +748,8 @@
   }
 
   let OtherPredicates = [NotLDSRequiresM0Init] in {
-    def : DSAtomicCmpXChg<!cast<DS_Pseudo>(inst.NAME#"_gfx9"), vt, !cast<PatFrag>(frag)>;
+    def : DSAtomicCmpXChg<!cast<DS_Pseudo>(!cast<string>(inst)#"_gfx9"), vt,
+                          !cast<PatFrag>(frag)>;
   }
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43551.135417.patch
Type: text/x-patch
Size: 1720 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180222/572c35f1/attachment.bin>


More information about the llvm-commits mailing list