[PATCH] D14870: [ELF2] - Implemented optimizations for @tlsld and @tlsgd

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 23 11:19:56 PST 2015


ruiu added inline comments.

================
Comment at: ELF/InputSection.cpp:103
@@ -102,1 +102,3 @@
+  for (size_t I = 0; I < Num; ++I) {
+    const RelType &RI = *(Rels.begin() + I);
     uint32_t SymIndex = RI.getSymbol(Config->Mips64EL);
----------------
That's too subtle. Is there any way to avoid that?

================
Comment at: ELF/InputSection.cpp:114
@@ -112,1 +113,3 @@
+    if (Target->isTlsLocalDynamicReloc(Type) &&
+        (!Target->isTlsOptimized(Type, nullptr))) {
       Target->relocateOne(BufLoc, BufEnd, Type, AddrLoc,
----------------
Remove () from (!Target->isTlsOptimized(...))

================
Comment at: ELF/InputSection.cpp:134
@@ -131,1 +133,3 @@
+    if (Target->isTlsGlobalDynamicReloc(Type) &&
+        (!Target->isTlsOptimized(Type, &Body))) {
       Target->relocateOne(BufLoc, BufEnd, Type, AddrLoc,
----------------
Ditto


http://reviews.llvm.org/D14870





More information about the llvm-commits mailing list