mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
[pr19844] Add thread local mode to aliases.
This matches gcc's behavior. It also seems natural given that aliases contain other properties that govern how it is accessed (linkage, visibility, dll storage). Clang still has to be updated to expose this feature to C. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209759 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -240,21 +240,15 @@ unsigned AArch64FastISel::AArch64MaterializeFP(const ConstantFP *CFP, MVT VT) {
|
||||
}
|
||||
|
||||
unsigned AArch64FastISel::AArch64MaterializeGV(const GlobalValue *GV) {
|
||||
// We can't handle thread-local variables quickly yet. Unfortunately we have
|
||||
// to peer through any aliases to find out if that rule applies.
|
||||
const GlobalValue *TLSGV = GV;
|
||||
if (const GlobalAlias *GA = dyn_cast<GlobalAlias>(GV))
|
||||
TLSGV = GA->getAliasee();
|
||||
// We can't handle thread-local variables quickly yet.
|
||||
if (GV->isThreadLocal())
|
||||
return 0;
|
||||
|
||||
// MachO still uses GOT for large code-model accesses, but ELF requires
|
||||
// movz/movk sequences, which FastISel doesn't handle yet.
|
||||
if (TM.getCodeModel() != CodeModel::Small && !Subtarget->isTargetMachO())
|
||||
return 0;
|
||||
|
||||
if (const GlobalVariable *GVar = dyn_cast<GlobalVariable>(TLSGV))
|
||||
if (GVar->isThreadLocal())
|
||||
return 0;
|
||||
|
||||
unsigned char OpFlags = Subtarget->ClassifyGlobalReference(GV, TM);
|
||||
|
||||
EVT DestEVT = TLI.getValueType(GV->getType(), true);
|
||||
|
Reference in New Issue
Block a user