mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2026-01-31 01:35:20 +01:00
Summary: This patch registers OpenMPOpt as a Module pass in addition to a CGSCC pass. This is so certain optimzations that are sensitive to intact call-sites can happen before inlining. The old `openmpopt` pass name is changed to `openmp-opt-cgscc` and `openmp-opt` calls the Module pass. The current module pass only runs a single check but will be expanded in the future. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D99202
28 lines
883 B
LLVM
28 lines
883 B
LLVM
; RUN: opt -passes=openmp-opt-cgscc -pass-remarks=openmp-opt -openmp-print-gpu-kernels -disable-output < %s 2>&1 | FileCheck %s --implicit-check-not=non_kernel
|
|
; RUN: opt -openmp-opt-cgscc -pass-remarks=openmp-opt -openmp-print-gpu-kernels -disable-output < %s 2>&1 | FileCheck %s --implicit-check-not=non_kernel
|
|
|
|
; CHECK-DAG: remark: <unknown>:0:0: OpenMP GPU kernel kernel1
|
|
; CHECK-DAG: remark: <unknown>:0:0: OpenMP GPU kernel kernel2
|
|
|
|
define void @kernel1() {
|
|
ret void
|
|
}
|
|
|
|
define void @kernel2() {
|
|
ret void
|
|
}
|
|
|
|
define void @non_kernel() {
|
|
ret void
|
|
}
|
|
|
|
; Needed to trigger the openmp-opt pass
|
|
declare dso_local void @__kmpc_kernel_prepare_parallel(i8*)
|
|
|
|
!nvvm.annotations = !{!2, !0, !1, !3, !1, !2}
|
|
|
|
!0 = !{void ()* @kernel1, !"kernel", i32 1}
|
|
!1 = !{void ()* @non_kernel, !"non_kernel", i32 1}
|
|
!2 = !{null, !"align", i32 1}
|
|
!3 = !{void ()* @kernel2, !"kernel", i32 1}
|