[PATCH] [opt] Replace the recursive walk for GC with a worklist algorithm.

Sean Silva chisophugis at gmail.com
Mon Jun 29 11:54:48 PDT 2015


================
Comment at: COFF/Writer.cpp:118
@@ +117,3 @@
+  // as we push, so sections never appear twice in the list.
+  SmallVector<SectionChunk *, 16> Worklist;
+
----------------
ruiu wrote:
> majnemer wrote:
> > Realistically, won't we always blow out this SmallVector?
> Yeah, this can be much longer than 16. Is SmallVector faster than std::vector for non-small vectors? If not, can we use std::vector instead?
Yes. For large POD arrays it can use realloc tricks (e.g. swapping page tables instead of actually copying).

http://reviews.llvm.org/D10790

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list