[PATCH] D133065: [nfc][msan] Group checks per instruction
Vitaly Buka via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 1 11:33:53 PDT 2022
vitalybuka added inline comments.
================
Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:1305-1308
+ llvm::stable_sort(InstrumentationList,
+ [](const ShadowOriginAndInsertPoint &L,
+ const ShadowOriginAndInsertPoint &R) {
+ return L.OrigIns < R.OrigIns;
----------------
kstoimenov wrote:
> You are trying to dedupe members of the list, right? Isn't it more efficient to use a hash table instead? Wherever you consume this have a hash table, add elements to it and check check if it is already present then just skip over it.
Not exactly. I need to handle them together.
For mostly unique items, like here, pretty sure sorting is faster.
However I am concerned with non-determinism of sorting by pointer.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133065/new/
https://reviews.llvm.org/D133065
More information about the llvm-commits
mailing list