[PATCH] D81288: [Opt] Smart pointer lifetime optimizations pass.

Zoe Carver via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 5 11:45:27 PDT 2020


zoecarver marked an inline comment as done.
zoecarver added inline comments.


================
Comment at: libcxx/include/memory:2412
   _LIBCPP_INLINE_VISIBILITY
+  __attribute__((abi_tag("__SEMANTICS_unique_ptr_move_const")))
   unique_ptr(unique_ptr&& __u) _NOEXCEPT
----------------
Obviously these won't be part of the final patch. This is just an easy way to figure out which methods are important (both for me and the pass). 

In Swift, there's a `@_semantics` decorator that can be applied to functions so the compiler can apply specific optimizations. Is there anything like that in clang? If not, would something like that be welcome and/or possible? If so, I'm happy to implement it. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81288





More information about the llvm-commits mailing list