[llvm] [DirectX][NFC] Change specification of overload types and attribute in DXIL.td (PR #81184)

S. Bharadwaj Yadavalli via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 9 09:35:21 PST 2024


================
@@ -268,36 +296,45 @@ static void emitDXILIntrinsicMap(std::vector<DXILOperationDesc> &Ops,
 
 static std::string emitDXILOperationFnAttr(StringRef FnAttr) {
   return StringSwitch<std::string>(FnAttr)
-      .Case("rn", "Attribute::ReadNone")
-      .Case("ro", "Attribute::ReadOnly")
+      .Case("NoReadMemory", "Attribute::ReadNone")
+      .Case("ReadMemory", "Attribute::ReadOnly")
----------------
bharadwajy wrote:

> Don't these map directly to the llvm function attributes? 

Yes. 

> If so I think we should match those names (`readonly` and `readnone`). Using the decided naming convention (e.g. CamlCase).

As the `DXIL.td` is expected to be the eventual single source of reference for DXIL operations and affords declarative specification, the thought was to be a bit more descriptive than C++ sources, when possible.

I can change them as suggested. 

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


More information about the llvm-commits mailing list