Displaying 20 results from an estimated 1000 matches similar to: "[LLVMdev] Beginner GCRoot Questions"
2008 Apr 28
2
[LLVMdev] getting started with IR needing GC
On Sun, Apr 27, 2008 at 9:34 PM, Gordon Henriksen
<gordonhenriksen at mac.com> wrote:
> As for the compiler plugin interface, I suggest you ignore it
> initially and use the provided shadow-stack option for the time being.
> The shadow stack generates significantly suboptimal code, but will let
> you avoid writing some platform-specific code. Instead, simply copy
> the
2014 Dec 05
9
[LLVMdev] Future plans for GC in LLVM
Now that the statepoint changes have landed, I wanted to start a
discussion about what's next for GC support in LLVM. I'm going to
sketch out a strawman proposal, but I'm not set on any of this. I
mostly just want to draw interested parties out of the woodwork. :)
Overall Direction:
In the short term, my intent is to preserve the functionality of the
existing code, but migrate
2009 Dec 01
1
[LLVMdev] Troubles with llvm.gcroot and exception handling
Hi all,
I'm toying around with LLVM's GC support and am struggling with the
following. I have a little test snippet (a .ll file with IR) that uses
llvm.gcroot to mark a GC root, but when I compile it to assembly with
llc, followed by generating an executable with gcc I get an error
related to exception handling:
22:40|melis at juggle2:~/projects/llvm_gc> cat root.ll
%obj = type { i8*,
2017 Dec 08
4
Non-relocating GC with liveness tracking
Hi Team,
I'm working on a new pure functional language and I'm trying to add GC
support for that.
Because all vars are immutable, the IR that my frontend generates are all
register based, i.e. no alloca, and no readmem, writemem unless
accessing/constructing structs.
If I use the traditional GC with gcroot intrinsic, it will need to emit
more code for liveness tracking, storing the IR
2018 Nov 19
2
Non-relocating GC with liveness tracking
Thanks for reviving this.
I completely forgot the details but I resolved this problem. Looking though
the code, seems I forked RewriteStatepointsForGC pass, and change it to
adding 'gc-livevars' bundle to the call/invoke inst after finding the
livevars, instead of changing it to StatepointCall intrinsic.
On Wed, Nov 14, 2018 at 11:48 AM Philip Reames <listmail at philipreames.com>
2011 Apr 11
0
[LLVMdev] gcroot + `section not found for addresss ...' ???
The linker is going off in the weeds trying to parse the dwarf unwind info. The CIE has:
Leh_frame_common_begin0:
.long 0 ## CIE Identifier Tag
.byte 1 ## DW_CIE_VERSION
.asciz "zLR" ## CIE Augmentation
.byte 1 ## CIE Code Alignment Factor
.byte 120 ## CIE Data Alignment
2011 Apr 10
2
[LLVMdev] gcroot + `section not found for addresss ...' ???
Hi,
If I type
define i32 @main() gc "shadow-stack" {
entry:
%0 = alloca i8*
%1 = call i8* @malloc(i64 1)
store i8* %1, i8** %0
call void @llvm.gcroot(i8** %0, i8* null)
ret i32 0
}
declare i8* @malloc(i64)
declare void @llvm.gcroot(i8**, i8*) nounwind
in test.ll
and then do
> llc test.ll
> gcc test.s
I get the error
ld: in
2011 Apr 12
2
[LLVMdev] gcroot + `section not found for addresss ...' ???
This is an interesting problem. The GC code is being converted into 'invokes' instead of calls:
define i32 @main() gc "shadow-stack" {
entry:
%gc_frame = alloca %gc_stackentry.main
%gc_currhead = load %gc_stackentry** @llvm_gc_root_chain
%gc_frame.map = getelementptr %gc_stackentry.main* %gc_frame, i32 0, i32 0, i32 1
store %gc_map* getelementptr inbounds (%gc_map.0*
2017 Nov 01
0
llvm.gcroot trouble with non-i8* allocas
Solved by using alloca i8*, i32 2 which the system seems happy enough with,
and bitcasting to the actual type for rest of the code after llvm.gcroot.
Not entirely sure if this is a terrible workaround or exactly the way
gcroot is supposed to be used...
On Wed, Nov 1, 2017 at 11:59 AM, Nikodemus Siivola <
nikodemus at random-state.net> wrote:
> I'm allocating { i8*, i32 } on the
2008 Apr 28
0
[LLVMdev] getting started with IR needing GC
On Apr 28, 2008, at 14:28, Lane Schwartz wrote:
> On Sun, Apr 27, 2008 at 9:34 PM, Gordon Henriksen
> <gordonhenriksen at mac.com> wrote:
>
>> As for the compiler plugin interface, I suggest you ignore it
>> initially and use the provided shadow-stack option for the time
>> being. The shadow stack generates significantly suboptimal code,
>> but will
2008 Apr 28
0
[LLVMdev] getting started with IR needing GC
On 2008-04-27, at 21:29, Lane Schwartz wrote:
> Hi guys,
Hi Lane!
This is a lot of questions. I'm not going to answer each individually,
but will instead give general guidance to help you avoid the pain
points…
> I somehow need to inform the garbage collection runtime (my
> copycollector.c) about my variables - specifically about gc roots.
> So, after I get new memory
2014 Jun 04
4
[LLVMdev] Code for late safepoint placement available
As I've mentioned on the mailing list a couple of times over the last
few months, we've been working on an approach for supporting precise
fully relocating garbage collection in LLVM. I am happy to announce
that we now have a version of the code available for public view and
discussion.
https://github.com/AzulSystems/llvm-late-safepoint-placement
2017 Nov 01
2
llvm.gcroot trouble with non-i8* allocas
I'm allocating { i8*, i32 } on the stack, and would like to add this as a
GC root, but I'm having trouble figuring this out.
This works as expected:
declare void @llvm.gcroot(i8** %ptrloc, i8* %metadata)
define i8* @bar(i8* %x) gc "shadow-stack" {
entry:
%objptr = alloca i8*
call void @llvm.gcroot(i8** %objptr, i8* null)
store i8* %x, i8** %objptr
%v = load i8*, i8**
2008 Apr 28
3
[LLVMdev] getting started with IR needing GC
On Mon, Apr 21, 2008 at 8:13 PM, Gordon Henriksen
<gordonhenriksen at mac.com> wrote:
>
> Hi Terence,
>
>
> I think you're getting hung up on the details of the shadow stack collector.
> The shadow stack is a GC that is possible within this framework, but of
> course could be implemented without any special support. Its presence is
> more misleading than anything
2016 Mar 03
2
Status of Garbage Collection with Statepoints in LLVM
Hello LLVM community,
We have been experimenting with using LLVM IR as a target for a managed
(dynamically typed) language via an AOT compiler (including a backend for
ARM). One main challenge is getting the garbage collection right: We would
like to be able to implement a moving collector. This requires us to a)
find a precise set of root pointers and b) be able to rewrite those
pointers after
2014 Jun 05
2
[LLVMdev] Code for late safepoint placement available
Thanks for the comments and for taking a look.
On 06/05/2014 02:19 AM, David Chisnall wrote:
> Hi Philip,
>
> The first thing that I notice on looking at the code is the lack of comments. For example, about the only comment that I see in include /llvm/IR/Statepoint.h is a note telling me that a class is only intended to be used on the stack. Doxygen comments and, for a feature like
2013 Jul 31
0
[LLVMdev] New ideas about how to improve garbage collection support
Hi,
I currently write a LLVM backend for RPython, a programming language
and
toolchain to write dynamic language interpreters. For example, this
toolchain powers PyPy, a fast Python interpreter. In the moment the
implementation uses a shadowstack to manage garbage collection stack
roots. To improve performance, I experimented with LLVM's garbage
collection support.
It works by marking a
2008 Apr 21
0
[LLVMdev] getting started with IR needing GC
Hi Terence,
On 2008-04-20, at 20:08, Terence Parr wrote:
> I've exhausted what I can do on my own to make a GC example bind
> (usual googling, reading, playing, looking at source). I can't find
> the shadow collector lib or perhaps the -l options needed to link my
> sample (not even to point where I'm figuring out GC actually as I
> can't link).
The shadow
2008 Apr 21
2
[LLVMdev] getting started with IR needing GC
Howdy do LLVM folks!
I've exhausted what I can do on my own to make a GC example bind
(usual googling, reading, playing, looking at source). I can't find
the shadow collector lib or perhaps the -l options needed to link my
sample (not even to point where I'm figuring out GC actually as I
can't link). Not sure this IR is correct but here is what I've been
playing
2015 Jun 17
3
[LLVMdev] design question on inlining through statepoints and patchpoints
I've been looking at inlining invokes / calls done through statepoints
and I want to have a design discussion before I sink too much time
into something I'll have to throw away. I'm not actively working on
adding inlining support to patchpoints, but I suspect these issues are
applicable towards teaching LLVM to inline through patchpoints as
well.
There are two distinct problems to