[PATCH] D147022: inline global alias
Artem Belevich via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 28 10:36:43 PDT 2023
tra added inline comments.
================
Comment at: llvm/include/llvm/IR/InstrTypes.h:1409
/// invocation or the function signature does not match the call signature.
Function *getCalledFunction() const {
+ Value *V = getCalledOperand();
----------------
Are we sure that there are no users of these `getCalledFunction` functions that would expect them to return nullptr when we deal with an alias?
Unless someone familiar with the code says that it's OK to treat aliases as functions here, I would try to keep effect of the change limited to the area where we're making a decision to inline the function or alias.
================
Comment at: llvm/lib/Analysis/ModuleSummaryAnalysis.cpp:364
if (auto *GA = dyn_cast<GlobalAlias>(CalledValue)) {
- assert(!CalledFunction && "Expected null called function in callsite for alias");
CalledFunction = dyn_cast<Function>(GA->getAliaseeObject());
----------------
The fact that aliases were mentioned in this assertion make me wonder if there is a reason aliases are not inlined that I'm not aware of.
I'm out of my depth here, and would like to hear from someone who may know what's going on.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147022/new/
https://reviews.llvm.org/D147022
More information about the llvm-commits
mailing list