[llvm] [NVPTX] Add Volta Atomic SequentiallyConsistent Load and Store Operations (PR #98551)

Artem Belevich via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 1 11:45:45 PDT 2024


================
@@ -82,6 +83,36 @@ inline unsigned promoteScalarArgumentSize(unsigned size) {
 bool shouldEmitPTXNoReturn(const Value *V, const TargetMachine &TM);
 
 bool Isv2x16VT(EVT VT);
+
+namespace NVPTX {
+
+inline char const *toCString(Ordering Order) {
----------------
Artem-B wrote:

Nit. I'd change the name to better reflect the purpose. E.g. `OrderingToString` and, maybe, change the return type to a  `std::string`.

Functions returning values are also much easier to reason about, without worrying about the lifetimes and ownership of stuff pointed to by the returned pointer. 

https://github.com/llvm/llvm-project/pull/98551


More information about the llvm-commits mailing list