[PATCH] D81911: [IR] Fix getBaseObject for GlobalAlias-to-GlobalIFunc
Itay Bookstein via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 24 06:27:13 PDT 2020
nextsilicon-itay-bookstein added a comment.
As far as I can tell, GlobalIndirectSymbol is there to share code between GlobalAlias and GlobalIFunc.
This shared code is mostly a common getBaseObject() implementation, which just delegates to getIndirectSymbol() (== getOperand(0)).
For GlobalAliases, the indirect symbol is the aliasee. For GlobalIFuncs, the indirect symbol is the resolver function.
You said that for GlobalIFuncs the resolver function shouldn't be the base object. It makes sense to me, because the signature of the resolver is different from the signature of the fptr that it's supposed to return.
BUT this means that the getBaseObject() implementation that GlobalIFunc inherits from GlobalIndirectSymbol is wrong for GlobalIFunc.
Because the getBaseObject() code sharing between GlobalAlias and GlobalIFunc looks like the only purpose of GlobalIndirectSymbol, and it's wrong for one of the classes (or so we claim).
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81911/new/
https://reviews.llvm.org/D81911
More information about the llvm-commits
mailing list