[PATCH] D104663: [OpaquePtr] Remove checking pointee type for byval/preallocated type

Duncan P. N. Exon Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 22 12:28:30 PDT 2021


dexonsmith added a comment.

In D104663#2834145 <https://reviews.llvm.org/D104663#2834145>, @aeubanks wrote:

> As for preallocated, my stance is still the same. It's not in used at all anywhere (I'm the person who implemented it but never got around to finishing it up).

If it's not fully implemented / supported right now, then maybe that's reasonable. But the difference in behaviour between byval and preallocated seems likely to surprise someone at some point (unless you plan to delete the latter rather than finish it up?)... is there a comment you can leave behind somewhere, or some text that's reasonable to add to LangRef (not necessarily in the same patch) to document the status quo (for byval, preallocated, or both)?

> It's a lot of work to setup a preallocated call that it's very hard to forget the argument attribute.

I'm not totally convinced; I could imagine confusion when someone is (e.g.) hand-reducing IR (or has a custom bugpoint pass or something) if behaviour is inconsistent.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104663



More information about the llvm-commits mailing list