[CallLowering] Support opaque pointers
authorNikita Popov <nikita.ppv@gmail.com>
Fri, 10 Sep 2021 16:13:08 +0000 (18:13 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Fri, 10 Sep 2021 16:32:12 +0000 (18:32 +0200)
commit14afbe9448d5b9ddb0acce5e0ed046c083726f85
tree0b9e61229dea35954e588a822ab6e1d31cec63de
parentd34d2bbe5d88c1b652887b72600791f4f9435f4a
[CallLowering] Support opaque pointers

Always use the byval/inalloca/preallocated type (which is required
nowadays), don't fall back on the pointer element type.

This requires adding Function::getParamPreallocatedType() to
mirror the CallBase API, so that the templated code can work with
both.
llvm/include/llvm/IR/Function.h
llvm/lib/CodeGen/GlobalISel/CallLowering.cpp
llvm/test/CodeGen/AArch64/GlobalISel/irtranslator-stack-objects.ll