[PATCH] D123053: MemoryBuiltins: only claim an allocator family on builtin functions

Augie Fackler via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 6 09:25:12 PDT 2022


durin42 added a comment.

In D123053#3432079 <https://reviews.llvm.org/D123053#3432079>, @nikic wrote:

> Can this be tested?

I don't really think so. It shows up much later in the work when we start futzing with clang to move operator::new over to attributes from the hard-coded list, but it's really mostly transitional IMO because once everything is wired up in clang I think we'll be able to jettison the `nobuiltin` hack on those functions anyway.

Basically this is for symmetry with the other allocation function checks in MemoryBuiltins, wherein if a function is marked `nobuiltin` and the call isn't overriding that with `builtin`, we pretend we don't know anything. That's a hack so we don't elide non-elidable operator::new calls (we can elide generated ones, but not explicit ones, or something like that - it's a little past my ability to parse the C++ standard bits there), and I think the end result of the attributes work I'm doing will be to dump that hack.

Does that make you feel enough better? Want any of this in the commit message?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D123053



More information about the llvm-commits mailing list