antoniofrighetto wrote: > > Oh, sorry for not providing context earlier. The reasoning behind is to > > allow certain optimizations involving errno-writing libcalls (marked as > > `memory(errnomem: write)`) to occur, if we are able to prove the involved > > memory location does not alias errno (e.g., because we are accessing a > > float-typed pointer). IIUC, in standard C, errno is an int, so all > > legitimate accesses must use int-compatible types (or otherwise violating > > strict aliasing). Hence, we should be able to leverage TBAA and prove not > > aliasing with errno, if we do not alias for any nodes belonging to > > `!llvm.errno.tbaa` (which is presumably gathering all int-based nodes; this > > should require confirmation). > > I see. So the idea here is _not_ that we're changing the TBAA nodes used for > any actual accesses. Instead, we're using a named global metadata to specify > the TBAA node that all `errno` accesses would use so that LLVM can do alias > analysis around these libcalls (presumably to allow load/store optimization > across them). That makes a lot of sense, thanks for the clarification. Please > update your commit messages and PR title and description; I think if you > re-read them, you're see that they sound as if you're trying to change how > accesses to `errno` are annotated. In the meantime, I think I have the > context to review the PR now.
Thanks, commit message and PR title/description updated, hope this aligns better! Also, rebased to main, updated tests. https://github.com/llvm/llvm-project/pull/125258 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits