Description
Bugzilla Link | 33282 |
Version | trunk |
OS | All |
Reporter | LLVM Bugzilla Contributor |
CC | @bryant |
Extended Description
Bryant Wong, besides pointing out a bug in ValueDFS (which ends up not affecting anything but is still wrong :P), pointed out to me that including all the uses in the vectors is pointless.
Every time we see a def dominate another def, we can replace all the uses, so we are just wasting time by including them and sorting them.
I have a prototype that does this, and it saves about 200 lines of code in eliminateinstructions.
i haven't measured any speed change (not surprising, we walk the uses either way and the sort is fast).
Right now, my prototype doesn't do as good at dead code elimination as we do, and we would have to move how we handle replacing predicatienfo arguments (but it would still be simple, we just have to record whether we ended up killing them during the stack walk or not).
But it may be worth getting back to at some point.