[PATCH] D55563: [BDCE][DemandedBits] Detect dead uses of undead instructions

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 31 09:01:00 PST 2018


hfinkel added a comment.

In D55563#1342816 <https://reviews.llvm.org/D55563#1342816>, @nikic wrote:

> Fix removal of dead uses. The previous version had a check whether the previous demanded bits are empty and only dropped the use from the DeadUses set in that case. The motivation for this was that the use could only be part of DeadUses if the demanded bits are empty, so we can save a redundant hash lookup. Of course, this is not actually true, because the previous demanded bits are for the instruction across all users, which is a superset of the demanded bits for a single use. (That being kind of the whole point of this change, I'm really not sure what I was thinking there...)
>
> So now I'm just always doing the erase() call when a use has non-empty demanded bits. I've also added a testcase that was miscompiled with the previous version. I believe that this is also what caused the failure in enc-3des from the test-suite.


LGTM


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55563/new/

https://reviews.llvm.org/D55563





More information about the llvm-commits mailing list