[PATCH] D46653: Start support for linking object files with split stacks

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 12 13:55:58 PDT 2018


ruiu added inline comments.


================
Comment at: ELF/InputSection.cpp:842
+  if (!getFile<ELFT>()->SplitStack) return;
+  std::set<Defined *> AdjustedPrologues;
+  std::vector<Relocation *> MorestackCalls;
----------------
saugustine wrote:
> ruiu wrote:
> > We generally avoid `std::set` because it is an ordered map and slower than `llvm::DenseMap`. If you don't need an ordered map, please use DenseMap instead.
> This is a pure set (keys but no values), so done with DenseSet instead of DenseMap.
> 
> If you would rather DenseMap, should I just duplicate the key for the value?
Oh sorry I should have said DenseSet. That was just a typo.


================
Comment at: ELF/InputSection.cpp:915
+    if (!getFile<ELFT>()->SomeNoSplitStack)
+      error("Function call at " + getErrorLocation(Buf + Rel.Offset) +
+            "crosses a split-stack boundary, but unable " +
----------------
Error messages should start with a lowercase letter and shouldn't end with a period.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D46653





More information about the llvm-commits mailing list