Skip to content

Commit 15cb4c4

Browse files
sbc100memfrob
authored andcommitted
[WebAssembly] Fix names of WebAssemblyWrapper SDNodes. NFC
Other platforms all use CamelCase as normal for these wrapper nodes. Differential Revision: https://reviews.llvm.org/D109172
1 parent 5924e97 commit 15cb4c4

File tree

3 files changed

+32
-32
lines changed

3 files changed

+32
-32
lines changed

llvm/lib/Target/WebAssembly/WebAssemblyInstrAtomics.td

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,13 @@ def NotifyPatOffsetOnly_A64 :
114114
Requires<[HasAddr64, HasAtomics]>;
115115

116116
def NotifyPatGlobalAddrOffOnly_A32 :
117-
Pat<(i32 (int_wasm_memory_atomic_notify (WebAssemblywrapper tglobaladdr:$off),
117+
Pat<(i32 (int_wasm_memory_atomic_notify (WebAssemblyWrapper tglobaladdr:$off),
118118
I32:$count)),
119119
(MEMORY_ATOMIC_NOTIFY_A32 0, tglobaladdr:$off, (CONST_I32 0), I32:$count)
120120
>,
121121
Requires<[HasAddr32, HasAtomics, IsNotPIC]>;
122122
def NotifyPatGlobalAddrOffOnly_A64 :
123-
Pat<(i32 (int_wasm_memory_atomic_notify (WebAssemblywrapper tglobaladdr:$off),
123+
Pat<(i32 (int_wasm_memory_atomic_notify (WebAssemblyWrapper tglobaladdr:$off),
124124
I32:$count)),
125125
(MEMORY_ATOMIC_NOTIFY_A64 0, tglobaladdr:$off, (CONST_I64 0), I32:$count)
126126
>,
@@ -185,12 +185,12 @@ defm : WaitPatOffsetOnly<i64, int_wasm_memory_atomic_wait64,
185185
"MEMORY_ATOMIC_WAIT64">;
186186

187187
multiclass WaitPatGlobalAddrOffOnly<ValueType ty, Intrinsic kind, string inst> {
188-
def : Pat<(i32 (kind (WebAssemblywrapper tglobaladdr:$off), ty:$exp,
188+
def : Pat<(i32 (kind (WebAssemblyWrapper tglobaladdr:$off), ty:$exp,
189189
I64:$timeout)),
190190
(!cast<NI>(inst#_A32) 0, tglobaladdr:$off, (CONST_I32 0), ty:$exp,
191191
I64:$timeout)>,
192192
Requires<[HasAddr32, HasAtomics, IsNotPIC]>;
193-
def : Pat<(i32 (kind (WebAssemblywrapper tglobaladdr:$off), ty:$exp,
193+
def : Pat<(i32 (kind (WebAssemblyWrapper tglobaladdr:$off), ty:$exp,
194194
I64:$timeout)),
195195
(!cast<NI>(inst#_A64) 0, tglobaladdr:$off, (CONST_I64 0), ty:$exp,
196196
I64:$timeout)>,
@@ -390,10 +390,10 @@ defm : AStorePatOffsetOnly<i32, atomic_store_32, "ATOMIC_STORE_I32">;
390390
defm : AStorePatOffsetOnly<i64, atomic_store_64, "ATOMIC_STORE_I64">;
391391

392392
multiclass AStorePatGlobalAddrOffOnly<ValueType ty, PatFrag kind, string inst> {
393-
def : Pat<(kind (WebAssemblywrapper tglobaladdr:$off), ty:$val),
393+
def : Pat<(kind (WebAssemblyWrapper tglobaladdr:$off), ty:$val),
394394
(!cast<NI>(inst#_A32) 0, tglobaladdr:$off, (CONST_I32 0), ty:$val)>,
395395
Requires<[HasAddr32, HasAtomics, IsNotPIC]>;
396-
def : Pat<(kind (WebAssemblywrapper tglobaladdr:$off), ty:$val),
396+
def : Pat<(kind (WebAssemblyWrapper tglobaladdr:$off), ty:$val),
397397
(!cast<NI>(inst#_A64) 0, tglobaladdr:$off, (CONST_I64 0), ty:$val)>,
398398
Requires<[HasAddr64, HasAtomics, IsNotPIC]>;
399399
}
@@ -592,10 +592,10 @@ multiclass BinRMWPatOffsetOnly<ValueType ty, PatFrag kind, string inst> {
592592
}
593593

594594
multiclass BinRMWPatGlobalAddrOffOnly<ValueType ty, PatFrag kind, string inst> {
595-
def : Pat<(ty (kind (WebAssemblywrapper tglobaladdr:$off), ty:$val)),
595+
def : Pat<(ty (kind (WebAssemblyWrapper tglobaladdr:$off), ty:$val)),
596596
(!cast<NI>(inst#_A32) 0, tglobaladdr:$off, (CONST_I32 0), ty:$val)>,
597597
Requires<[HasAddr32, HasAtomics, IsNotPIC]>;
598-
def : Pat<(ty (kind (WebAssemblywrapper tglobaladdr:$off), ty:$val)),
598+
def : Pat<(ty (kind (WebAssemblyWrapper tglobaladdr:$off), ty:$val)),
599599
(!cast<NI>(inst#_A64) 0, tglobaladdr:$off, (CONST_I64 0), ty:$val)>,
600600
Requires<[HasAddr64, HasAtomics, IsNotPIC]>;
601601
}
@@ -826,11 +826,11 @@ multiclass TerRMWPatOffsetOnly<ValueType ty, PatFrag kind, string inst> {
826826
}
827827

828828
multiclass TerRMWPatGlobalAddrOffOnly<ValueType ty, PatFrag kind, string inst> {
829-
def : Pat<(ty (kind (WebAssemblywrapper tglobaladdr:$off), ty:$exp, ty:$new)),
829+
def : Pat<(ty (kind (WebAssemblyWrapper tglobaladdr:$off), ty:$exp, ty:$new)),
830830
(!cast<NI>(inst#_A32) 0, tglobaladdr:$off, (CONST_I32 0), ty:$exp,
831831
ty:$new)>,
832832
Requires<[HasAddr32, HasAtomics, IsNotPIC]>;
833-
def : Pat<(ty (kind (WebAssemblywrapper tglobaladdr:$off), ty:$exp, ty:$new)),
833+
def : Pat<(ty (kind (WebAssemblyWrapper tglobaladdr:$off), ty:$exp, ty:$new)),
834834
(!cast<NI>(inst#_A64) 0, tglobaladdr:$off, (CONST_I64 0), ty:$exp,
835835
ty:$new)>,
836836
Requires<[HasAddr64, HasAtomics, IsNotPIC]>;

llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ def WebAssemblyargument : SDNode<"WebAssemblyISD::ARGUMENT",
100100
def WebAssemblyreturn : SDNode<"WebAssemblyISD::RETURN",
101101
SDT_WebAssemblyReturn,
102102
[SDNPHasChain, SDNPVariadic]>;
103-
def WebAssemblywrapper : SDNode<"WebAssemblyISD::Wrapper",
103+
def WebAssemblyWrapper : SDNode<"WebAssemblyISD::Wrapper",
104104
SDT_WebAssemblyWrapper>;
105-
def WebAssemblywrapperPIC : SDNode<"WebAssemblyISD::WrapperPIC",
105+
def WebAssemblyWrapperPIC : SDNode<"WebAssemblyISD::WrapperPIC",
106106
SDT_WebAssemblyWrapperPIC>;
107107
def WebAssemblyglobal_get :
108108
SDNode<"WebAssemblyISD::GLOBAL_GET", SDT_WebAssemblyGlobalGet,
@@ -342,10 +342,10 @@ multiclass LOCAL<WebAssemblyRegClass rc, Operand global_op> {
342342
} // hasSideEffects = 0
343343
foreach vt = rc.RegTypes in {
344344
def : Pat<(vt (WebAssemblyglobal_get
345-
(WebAssemblywrapper tglobaladdr:$addr))),
345+
(WebAssemblyWrapper tglobaladdr:$addr))),
346346
(!cast<NI>("GLOBAL_GET_" # rc) tglobaladdr:$addr)>;
347347
def : Pat<(WebAssemblyglobal_set
348-
vt:$src, (WebAssemblywrapper tglobaladdr:$addr)),
348+
vt:$src, (WebAssemblyWrapper tglobaladdr:$addr)),
349349
(!cast<NI>("GLOBAL_SET_" # rc) tglobaladdr:$addr, vt:$src)>;
350350
def : Pat<(vt (WebAssemblylocal_get (i32 timm:$local))),
351351
(!cast<NI>("LOCAL_GET_" # rc) timm:$local)>;
@@ -380,38 +380,38 @@ defm CONST_F64 : I<(outs F64:$res), (ins f64imm_op:$imm),
380380
"f64.const\t$res, $imm", "f64.const\t$imm", 0x44>;
381381
} // isMoveImm = 1, isAsCheapAsAMove = 1, isReMaterializable = 1
382382

383-
def : Pat<(i32 (WebAssemblywrapper tglobaladdr:$addr)),
383+
def : Pat<(i32 (WebAssemblyWrapper tglobaladdr:$addr)),
384384
(CONST_I32 tglobaladdr:$addr)>, Requires<[IsNotPIC, HasAddr32]>;
385-
def : Pat<(i64 (WebAssemblywrapper tglobaladdr:$addr)),
385+
def : Pat<(i64 (WebAssemblyWrapper tglobaladdr:$addr)),
386386
(CONST_I64 tglobaladdr:$addr)>, Requires<[IsNotPIC, HasAddr64]>;
387387

388-
def : Pat<(i32 (WebAssemblywrapper tglobaladdr:$addr)),
388+
def : Pat<(i32 (WebAssemblyWrapper tglobaladdr:$addr)),
389389
(GLOBAL_GET_I32 tglobaladdr:$addr)>, Requires<[IsPIC, HasAddr32]>;
390-
def : Pat<(i64 (WebAssemblywrapper tglobaladdr:$addr)),
390+
def : Pat<(i64 (WebAssemblyWrapper tglobaladdr:$addr)),
391391
(GLOBAL_GET_I64 tglobaladdr:$addr)>, Requires<[IsPIC, HasAddr64]>;
392392

393-
def : Pat<(i32 (WebAssemblywrapperPIC tglobaladdr:$addr)),
393+
def : Pat<(i32 (WebAssemblyWrapperPIC tglobaladdr:$addr)),
394394
(CONST_I32 tglobaladdr:$addr)>, Requires<[IsPIC, HasAddr32]>;
395-
def : Pat<(i64 (WebAssemblywrapperPIC tglobaladdr:$addr)),
395+
def : Pat<(i64 (WebAssemblyWrapperPIC tglobaladdr:$addr)),
396396
(CONST_I64 tglobaladdr:$addr)>, Requires<[IsPIC, HasAddr64]>;
397397

398-
def : Pat<(i32 (WebAssemblywrapper tglobaltlsaddr:$addr)),
398+
def : Pat<(i32 (WebAssemblyWrapper tglobaltlsaddr:$addr)),
399399
(CONST_I32 tglobaltlsaddr:$addr)>, Requires<[HasAddr32]>;
400-
def : Pat<(i64 (WebAssemblywrapper tglobaltlsaddr:$addr)),
400+
def : Pat<(i64 (WebAssemblyWrapper tglobaltlsaddr:$addr)),
401401
(CONST_I64 tglobaltlsaddr:$addr)>, Requires<[HasAddr64]>;
402402

403-
def : Pat<(i32 (WebAssemblywrapper texternalsym:$addr)),
403+
def : Pat<(i32 (WebAssemblyWrapper texternalsym:$addr)),
404404
(GLOBAL_GET_I32 texternalsym:$addr)>, Requires<[IsPIC, HasAddr32]>;
405-
def : Pat<(i64 (WebAssemblywrapper texternalsym:$addr)),
405+
def : Pat<(i64 (WebAssemblyWrapper texternalsym:$addr)),
406406
(GLOBAL_GET_I64 texternalsym:$addr)>, Requires<[IsPIC, HasAddr64]>;
407407

408-
def : Pat<(i32 (WebAssemblywrapper texternalsym:$addr)),
408+
def : Pat<(i32 (WebAssemblyWrapper texternalsym:$addr)),
409409
(CONST_I32 texternalsym:$addr)>, Requires<[IsNotPIC, HasAddr32]>;
410-
def : Pat<(i64 (WebAssemblywrapper texternalsym:$addr)),
410+
def : Pat<(i64 (WebAssemblyWrapper texternalsym:$addr)),
411411
(CONST_I64 texternalsym:$addr)>, Requires<[IsNotPIC, HasAddr64]>;
412412

413-
def : Pat<(i32 (WebAssemblywrapper mcsym:$sym)), (CONST_I32 mcsym:$sym)>;
414-
def : Pat<(i64 (WebAssemblywrapper mcsym:$sym)), (CONST_I64 mcsym:$sym)>;
413+
def : Pat<(i32 (WebAssemblyWrapper mcsym:$sym)), (CONST_I32 mcsym:$sym)>;
414+
def : Pat<(i64 (WebAssemblyWrapper mcsym:$sym)), (CONST_I64 mcsym:$sym)>;
415415

416416
//===----------------------------------------------------------------------===//
417417
// Additional sets of instructions.

llvm/lib/Target/WebAssembly/WebAssemblyInstrMemory.td

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,10 @@ defm : LoadPatOffsetOnly<f32, load, "LOAD_F32">;
117117
defm : LoadPatOffsetOnly<f64, load, "LOAD_F64">;
118118

119119
multiclass LoadPatGlobalAddrOffOnly<ValueType ty, SDPatternOperator kind, string inst> {
120-
def : Pat<(ty (kind (WebAssemblywrapper tglobaladdr:$off))),
120+
def : Pat<(ty (kind (WebAssemblyWrapper tglobaladdr:$off))),
121121
(!cast<NI>(inst # "_A32") 0, tglobaladdr:$off, (CONST_I32 0))>,
122122
Requires<[IsNotPIC, HasAddr32]>;
123-
def : Pat<(ty (kind (WebAssemblywrapper tglobaladdr:$off))),
123+
def : Pat<(ty (kind (WebAssemblyWrapper tglobaladdr:$off))),
124124
(!cast<NI>(inst # "_A64") 0, tglobaladdr:$off, (CONST_I64 0))>,
125125
Requires<[IsNotPIC, HasAddr64]>;
126126
}
@@ -313,11 +313,11 @@ defm : StorePatOffsetOnly<f32, store, "STORE_F32">;
313313
defm : StorePatOffsetOnly<f64, store, "STORE_F64">;
314314

315315
multiclass StorePatGlobalAddrOffOnly<ValueType ty, PatFrag kind, string inst> {
316-
def : Pat<(kind ty:$val, (WebAssemblywrapper tglobaladdr:$off)),
316+
def : Pat<(kind ty:$val, (WebAssemblyWrapper tglobaladdr:$off)),
317317
(!cast<NI>(inst # "_A32") 0, tglobaladdr:$off, (CONST_I32 0),
318318
ty:$val)>,
319319
Requires<[IsNotPIC, HasAddr32]>;
320-
def : Pat<(kind ty:$val, (WebAssemblywrapper tglobaladdr:$off)),
320+
def : Pat<(kind ty:$val, (WebAssemblyWrapper tglobaladdr:$off)),
321321
(!cast<NI>(inst # "_A64") 0, tglobaladdr:$off, (CONST_I64 0),
322322
ty:$val)>,
323323
Requires<[IsNotPIC, HasAddr64]>;

0 commit comments

Comments
 (0)