[PATCH] D101178: [XCOFF][AIX] Add Global Variables Directly to TOC for 32 bit AIX
Sean Fertile via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 26 10:17:43 PDT 2021
sfertile added inline comments.
================
Comment at: llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp:2186
+ // Handle XCOFF::TD case first, then deal with the rest
+ if (const GlobalValue *GV = dyn_cast<GlobalValue>(GO))
+ if (const GlobalVariable *GVar = dyn_cast<GlobalVariable>(GV))
----------------
No need to convert from GlobalObject --> GlobalValue --> GlobalVariable. Just try to dyn_cast from GlobalObject -> GlobalVariable
================
Comment at: llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp:2233
+ if (const GlobalValue *GV = dyn_cast<GlobalValue>(GO))
+ if (const GlobalVariable *GVar = dyn_cast<GlobalVariable>(GV))
+ if (GVar->hasAttribute("toc-data")) {
----------------
Same: no need to convert the GlobalObject to a GlobalValue before tying to cast to a GlobalVariable.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101178/new/
https://reviews.llvm.org/D101178
More information about the llvm-commits
mailing list