This is an archive of the discontinued LLVM Phabricator instance.

[ELF] - Implement the TLS relocation optimization for 32-bit x86.
ClosedPublic

Authored by grimar on Dec 7 2015, 8:50 AM.

Details

Summary

Implement the TLS relocation optimization for 32-bit x86 that is described in
"ELF Handling For Thread-Local Storage" by Ulrich Drepper, chapter 5,
"IA-32 Linker Optimizations". Specifically, this patch implements these
optimizations: LD->LE, GD->IE, GD->LD, and IE->LE.

Diff Detail

Repository
rL LLVM

Event Timeline

grimar updated this revision to Diff 42074.Dec 7 2015, 8:50 AM
grimar retitled this revision from to [ELF] - optimizations for x86 tls relocations implemented..
grimar updated this object.
grimar added reviewers: ruiu, rafael.
grimar added subscribers: llvm-commits, grimar.
ruiu edited edge metadata.Dec 7 2015, 11:00 AM

Please fix the spelling error in the commit message. It's better to make it a bit more descriptive.

Implement the TLS relocation optimization for 32-bit x86 that is described in
"ELF Handling For Thread-Local Storage" by Ulrich Drepper, chapter 5,
"IA-32 Linker Optimizations". Specifically, this patch implements these
optimizations: LD->LE, GD->IE, GD->LD, and IE->LE.

ELF/Target.cpp
391 ↗(On Diff #42074)

Remove {}.

453–459 ↗(On Diff #42074)

Indent consistently.

grimar retitled this revision from [ELF] - optimizations for x86 tls relocations implemented. to [ELF] - Implement the TLS relocation optimization for 32-bit x86..Dec 8 2015, 12:04 AM
grimar updated this object.
grimar edited edge metadata.
grimar updated this revision to Diff 42144.Dec 8 2015, 12:19 AM

Review comments addressed.

ELF/Target.cpp
391 ↗(On Diff #42074)

Ok. That was consistent with the same in X86_64TargetInfo::relocateTlsOptimize() but I guess its should be removed from there either,

453–459 ↗(On Diff #42074)

Done.

ruiu accepted this revision.Dec 8 2015, 9:45 AM
ruiu edited edge metadata.

LGTM

This revision is now accepted and ready to land.Dec 8 2015, 9:45 AM
This revision was automatically updated to reflect the committed changes.