================
@@ -533,6 +533,19 @@ static Value *emitHlslClamp(CodeGenFunction &CGF, const 
CallExpr *E,
   return Clamp;
 }
 
+static CallInst *emitConvergentResourceIntrinsicCall(CodeGenFunction &CGF,
+                                                     llvm::Type *RetTy,
+                                                     Intrinsic::ID ID,
+                                                     ArrayRef<Value *> Args) {
+  SmallVector<llvm::Type *> ArgTys;
+  ArgTys.reserve(Args.size());
+  for (Value *Arg : Args)
+    ArgTys.push_back(Arg->getType());
+  Function *IntrFn = Intrinsic::getOrInsertDeclaration(&CGF.CGM.getModule(), 
ID,
+                                                       RetTy, ArgTys);
+  return CGF.EmitRuntimeCall(IntrFn, Args);
----------------
tcorringham wrote:

I started to refactor the emitRescourceIntrinsic() calls as suggested, but 
there are some differences across some intrinsics (runtimeCC etc.) which would 
require more arguments to be added. The result wasn't obviously cleaner than 
the current code. I think this should be revisited as a separate cleanup 
exercise after some thought has gone into it. 

I have added the property to the DirectX intrinsics, and amended the asm 
rount-trip test accordingly.

https://github.com/llvm/llvm-project/pull/211256
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to