[PATCH] D73380: [clang] Annotating C++'s `operator new` with more attributes

Dávid Bolvanský via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 24 13:40:55 PST 2020


xbolva00 added a comment.

LLVM already infers noalias nonnull for eg. _Znwm so noalias and nonnull info added by clang will not increase power of LLVM. Or?

Alignment info is useful I think.



================
Comment at: clang/test/CodeGenCXX/builtin-operator-new-delete.cpp:54
 }
-// CHECK: declare noalias i8* @_ZnwmSt11align_val_t(i64, i64) [[ATTR_NOBUILTIN:#[^ ]*]]
+// CHECK: declare nonnull i8* @_ZnwmSt11align_val_t(i64, i64) [[ATTR_NOBUILTIN:#[^ ]*]]
 // CHECK: declare void @_ZdlPvSt11align_val_t(i8*, i64) [[ATTR_NOBUILTIN_NOUNWIND:#[^ ]*]]
----------------
We lost noalias here?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D73380





More information about the cfe-commits mailing list