[PATCH] D133065: [nfc][msan] Group checks per instruction
Kevin Athey via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 31 16:53:39 PDT 2022
kda added a comment.
test?
================
Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:1308
+ const ShadowOriginAndInsertPoint &R) {
+ return L.OrigIns < R.OrigIns;
+ });
----------------
I think this yields a stable sort. Is that what you want?
Is there any possibility items could be added in different orders in different runs?
If both are true, then the code generation is non-deterministic.
================
Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:1319
+ // Process all checks of instruction at once.
+ materializeInstructionChecks(InstrumentWithCalls,
+ ArrayRef<ShadowOriginAndInsertPoint>(I, J));
----------------
I wonder if making an implementation that materializes one check would avoid this awkward slicing.
I think you could cook all the logic from materializeInstructionChecks into materializeOneCheck and be done.
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