[PATCH] D59902: [COFF] Optimize range extension thunk insertion memory usage
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 28 11:40:43 PDT 2019
rnk added a comment.
Thanks! Looks like I never sent my reply comment. Oops :(
================
Comment at: lld/COFF/Writer.cpp:460
+ // file. Only add each thunk once to each input file.
+ auto Insertion = ThunkSymtabIndices.insert({{File, Thunk}, ~0U});
+ uint32_t &ThunkSymbolIndex = Insertion.first->second;
----------------
mstorsjo wrote:
> Does the initial value `~0U` actually matter here? If `Insertion.second` is true (if this was the first insertion), the value will be unconditionally overwritten anyway, right? (I guess it's a good sentinel to safeguard against not updating it though, so it's probably ok as such, just trying to grasp all aspects of this.)
Right, it's going to be overwritten after insertion, I was just trying to pick a sentinel that would be more likely to crash.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59902/new/
https://reviews.llvm.org/D59902
More information about the llvm-commits
mailing list