[llvm] [DirectX][DXIL] Distinguish return type for overload type resolution. (PR #85646)
Xiang Li via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 19 07:25:56 PDT 2024
================
@@ -398,10 +398,20 @@ static void emitDXILOperationTable(std::vector<DXILOperationDesc> &Ops,
OS << " static const OpCodeProperty OpCodeProps[] = {\n";
for (auto &Op : Ops) {
+ // Consider Op.OverloadParamIndex as the overload parameter index, by
+ // default
+ auto OLParamIdx = Op.OverloadParamIndex;
+ // If no overload parameter index is set, treat first parameter type as
+ // overload type - unless the Op has no parameters, in which case treat the
+ // return type - as overload parameter to emit the appropriate overload kind
+ // enum.
+ if (OLParamIdx < 0) {
+ OLParamIdx = (Op.OpTypes.size() > 1) ? 1 : 0;
+ }
----------------
python3kgae wrote:
StoreOutput, BufferStore, TraceRay...
https://github.com/llvm/llvm-project/pull/85646
More information about the llvm-commits
mailing list