1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-02-01 05:01:59 +01:00
Fedor Sergeev 9146e8f676 [PM] port Rewrite Statepoints For GC to the new pass manager.
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

llvm-svn: 320796
2017-12-15 09:32:11 +00:00

16 lines
607 B
LLVM

; A call to a libcall function is not a statepoint.
; This test verifies that calls to libcalls functions do not get converted to
; statepoint calls.
; RUN: opt -S -rewrite-statepoints-for-gc < %s | FileCheck %s
; RUN: opt -S -passes=rewrite-statepoints-for-gc < %s | FileCheck %s
declare double @ldexp(double %x, i32 %n) nounwind readnone
define double @test_libcall(double %x) gc "statepoint-example" {
; CHECK-LABEL: test_libcall
; CHECK-NEXT: %res = call double @ldexp(double %x, i32 5)
; CHECK-NEXT: ret double %res
%res = call double @ldexp(double %x, i32 5) nounwind readnone
ret double %res
}