mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 20:23:11 +01:00
b22ea77d18
Summary: Particularly, with --delete, this can be very useful for testing new optimizations on some hotspots, without having to run it on the whole application. E.g. as such: ``` llvm-extract app.bc --recursive --rfunc .*hotspot.* > hotspot.bc llvm-extract app.bc --recursive --delete --rfunc .*hotspot.* > residual.bc llc -filetype=obj residual.bc > residual.o llc -filetype=obj hotspot.bc > hotspot.o cc -o app residual.o hotspot.o ``` Reviewed By: davide Differential Revision: https://reviews.llvm.org/D31722 llvm-svn: 299706
33 lines
681 B
LLVM
33 lines
681 B
LLVM
; RUN: llvm-extract -func=a --recursive %s -S | FileCheck --check-prefix=CHECK-AB %s
|
|
; RUN: llvm-extract -func=a --recursive --delete %s -S | FileCheck --check-prefix=CHECK-CD %s
|
|
; RUN: llvm-extract -func=d --recursive %s -S | FileCheck --check-prefix=CHECK-CD %s
|
|
|
|
; CHECK-AB: define void @a
|
|
; CHECK-AB: define void @b
|
|
; CHECK-AB-NOT: define void @c
|
|
; CHECK-AB-NOT: define void @d
|
|
|
|
; CHECK-CD-NOT: define void @a
|
|
; CHECK-CD-NOT: define void @b
|
|
; CHECK-CD: define void @c
|
|
; CHECK-CD: define void @d
|
|
|
|
define void @a() {
|
|
call void @b()
|
|
ret void
|
|
}
|
|
|
|
define void @b() {
|
|
ret void
|
|
}
|
|
|
|
define void @c() {
|
|
call void @d()
|
|
ret void
|
|
}
|
|
|
|
define void @d() {
|
|
call void @c()
|
|
ret void
|
|
}
|