|
|
@ -92,6 +92,15 @@ bool IsGlobalMemory(const IR::Inst& inst) {
|
|
|
|
case IR::Opcode::GlobalAtomicOr64:
|
|
|
|
case IR::Opcode::GlobalAtomicOr64:
|
|
|
|
case IR::Opcode::GlobalAtomicXor64:
|
|
|
|
case IR::Opcode::GlobalAtomicXor64:
|
|
|
|
case IR::Opcode::GlobalAtomicExchange64:
|
|
|
|
case IR::Opcode::GlobalAtomicExchange64:
|
|
|
|
|
|
|
|
case IR::Opcode::GlobalAtomicIAdd32x2:
|
|
|
|
|
|
|
|
case IR::Opcode::GlobalAtomicSMin32x2:
|
|
|
|
|
|
|
|
case IR::Opcode::GlobalAtomicUMin32x2:
|
|
|
|
|
|
|
|
case IR::Opcode::GlobalAtomicSMax32x2:
|
|
|
|
|
|
|
|
case IR::Opcode::GlobalAtomicUMax32x2:
|
|
|
|
|
|
|
|
case IR::Opcode::GlobalAtomicAnd32x2:
|
|
|
|
|
|
|
|
case IR::Opcode::GlobalAtomicOr32x2:
|
|
|
|
|
|
|
|
case IR::Opcode::GlobalAtomicXor32x2:
|
|
|
|
|
|
|
|
case IR::Opcode::GlobalAtomicExchange32x2:
|
|
|
|
case IR::Opcode::GlobalAtomicAddF32:
|
|
|
|
case IR::Opcode::GlobalAtomicAddF32:
|
|
|
|
case IR::Opcode::GlobalAtomicAddF16x2:
|
|
|
|
case IR::Opcode::GlobalAtomicAddF16x2:
|
|
|
|
case IR::Opcode::GlobalAtomicAddF32x2:
|
|
|
|
case IR::Opcode::GlobalAtomicAddF32x2:
|
|
|
@ -135,6 +144,15 @@ bool IsGlobalMemoryWrite(const IR::Inst& inst) {
|
|
|
|
case IR::Opcode::GlobalAtomicOr64:
|
|
|
|
case IR::Opcode::GlobalAtomicOr64:
|
|
|
|
case IR::Opcode::GlobalAtomicXor64:
|
|
|
|
case IR::Opcode::GlobalAtomicXor64:
|
|
|
|
case IR::Opcode::GlobalAtomicExchange64:
|
|
|
|
case IR::Opcode::GlobalAtomicExchange64:
|
|
|
|
|
|
|
|
case IR::Opcode::GlobalAtomicIAdd32x2:
|
|
|
|
|
|
|
|
case IR::Opcode::GlobalAtomicSMin32x2:
|
|
|
|
|
|
|
|
case IR::Opcode::GlobalAtomicUMin32x2:
|
|
|
|
|
|
|
|
case IR::Opcode::GlobalAtomicSMax32x2:
|
|
|
|
|
|
|
|
case IR::Opcode::GlobalAtomicUMax32x2:
|
|
|
|
|
|
|
|
case IR::Opcode::GlobalAtomicAnd32x2:
|
|
|
|
|
|
|
|
case IR::Opcode::GlobalAtomicOr32x2:
|
|
|
|
|
|
|
|
case IR::Opcode::GlobalAtomicXor32x2:
|
|
|
|
|
|
|
|
case IR::Opcode::GlobalAtomicExchange32x2:
|
|
|
|
case IR::Opcode::GlobalAtomicAddF32:
|
|
|
|
case IR::Opcode::GlobalAtomicAddF32:
|
|
|
|
case IR::Opcode::GlobalAtomicAddF16x2:
|
|
|
|
case IR::Opcode::GlobalAtomicAddF16x2:
|
|
|
|
case IR::Opcode::GlobalAtomicAddF32x2:
|
|
|
|
case IR::Opcode::GlobalAtomicAddF32x2:
|
|
|
@ -199,6 +217,8 @@ IR::Opcode GlobalToStorage(IR::Opcode opcode) {
|
|
|
|
return IR::Opcode::StorageAtomicOr32;
|
|
|
|
return IR::Opcode::StorageAtomicOr32;
|
|
|
|
case IR::Opcode::GlobalAtomicXor32:
|
|
|
|
case IR::Opcode::GlobalAtomicXor32:
|
|
|
|
return IR::Opcode::StorageAtomicXor32;
|
|
|
|
return IR::Opcode::StorageAtomicXor32;
|
|
|
|
|
|
|
|
case IR::Opcode::GlobalAtomicExchange32:
|
|
|
|
|
|
|
|
return IR::Opcode::StorageAtomicExchange32;
|
|
|
|
case IR::Opcode::GlobalAtomicIAdd64:
|
|
|
|
case IR::Opcode::GlobalAtomicIAdd64:
|
|
|
|
return IR::Opcode::StorageAtomicIAdd64;
|
|
|
|
return IR::Opcode::StorageAtomicIAdd64;
|
|
|
|
case IR::Opcode::GlobalAtomicSMin64:
|
|
|
|
case IR::Opcode::GlobalAtomicSMin64:
|
|
|
@ -215,10 +235,26 @@ IR::Opcode GlobalToStorage(IR::Opcode opcode) {
|
|
|
|
return IR::Opcode::StorageAtomicOr64;
|
|
|
|
return IR::Opcode::StorageAtomicOr64;
|
|
|
|
case IR::Opcode::GlobalAtomicXor64:
|
|
|
|
case IR::Opcode::GlobalAtomicXor64:
|
|
|
|
return IR::Opcode::StorageAtomicXor64;
|
|
|
|
return IR::Opcode::StorageAtomicXor64;
|
|
|
|
case IR::Opcode::GlobalAtomicExchange32:
|
|
|
|
|
|
|
|
return IR::Opcode::StorageAtomicExchange32;
|
|
|
|
|
|
|
|
case IR::Opcode::GlobalAtomicExchange64:
|
|
|
|
case IR::Opcode::GlobalAtomicExchange64:
|
|
|
|
return IR::Opcode::StorageAtomicExchange64;
|
|
|
|
return IR::Opcode::StorageAtomicExchange64;
|
|
|
|
|
|
|
|
case IR::Opcode::GlobalAtomicIAdd32x2:
|
|
|
|
|
|
|
|
return IR::Opcode::StorageAtomicIAdd32x2;
|
|
|
|
|
|
|
|
case IR::Opcode::GlobalAtomicSMin32x2:
|
|
|
|
|
|
|
|
return IR::Opcode::StorageAtomicSMin32x2;
|
|
|
|
|
|
|
|
case IR::Opcode::GlobalAtomicUMin32x2:
|
|
|
|
|
|
|
|
return IR::Opcode::StorageAtomicUMin32x2;
|
|
|
|
|
|
|
|
case IR::Opcode::GlobalAtomicSMax32x2:
|
|
|
|
|
|
|
|
return IR::Opcode::StorageAtomicSMax32x2;
|
|
|
|
|
|
|
|
case IR::Opcode::GlobalAtomicUMax32x2:
|
|
|
|
|
|
|
|
return IR::Opcode::StorageAtomicUMax32x2;
|
|
|
|
|
|
|
|
case IR::Opcode::GlobalAtomicAnd32x2:
|
|
|
|
|
|
|
|
return IR::Opcode::StorageAtomicAnd32x2;
|
|
|
|
|
|
|
|
case IR::Opcode::GlobalAtomicOr32x2:
|
|
|
|
|
|
|
|
return IR::Opcode::StorageAtomicOr32x2;
|
|
|
|
|
|
|
|
case IR::Opcode::GlobalAtomicXor32x2:
|
|
|
|
|
|
|
|
return IR::Opcode::StorageAtomicXor32x2;
|
|
|
|
|
|
|
|
case IR::Opcode::GlobalAtomicExchange32x2:
|
|
|
|
|
|
|
|
return IR::Opcode::StorageAtomicExchange32x2;
|
|
|
|
case IR::Opcode::GlobalAtomicAddF32:
|
|
|
|
case IR::Opcode::GlobalAtomicAddF32:
|
|
|
|
return IR::Opcode::StorageAtomicAddF32;
|
|
|
|
return IR::Opcode::StorageAtomicAddF32;
|
|
|
|
case IR::Opcode::GlobalAtomicAddF16x2:
|
|
|
|
case IR::Opcode::GlobalAtomicAddF16x2:
|
|
|
@ -454,6 +490,15 @@ void Replace(IR::Block& block, IR::Inst& inst, const IR::U32& storage_index,
|
|
|
|
case IR::Opcode::GlobalAtomicOr64:
|
|
|
|
case IR::Opcode::GlobalAtomicOr64:
|
|
|
|
case IR::Opcode::GlobalAtomicXor64:
|
|
|
|
case IR::Opcode::GlobalAtomicXor64:
|
|
|
|
case IR::Opcode::GlobalAtomicExchange64:
|
|
|
|
case IR::Opcode::GlobalAtomicExchange64:
|
|
|
|
|
|
|
|
case IR::Opcode::GlobalAtomicIAdd32x2:
|
|
|
|
|
|
|
|
case IR::Opcode::GlobalAtomicSMin32x2:
|
|
|
|
|
|
|
|
case IR::Opcode::GlobalAtomicUMin32x2:
|
|
|
|
|
|
|
|
case IR::Opcode::GlobalAtomicSMax32x2:
|
|
|
|
|
|
|
|
case IR::Opcode::GlobalAtomicUMax32x2:
|
|
|
|
|
|
|
|
case IR::Opcode::GlobalAtomicAnd32x2:
|
|
|
|
|
|
|
|
case IR::Opcode::GlobalAtomicOr32x2:
|
|
|
|
|
|
|
|
case IR::Opcode::GlobalAtomicXor32x2:
|
|
|
|
|
|
|
|
case IR::Opcode::GlobalAtomicExchange32x2:
|
|
|
|
case IR::Opcode::GlobalAtomicAddF32:
|
|
|
|
case IR::Opcode::GlobalAtomicAddF32:
|
|
|
|
case IR::Opcode::GlobalAtomicAddF16x2:
|
|
|
|
case IR::Opcode::GlobalAtomicAddF16x2:
|
|
|
|
case IR::Opcode::GlobalAtomicAddF32x2:
|
|
|
|
case IR::Opcode::GlobalAtomicAddF32x2:
|
|
|
|