[PATCH] D21076: [DSE] Ignore dbg value when instruction iterator is reset.

Henric Karlsson via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 7 08:10:05 PDT 2016


Henric added a comment.

An other approach is to set BBI = BB.begin() instead of stepping one instruction back. with --BBI.
What can happen is that when removing a dead store we might delete now dead loads as well. And in some cases this opens up for new DSE. (which is the case in the submitted test case) In the supplied test the new store is just before the initial target which triggers an other removal, but one can easily construct a case where we have other instructions in between. 
So if we instead start from the beginning of the BB we might open up for more optimizations. But this of course changes the complexity of the function.


http://reviews.llvm.org/D21076





More information about the llvm-commits mailing list