[PATCH] D28089: MetadataLoader: replace the tracking of ForwardReferences and UnresolvedNodes with a set-based solution (NFC)

Duncan P. N. Exon Smith via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 24 05:24:42 PST 2016


unordered_set is fairly malloc-heavy.  I suggest SmallDenseSet<1>, to avoid the malloc entirely when there are no forward refs (i.e., outside of debug info).

Otherwise LGTM.

> On 2016-Dec-24, at 01:31, Mehdi AMINI via Phabricator <reviews at reviews.llvm.org> wrote:
> 
> mehdi_amini created this revision.
> mehdi_amini added reviewers: pcc, dexonsmith.
> mehdi_amini added a subscriber: llvm-commits.
> 
> This makes it explicit what is the exact list to handle, and it
> looks much more easy to manipulate and understand that the
> previous custom tracking of min/max to express the range where
> to look for.
> 
> 
> https://reviews.llvm.org/D28089
> 
> Files:
>  llvm/lib/Bitcode/Reader/MetadataLoader.cpp
> 
> <D28089.82433.patch>



More information about the llvm-commits mailing list