This patch ports the PlaceSafepoints pass to the new pass manager as it is used by .NET/Mono. Compatibility with the legacy pass manager is maintained by adding PlaceSafepointsLegacyPass. This pass also depends on PlaceBackedgeSafepointsLegacyPass, which has been kept in the legacy-only variant, since it is apparently used only from PlaceSafepointsPass. It has been renamed, though, to indicate its legacy interface. Reviewed By: aeubanks Differential Revision: https://reviews.llvm.org/D136163
21 lines
525 B
LLVM
21 lines
525 B
LLVM
; RUN: opt < %s -S -passes=place-safepoints | FileCheck %s
|
|
|
|
define void @test(i32, ptr addrspace(1) %ptr) gc "statepoint-example" {
|
|
; CHECK-LABEL: @test
|
|
; CHECK-NEXT: llvm.memset
|
|
; CHECK: do_safepoint
|
|
; CHECK: @foo
|
|
call void @llvm.memset.p1.i64(ptr addrspace(1) align 8 %ptr, i8 0, i64 24, i1 false)
|
|
call void @foo()
|
|
ret void
|
|
}
|
|
|
|
declare void @foo()
|
|
declare void @llvm.memset.p1.i64(ptr addrspace(1), i8, i64, i1)
|
|
|
|
declare void @do_safepoint()
|
|
define void @gc.safepoint_poll() {
|
|
call void @do_safepoint()
|
|
ret void
|
|
}
|