================
@@ -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();
----------------
adams381 wrote:

Done.  Built a parallel SmallVector<const ParmVarDecl *> aligned with argAttrs 
(nullptr for `this` and any extra slots), then added it to the zip_equal loop.  
No more manual index arithmetic — the ParmVarDecl is accessed directly as `pvd` 
in the structured binding.  Also fixed stale noalias-on-call-site CHECK lines 
in asm-label-inline-builtins.c.

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