[llvm-bugs] [Bug 43101] New: add pointer stack to improve garbage collection

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Aug 23 07:54:08 PDT 2019


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

            Bug ID: 43101
           Summary: add pointer stack to improve garbage collection
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: pquiring at gmail.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
                    neeilans at live.com, richard-llvm at metafoo.co.uk

To aid in garbage collection I think it could improve performance if C++ had a
second stack just for pointers.
The usual (rsp/rbp) would be for primitive types, return address, register
saves, etc.  But add a new stack (r12/r13) that would just hold pointer types.
Since these registers are preserved any function would preserve the stack.
Functions that use this second stack could have an attribute assigned to them.
  [[pointer_stack]] void my_function() {...}
The epilogue of these functions could also zero out the stack as they removed
locals, and the calling function must zero out arguments.
This would be one step closer to real-time GC.  Just need to figure out how to
deal with threads that 'move' pointers around.

Just an idea.

Thanks,

-- 
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/20190823/ddc9472d/attachment.html>


More information about the llvm-bugs mailing list