This allows us to add addtional instrumentation before the function start, without splitting the first BB. Removes the BB splitting for KMSAN's prologue.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp | ||
---|---|---|
1097–1098 | Could you also change insertKmsanPrologue to get rid of BB splitting? |
Comment Actions
Move removeUnreachableBlocks before inserting the prologue. This makes sure there's no issue with the ActualFnStart instruction being deleted before the visitor loop.
Could you also change insertKmsanPrologue to get rid of BB splitting?
I'm thinking set ActualFnStart = F.getEntryBlock().getFirstNonPHI() in advance, then simply insert all the KMSan stuff into IRBuilder<>(ActualFnStart).