forked from OSchip/llvm-project
AMDGPU: Stop using .NAME in .td files
Summary: .NAME is a bit of an odd duck, in that we should really treat it like a template argument, but we currently don't, and so when and where NAME is initialized and how is pretty inconsistent. Best to just avoid using it as a field of already instantiated records, and use cast to string instead. Change-Id: I5a0c202401cede3d5c3827ab9c7858ea48b29108 Reviewers: arsenm, rampitec Subscribers: kzhuravl, wdng, yaxunl, dstuttard, tpr, t-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D43551 llvm-svn: 325794
This commit is contained in:
parent
7c17242b92
commit
40b140fef1
|
@ -600,8 +600,6 @@ class DSReadPat <DS_Pseudo inst, ValueType vt, PatFrag frag> : GCNPat <
|
|||
(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 {
|
||||
|
@ -609,7 +607,7 @@ multiclass DSReadPat_mc<DS_Pseudo inst, ValueType vt, string frag> {
|
|||
}
|
||||
|
||||
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 @@ multiclass DSWritePat_mc <DS_Pseudo inst, ValueType vt, string frag> {
|
|||
}
|
||||
|
||||
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 @@ multiclass DSAtomicRetPat_mc<DS_Pseudo inst, ValueType vt, string frag> {
|
|||
}
|
||||
|
||||
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 @@ multiclass DSAtomicCmpXChg_mc<DS_Pseudo inst, ValueType vt, string frag> {
|
|||
}
|
||||
|
||||
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)>;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue