arsenm added inline comments.

================
Comment at: llvm/lib/Transforms/Scalar/InferAddressSpaces.cpp:238-239
+    return false;
+  // Check it's really safe to treat that pair of `ptrtoint`/`inttoptr` is a
+  // no-op cast. Besides checking both of them are no-op casts, as the
+  // reinterpreted pointer may be used in other pointer arithemetic, we also
----------------
The grammar for the first sentence is off.  "Check if the pair of 
ptrtoint/inttoptr is a no-op cast."


================
Comment at: llvm/lib/Transforms/Scalar/InferAddressSpaces.cpp:246
+  // especially a clear definition for pointer bits in non-0 address spaces. It
+  // would be an undefined behavior if that pointer bits are accessed after an
+  // invalid reinterpret cast. Also, due to the unclearness for the meaning of
----------------
No "an".

"if that pionter is dereferenced" would be more specific than than "pointer 
bits accessed"


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81938



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

Reply via email to