[PATCH] D38944: [GVN] Handle removal of first implicit CF instruction correctly

Daniel Berlin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 17 09:25:24 PDT 2017


dberlin added a comment.

"Even if we mark for deletion, we should update the map immediately to be able to hoist across the marked instruction. Marking alone does not solve the problem, it will still need the same code that also updates the map. If marking is only needed for uniformity of GVN code, this can be done separately from fixing the actual bug."
The instructions will be deleted and the map updated as soon as we return from this function up the call stack.
It will not prevent further anything, because

1. the hoisting has already happened (and all the functions in this stack are going to return and then the next thing that will happen is we will delete the dead instructions)
2. The marked instruction could not have blocked hoisting anyway, or else it would not have been safe to PRE.


https://reviews.llvm.org/D38944





More information about the llvm-commits mailing list