This patch add a TLS relax optimization test when transforming
Initial-Exec to Local-Exec for local symbols (which can not be preempted).
This patch is based upon http://reviews.llvm.org/D18332
Differential D18333
[ELF/AArch64] Add aarch64 TLS IE to LE relax for local symbol test zatrazz on Mar 21 2016, 2:19 PM. Authored by
Details This patch add a TLS relax optimization test when transforming This patch is based upon http://reviews.llvm.org/D18332
Diff Detail Event TimelineComment Actions This one fixes only test it seems ? Looks you forgot to provide source code change, or: when you write "This patch is based upon xxx", why don't you just put that one as dependency ? Comment Actions In fact the rebase against your patch to implement TLSDESC made the changes not necessary. The original change as basically: bool AArch64TargetInfo::needsGot(uint32_t Type, SymbolBody &S) const {
+ if (isTlsInitialExecRel(Type)) Where the TLSDESC [1] now does: bool AArch64TargetInfo::refersToGotEntry(uint32_t Type, const SymbolBody &S) const { switch (Type) { case R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21: case R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC: return !canRelaxTls(Type, &S); case R_AARCH64_ADR_GOT_PAGE: case R_AARCH64_LD64_GOT_LO12_NC: return true; default: return false; } } bool AArch64TargetInfo::needsGot(uint32_t Type, SymbolBody &S) const { return refersToGotEntry(Type, S) || needsPlt<ELF64LE>(Type, S); } Where 'canRelaxTls' now have the snippet required: // Initial-Exec relocs can be relaxed to Local-Exec if the symbol is locally // defined. if (isTlsInitialExecRel(Type)) return !S->isPreemptible(); So maybe to rename this change to 'Add aarch64 TLS IE to LE relax for local symbol test'? Comment Actions Yes, I think you need to change the description and commit text accordingly to what this patch actually do.
|
I think there should be an "ldr" in between these two pairs, in which case the test would fail?
Either adding a:
in between the two pairs, or changing the third line to:
should work.