[PATCH] D134266: Introduce predicate for a atomic operations in GMIR

Yashwant Singh via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 20 03:18:11 PDT 2022


yassingh updated this revision to Diff 461529.
yassingh added a comment.

Removed extra markers


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134266/new/

https://reviews.llvm.org/D134266

Files:
  llvm/include/llvm/CodeGen/TargetInstrInfo.h
  llvm/include/llvm/Support/TargetOpcodes.def


Index: llvm/include/llvm/Support/TargetOpcodes.def
===================================================================
--- llvm/include/llvm/Support/TargetOpcodes.def
+++ llvm/include/llvm/Support/TargetOpcodes.def
@@ -387,6 +387,12 @@
 HANDLE_TARGET_OPCODE(G_ATOMICRMW_FMAX)
 HANDLE_TARGET_OPCODE(G_ATOMICRMW_FMIN)
 
+// Marker for start of Generic Atomic opcodes
+HANDLE_TARGET_OPCODE_MARKER(GENERIC_ATOMIC_OP_START, G_ATOMIC_CMPXCHG_WITH_SUCCESS)
+
+// Marker for end of Generic Atomic opcodes
+HANDLE_TARGET_OPCODE_MARKER(GENERIC_ATOMIC_OP_END, G_ATOMICRMW_FMIN)
+
 // Generic atomic fence
 HANDLE_TARGET_OPCODE(G_FENCE)
 
Index: llvm/include/llvm/CodeGen/TargetInstrInfo.h
===================================================================
--- llvm/include/llvm/CodeGen/TargetInstrInfo.h
+++ llvm/include/llvm/CodeGen/TargetInstrInfo.h
@@ -110,6 +110,11 @@
     return Opc <= TargetOpcode::GENERIC_OP_END;
   }
 
+  static bool isGenericAtomicOpcode(unsigned Opc) {
+    return TargetOpcode::GENERIC_ATOMIC_OP_START <= Opc &&
+           Opc <= TargetOpcode::GENERIC_ATOMIC_OP_END;
+  }
+
   /// Given a machine instruction descriptor, returns the register
   /// class constraint for OpNum, or NULL.
   virtual


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134266.461529.patch
Type: text/x-patch
Size: 1218 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220920/ea18dc00/attachment.bin>


More information about the llvm-commits mailing list