[PATCH] D136515: [builtins] Add __builtin_assume_separate_storage.

David Goldblatt via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 15 14:29:03 PDT 2023


davidtgoldblatt added inline comments.


================
Comment at: clang/docs/LanguageExtensions.rst:2393
+particular object (so for example, it's never correct to call this function
+passing the addresses of fields in the same struct, elements of the same array,
+etc.).
----------------
bruno wrote:
> Not necessarily a blocker, but it seems like some of these things you mention can actually be caught by diagnostics without too much effort? Any plans to add them?
I hadn't planned to (at least in the short term). Practically I expect uses of this to be mostly backed out from looking at bad assembly (this is the way I've been using it so far in experimentation). You wouldn't generally expect people to want to try to express "these two struct fields don't alias" and so on because alias analysis can already handle those cases fairly well.

My inclination would be to wait on the diagnostics until we see if it's a real problem, but I'm not strongly opposed if you'd really like them in v1. (Although in that case I'll probably bug you for some help with where / how to put the diagnostics).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136515



More information about the cfe-commits mailing list