Previously we'd go off the end of the BI iterator because we expected
that the relative positions of common blocks before and after were
consistent. That's not always true though, for example with
jump-threading.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Sorry for the delay, missed this before going on vacation.
llvm/lib/Passes/StandardInstrumentations.cpp | ||
---|---|---|
553 | I don't understand why you are removing this line. On exiting the loop, (with your change to the loop) BI == BE or *BI == *AI. In the latter case, we still want to advance BI or HandlePotentiallyRemovedData will be called with it on the next time through this loop (AI advances and the above loop will enter when BI != BE and HandlePotentiallyRemovedData will be called with BI before it is advanced). Shouldn't this line be guarded with "if (BI != BE)" instead of being removed? |
llvm/lib/Passes/StandardInstrumentations.cpp | ||
---|---|---|
553 | you're right, fixed |
I don't understand why you are removing this line. On exiting the loop, (with your change to the loop) BI == BE or *BI == *AI. In the latter case, we still want to advance BI or HandlePotentiallyRemovedData will be called with it on the next time through this loop (AI advances and the above loop will enter when BI != BE and HandlePotentiallyRemovedData will be called with BI before it is advanced). Shouldn't this line be guarded with "if (BI != BE)" instead of being removed?