[PATCH] D32354: [ELF] - Set DF_STATIC_TLS flag for i386 target.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 26 10:18:11 PDT 2017


grimar added a comment.

I also can suggest as an option not to burry logic inside tls handling method like first diff do, but also do not introduce a new loop.
And do all things somewhere at the begining of scanRelocs:

  template <class ELFT, class RelTy>
  static void scanRelocs(InputSectionBase &Sec, ArrayRef<RelTy> Rels) {
    OffsetGetter GetOffset(Sec);
    for (auto I = Rels.begin(), End = Rels.end(); I != End; ++I) {
      const RelTy &Rel = *I;
  
      <DO LOGIC HERE>

That will avoid second loop and should be effective.


https://reviews.llvm.org/D32354





More information about the llvm-commits mailing list