[PATCH] D39369: [GVN][NFC] Mark instruction for deletion instead of immediate erasing in LoadPRE
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 27 09:35:10 PDT 2017
reames accepted this revision.
reames added a comment.
This revision is now accepted and ready to land.
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.
================
Comment at: lib/Transforms/Scalar/GVN.cpp:1838
bool GVN::processInstruction(Instruction *I) {
// Ignore dbg info intrinsics.
if (isa<DbgInfoIntrinsic>(I))
----------------
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?
https://reviews.llvm.org/D39369
More information about the llvm-commits
mailing list