[PATCH] D15292: [ELF] - Implement the TLS relocation optimization for 32-bit x86.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 8 00:19:46 PST 2015


grimar added inline comments.

================
Comment at: ELF/Target.cpp:391
@@ +390,3 @@
+  switch (Type) {
+  case R_386_TLS_GD: {
+    if (canBePreempted(&S, true))
----------------
ruiu wrote:
> Remove {}.
Ok. That was consistent with the same in X86_64TargetInfo::relocateTlsOptimize() but I guess its should be removed from there either,

================
Comment at: ELF/Target.cpp:453-459
@@ +452,9 @@
+
+// LD can be optimized to LE:
+// leal foo(%reg), %eax
+// call ___tls_get_addr
+// Is converted to:
+// movl %gs:0,%eax
+// nop
+// leal 0(%esi,1),%esi
+void X86TargetInfo::relocateTlsLdToLe(uint8_t *Loc, uint8_t *BufEnd, uint64_t P,
----------------
ruiu wrote:
> Indent consistently.
Done.


http://reviews.llvm.org/D15292





More information about the llvm-commits mailing list