https://bugs.llvm.org/show_bug.cgi?id=33282

            Bug ID: 33282
           Summary: NewGVN: We could eliminate about 200 lines of code
                    from eliminateInstructions
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Scalar Optimizations
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]

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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to