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: unassignedclangb...@nondot.org
          Reporter: pquir...@gmail.com
                CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org,
                    neeil...@live.com, richard-l...@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to