[PATCH] D109707: [HIP] [AlwaysInliner] Disable AlwaysInliner to eliminate undefined symbols
Anshil Gandhi via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 20 11:31:10 PDT 2021
gandhi21299 added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUResourceUsageAnalysis.cpp:67
+ if (auto *GA = dyn_cast<GlobalAlias>(Op.getGlobal()))
+ return cast<Function>(GA->getOperand(0));
return cast<Function>(Op.getGlobal());
----------------
arsenm wrote:
> gandhi21299 wrote:
> > arsenm wrote:
> > > I thought aliases could include embedded bitcasts of the function type, so the function wouldn't directly appear here
> > Can you please elaborate on "include embedded bitcasts of the function type"? It's a consequence of the AlwaysInliner where the callee gets replaced by the alias to a function, ie. @func_alias gets replaced by @func in the inline-calls.ll test.
> Something like this where the alias changes the type from the original function:
>
>
> ```
> @add1alias3 = alias float (float), bitcast (i32 (i32)* @add1 to float(float)*)
> ```
>
I see, that will probably break the compiler since a bitcast expression is not a Function.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109707/new/
https://reviews.llvm.org/D109707
More information about the cfe-commits
mailing list