[llvm-bugs] [Bug 33282] New: NewGVN: We could eliminate about 200 lines of code from eliminateInstructions
llvm-bugs at lists.llvm.org
Fri Jun 2 10:22:32 PDT 2017
Bug ID: 33282
Summary: NewGVN: We could eliminate about 200 lines of code
Component: Scalar Optimizations
Assignee: unassignedbugs at nondot.org
Reporter: dberlin at dberlin.org
CC: llvm-bugs at lists.llvm.org
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
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.
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-bugs