[llvm] [DirectX][DXIL] Distinguish return type for overload type resolution. (PR #85646)
    S. Bharadwaj Yadavalli via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Mar 18 11:49:48 PDT 2024
    
    
  
================
@@ -249,34 +249,39 @@ static FunctionType *getDXILOpFunctionType(const OpCodeProperty *Prop,
       ArgTys[0], ArrayRef<Type *>(&ArgTys[1], ArgTys.size() - 1), false);
 }
 
-static FunctionCallee getOrCreateDXILOpFunction(dxil::OpCode DXILOp,
-                                                Type *OverloadTy, Module &M) {
-  const OpCodeProperty *Prop = getOpCodeProperty(DXILOp);
+namespace llvm {
+namespace dxil {
+
+// Create an instruction that calls DXIL Op with return type, specified opcode,
+// and call arguments.
+// \param OpCode Opcode of the DXIL Op call constructed
+// \param ReturnTy Return type of the DXIL Op call constructed
+// \param OverloadTy Overload type of the DXIL Op call constructed
+// \ret DXIL Op call constructed
----------------
bharadwajy wrote:
> We didn't use ret in the `clang/lib/Headers/hlsl/hlsl_intrinsics.h` doxygens. Is this something we should be looking to add more broadly or do we have other means of defining the return type?
I'd like to adapt the practice going forward - but am open to any alternate / more prevalent effective practices I am unaware of.
https://github.com/llvm/llvm-project/pull/85646
    
    
More information about the llvm-commits
mailing list