forked from OSchip/llvm-project
08ed216000
As discussed in: * https://reviews.llvm.org/D94166 * https://lists.llvm.org/pipermail/llvm-dev/2020-September/145031.html The GlobalIndirectSymbol class lost most of its meaning in https://reviews.llvm.org/D109792, which disambiguated getBaseObject (now getAliaseeObject) between GlobalIFunc and everything else. In addition, as long as GlobalIFunc is not a GlobalObject and getAliaseeObject returns GlobalObjects, a GlobalAlias whose aliasee is a GlobalIFunc cannot currently be modeled properly. Creating aliases for GlobalIFuncs does happen in the wild (e.g. glibc). In addition, calling getAliaseeObject on a GlobalIFunc will currently return nullptr, which is undesirable because it should return the object itself for non-aliases. This patch refactors the GlobalIFunc class to inherit directly from GlobalObject, and removes GlobalIndirectSymbol (while inlining the relevant parts into GlobalAlias and GlobalIFunc). This allows for calling getAliaseeObject() on a GlobalIFunc to return the GlobalIFunc itself, making getAliaseeObject() more consistent and enabling alias-to-ifunc to be properly modeled in the IR. I exercised some judgement in the API clients of GlobalIndirectSymbol: some were 'monomorphized' for GlobalAlias and GlobalIFunc, and some remained shared (with the type adapted to become GlobalValue). Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D108872 |
||
---|---|---|
.. | ||
AbstractCallSiteTest.cpp | ||
AsmWriterTest.cpp | ||
AttributesTest.cpp | ||
BasicBlockTest.cpp | ||
CFGBuilder.cpp | ||
CFGBuilder.h | ||
CMakeLists.txt | ||
ConstantRangeTest.cpp | ||
ConstantsTest.cpp | ||
DataLayoutTest.cpp | ||
DebugInfoTest.cpp | ||
DebugTypeODRUniquingTest.cpp | ||
DemandedBitsTest.cpp | ||
DominatorTreeBatchUpdatesTest.cpp | ||
DominatorTreeTest.cpp | ||
FunctionTest.cpp | ||
IRBuilderTest.cpp | ||
InstructionsTest.cpp | ||
IntrinsicsTest.cpp | ||
LegacyPassManagerTest.cpp | ||
MDBuilderTest.cpp | ||
ManglerTest.cpp | ||
MetadataTest.cpp | ||
ModuleTest.cpp | ||
PassBuilderCallbacksTest.cpp | ||
PassManagerTest.cpp | ||
PatternMatch.cpp | ||
TimePassesTest.cpp | ||
TypesTest.cpp | ||
UseTest.cpp | ||
UserTest.cpp | ||
VPIntrinsicTest.cpp | ||
ValueHandleTest.cpp | ||
ValueMapTest.cpp | ||
ValueTest.cpp | ||
VectorTypesTest.cpp | ||
VerifierTest.cpp |