================
@@ -698,6 +698,23 @@ void CIRGenModule::constructFunctionArgumentAttributes(
             builder.getI64IntegerAttr(
                 getNaturalPointeeTypeAlignment(argType).getQuantity()));
     }
+
+    // restrict on pointer parameters -> noalias.  Skip builtins: OGCG only
+    // applies restrict->noalias through calling convention lowering, which
+    // builtins bypass.
+    if (fd) {
+      unsigned paramIdx = &argAttrList - argAttrs.data();
----------------
erichkeane wrote:

I could swear I've commented on this bit elsewhere, but getting to params like 
this is just inappropriate/sidesteps the organization of this function.  If we 
REALLY need parameter types instead of argument types, we should put them in 
the 'zip' above.

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

Reply via email to