mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
95d08bce87
This change adds a new GC strategy for supporting the CoreCLR runtime. This strategy is currently identical to Statepoint-example GC, but is necessary for several upcoming changes specific to CoreCLR, such as: 1. Base-pointers not explicitly reported for interior pointers 2. Different format for stack-map encoding 3. Location of Safe-point polls: polls are only needed before loop-back edges and before tail-calls (not needed at function-entry) 4. Runtime specific handshake between calls to managed/unmanaged functions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237753 91177308-0d34-0410-b5e6-96231b3b80d8
32 lines
721 B
LLVM
32 lines
721 B
LLVM
; RUN: opt %s -S -place-safepoints | FileCheck %s
|
|
|
|
; Basic test to make sure that safepoints are placed
|
|
; for CoreCLR GC
|
|
|
|
declare void @foo()
|
|
|
|
define void @test_simple_call() gc "coreclr" {
|
|
; CHECK-LABEL: test_simple_call
|
|
entry:
|
|
br label %other
|
|
other:
|
|
; CHECK-LABEL: other
|
|
; CHECK: statepoint
|
|
; CHECK-NOT: gc.result
|
|
call void @foo()
|
|
ret void
|
|
}
|
|
|
|
; This function is inlined when inserting a poll. To avoid recursive
|
|
; issues, make sure we don't place safepoints in it.
|
|
declare void @do_safepoint()
|
|
define void @gc.safepoint_poll() {
|
|
; CHECK-LABEL: gc.safepoint_poll
|
|
; CHECK-LABEL: entry
|
|
; CHECK-NEXT: do_safepoint
|
|
; CHECK-NEXT: ret void
|
|
entry:
|
|
call void @do_safepoint()
|
|
ret void
|
|
}
|