mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 12:12:47 +01:00
b8d800fd9c
The metadata added in D102361 introduces a module flag that we can check to determine if the module was compiled with `-fopenmp` enables. We can now check for the precense of this instead of scanning the call graph for OpenMP runtime functions. Depends on D102361 Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D102423
33 lines
1.1 KiB
LLVM
33 lines
1.1 KiB
LLVM
; RUN: opt < %s -S -openmp-opt-cgscc | FileCheck %s
|
|
; RUN: opt < %s -S -passes=openmp-opt-cgscc | FileCheck %s
|
|
; RUN: opt < %s -S -openmp-opt-cgscc -openmp-ir-builder-optimistic-attributes | FileCheck %s --check-prefix=OPTIMISTIC
|
|
; RUN: opt < %s -S -passes=openmp-opt-cgscc -openmp-ir-builder-optimistic-attributes | FileCheck %s --check-prefix=OPTIMISTIC
|
|
|
|
target triple = "amdgcn-amd-amdhsa"
|
|
|
|
define void @call_all(i64 %arg) {
|
|
call void @__kmpc_syncwarp(i64 %arg)
|
|
call i64 @__kmpc_warp_active_thread_mask()
|
|
ret void
|
|
}
|
|
|
|
declare i64 @__kmpc_warp_active_thread_mask()
|
|
|
|
declare void @__kmpc_syncwarp(i64)
|
|
|
|
; CHECK: ; Function Attrs: convergent nounwind
|
|
; CHECK-NEXT: declare i64 @__kmpc_warp_active_thread_mask()
|
|
|
|
; CHECK: ; Function Attrs: convergent nounwind
|
|
; CHECK-NEXT: declare void @__kmpc_syncwarp(i64)
|
|
|
|
; OPTIMISTIC: ; Function Attrs: convergent nounwind
|
|
; OPTIMISTIC-NEXT: declare i64 @__kmpc_warp_active_thread_mask()
|
|
|
|
; OPTIMISTIC: ; Function Attrs: convergent nounwind
|
|
; OPTIMISTIC-NEXT: declare void @__kmpc_syncwarp(i64)
|
|
|
|
!llvm.module.flags = !{!0}
|
|
|
|
!0 = !{i32 7, !"openmp", i32 50}
|