[PATCH] D16468: [ELF] - Attempt to simplify the relocations relaxation code

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 23 06:25:34 PST 2016


grimar added inline comments.

================
Comment at: ELF/InputSection.h:91
@@ +90,3 @@
+    const Elf_Shdr *Sec = nullptr;
+    std::vector<RelocData> Relocs;
+  };
----------------
ruiu wrote:
> Is this a bitmap where each bit at position n represents whether or not n'th relocation in `Sec` needs a TLS optimization? If so, I doesn't feel like a clean design. Having side data is somewhat confusing. I'm sorry that I don't have a counter suggestion here, but it feels like this change is somewhat neutral from the readability point of view.
Yes it was such a bitmap. In current situation it helps to avoid multiple isTlsOptimized calls what IMO makes situation better overall.
I dont like idea to keep additional data but I also dont feel it very bad. We also can probably add more fields there to calculate it only one time during first scan, like needsGot flag for example.
So I abandoned it for now but if there is something I can do with it to land it please let me know.


http://reviews.llvm.org/D16468





More information about the llvm-commits mailing list