mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-08 19:46:39 +00:00
![Fedor Sergeev](/assets/img/avatar_default.png)
Summary: The port is nearly straightforward. The only complication is related to the analyses handling, since one of the analyses used in this module pass is domtree, which is a function analysis. That requires asking for the results of each function and disallows a single interface for run-on-module pass action. Decided to copy-paste the main body of this pass. Most of its code is requesting analyses anyway, so not that much of a copy-paste. The rest of the code movement is to transform all the implementation helper functions like stripNonValidData into non-member statics. Extended all the related LLVM tests with new-pass-manager use. No failures. Reviewers: sanjoy, anna, reames Reviewed By: anna Subscribers: skatkov, llvm-commits Differential Revision: https://reviews.llvm.org/D41162 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320796 91177308-0d34-0410-b5e6-96231b3b80d8
33 lines
771 B
LLVM
33 lines
771 B
LLVM
; RUN: opt < %s -S -rewrite-statepoints-for-gc | FileCheck %s
|
|
; RUN: opt < %s -S -passes=rewrite-statepoints-for-gc | 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
|
|
}
|