[PATCH] D49946: Fix crash in bounds checking
Joel Galenson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 30 13:20:18 PDT 2018
jgalenson added inline comments.
================
Comment at: lib/Transforms/Instrumentation/BoundsChecking.cpp:159
+ SmallVector<std::pair<Instruction *, Value *>, 4> TrapInfo;
+ for (Instruction *Inst : WorkList) {
+ Value *Or = nullptr;
----------------
eugenis wrote:
> The loop over worklist can be replaced with a loop over instructions(F).
>
> It would work because we no longer create new basic blocks in the loop, and new instructions are added before the current iterator position, so they will not be observed in the following iterations.
Ah, you meant combine this loop with the previous one, not the new one I added below? Sorry, I misunderstood. That makes sense.
https://reviews.llvm.org/D49946
More information about the llvm-commits
mailing list