[PATCH] D42559: [CodeView] Speed up type merging by about 20%
Zachary Turner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 25 15:46:52 PST 2018
zturner added inline comments.
================
Comment at: llvm/lib/DebugInfo/CodeView/TypeStreamMerger.cpp:376-377
+ MutableArrayRef<uint8_t> Storage) {
+ SmallVector<TiReference, 4> Refs;
+ discoverTypeIndices(OriginalType.RecordData, Refs);
+ if (Refs.empty())
----------------
rnk wrote:
> Maybe the next step is to templatize this so we don't have to build a vector of offsets to iterate? Maybe it doesn't matter, though. It'd save the branch on the TiRefKind inside the loop, though.
>
> I think the ideal code for type index remapping would basically be a giant switch on record kind followed by inlined code that implements the remappings inline in each case block.
Yea, I basically had the same idea. Just like we have `ForEachCodeViewRecord` we could have `ForEachTypeIndex` that works the same way. That can be later though.
https://reviews.llvm.org/D42559
More information about the llvm-commits
mailing list