jdoerfert added a comment.

Generating freeze seems an option, just not sure we can easily get all 
locations with this approach.
Anyway, some code comments below.



================
Comment at: clang/lib/CodeGen/CGCall.cpp:2061
+    }
+  }
+  return ArgHasMayBeUndefAttr;
----------------
Early exists please.

if (!TargetDecl)
  return false

no ArgHasMayBeUndefAttr is needed, just return true/false, etc.


================
Comment at: clang/lib/CodeGen/CGCall.cpp:4899
+          val = Builder.CreateFreeze(Addr.getPointer());
+        IRCallArgs[FirstIRArg] = val;
 
----------------
Style: `Val`, also below.


================
Comment at: clang/test/CodeGenHIP/maybe_undef-attr-verify.hip:33
+    res = __shfl_sync(t, WARP_SIZE, 0);
+}
----------------
Note, not necessarily to address: I would have preferred auto generated check 
lines, should not be many and it's easier to see what's going on, IMHO. 


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130224/new/

https://reviews.llvm.org/D130224

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to