[LLVMbugs] [Bug 21733] New: [Statepoint] Remove gc pointer arguments which aren't used after relocation.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Dec 3 11:36:25 PST 2014


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: unassignedbugs at nondot.org
          Reporter: listmail at philipreames.com
                CC: llvmbugs at cs.uiuc.edu
    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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20141203/7d642fee/attachment.html>


More information about the llvm-bugs mailing list