http://llvm.org/bugs/show_bug.cgi?id=21733

            Bug ID: 21733
           Summary: [Statepoint] Remove gc pointer arguments which aren't
                    used after relocation.
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Scalar Optimizations
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

In a relocating collector, if the relocation of a pointer is never used,
there's no reason to relocate it at a given safepoint.  

If (after optimization) we end up with a gc.relocate which has no uses, the
gc.relocate can be removed.

If we end up with an argument to the gc.statepoint which is not used by any
gc.relocate, we can replace the argument with undef (so as not to perturb the
argument numbers for other gc.relocates).  Note that this optimization is only
sound if relocations are being explicitly represented in the IR.  For
non-relocating or partially relocating collectors this may not be the case.  As
a result, this should be made conditional on a property of the collector.

This is not intended to be a replacement for decent liveness analysis in the
code inserting statepoints; it's purpose is simply to clean up obvious badness
exposed by post insertion optimization.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to