[PATCH] D68065: Propeller: LLD Support for Basic Block Sections

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 6 21:16:23 PDT 2020


MaskRay added inline comments.


================
Comment at: lld/ELF/Writer.cpp:2118
+  // sections.
+  //auto startOptBBJumpTime = system_clock::now();
+  optimizeBasicBlockJumps();
----------------
tmsriram wrote:
> MaskRay wrote:
> > MaskRay wrote:
> > > Delete unrelated comments.
> > `optimizeBasicBlockJumps` calls assignAddresses, which was only called in finalizeAddressDependentContent.
> > 
> > We hope assignAddresses caller are grouped together (if in.symTab needs to be finalized first, please add a comment). Can you move this pass immediately before (or after) finalizeAddressDependentContent?
> Correct me if I am wrong but finalizing in.symtab before we optimize seems important, I added a comment here.  If we relax jumps going forward, we would definitely need to know how far they are.
> Run after in.symTab is finalized.

Why is important?


================
Comment at: lld/ELF/Writer.cpp:1743
+      InputSection *next =
+          (i + 1) < sections.size() ? sections[i + 1] : nullptr;
+      InputSection &is = *sections[i];
----------------
delete excess parens


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68065/new/

https://reviews.llvm.org/D68065





More information about the llvm-commits mailing list