It is done to uniformly handle instructions removal.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
LGTM w/comment applied.
Meta comment: It looks from the comment at the top of processBlock that moving away from InstsToErase entirely would actually be a better direction, but the moment, we can be consistent.
lib/Transforms/Scalar/GVN.cpp | ||
---|---|---|
1838 ↗ | (On Diff #120569) | Looking at the code for InstsToErase, it looks like there's an invariant that the map is empty between every instruction. Can you add an assert here to that effect if you agree with the analysis? |
lib/Transforms/Scalar/GVN.cpp | ||
---|---|---|
1838 ↗ | (On Diff #120569) | I will double-check this and commit as a separate NFC. |