[LLVMbugs] [Bug 17577] New: Constructors/destructors that link/unlink objects could be better at eliminating dead objects

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Oct 14 12:42:47 PDT 2013


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

            Bug ID: 17577
           Summary: Constructors/destructors that link/unlink objects
                    could be better at eliminating dead objects
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Common Code Generator Code
          Assignee: unassignedbugs at nondot.org
          Reporter: erik at arbat.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 11374
  --> http://llvm.org/bugs/attachment.cgi?id=11374&action=edit
Example of smart pointers for keeping track of GC roots on the stack

Currently experimenting with smart pointer for the oilpan project in Blink. 
This is a project to move Blink from reference counting to a traced heap. 
Reachability of objects is determined transitively from roots, including roots
related to local variables on the stack.  This is done with smart pointers.  We
are trying different smart pointer models.  This one is one where the compiler
ought to be able to eliminate much of the smart pointering.  Clang partially
succeeds, eliminating the destructors, but still performing the linking up in
the constructor.

Is there any way we could restructure the code to make this easier for the
compiler, or is there a fix for the compiler that would help?

See attached code.

-- 
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/20131014/9d565c87/attachment.html>


More information about the llvm-bugs mailing list