; LLVM IR from turi-code/SFrame :: oss_src/parallel/pthread_tools.ll (ZN8graphlab12thread_group4joinEv)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.std::pair" = type { i64, ptr }
%"class.graphlab::thread_group" = type { i64, i64, %"class.graphlab::mutex", %"class.graphlab::conditional", %"class.std::queue" }
%"class.graphlab::mutex" = type { %union.pthread_mutex_t }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.graphlab::conditional" = type { %union.pthread_cond_t }
%union.pthread_cond_t = type { %struct.__pthread_cond_s }
%struct.__pthread_cond_s = type { %union.__atomic_wide_counter, %union.__atomic_wide_counter, [2 x i32], [2 x i32], i32, i32, [2 x i32] }
%union.__atomic_wide_counter = type { i64 }
%"class.std::queue" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<std::pair<unsigned long, const char *>, std::allocator<std::pair<unsigned long, const char *>>>::_Deque_impl" }
%"struct.std::_Deque_base<std::pair<unsigned long, const char *>, std::allocator<std::pair<unsigned long, const char *>>>::_Deque_impl" = type { %"struct.std::_Deque_base<std::pair<unsigned long, const char *>, std::allocator<std::pair<unsigned long, const char *>>>::_Deque_impl_data" }
%"struct.std::_Deque_base<std::pair<unsigned long, const char *>, std::allocator<std::pair<unsigned long, const char *>>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }

@_ZTIPKc = external constant ptr

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

declare i32 @pthread_join(i64 noundef, ptr noundef) #1

declare ptr @__cxa_allocate_exception(i64)

declare void @__cxa_throw(ptr, ptr, ptr)

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK8graphlab5mutex4lockEv(ptr noundef nonnull align 8 dereferenceable(40)) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK8graphlab5mutex6unlockEv(ptr noundef nonnull align 8 dereferenceable(40)) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8graphlab12thread_group4joinEv(ptr noundef nonnull align 8 dereferenceable(184) %0) #3 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca %"struct.std::pair", align 8
  %4 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %5 = load ptr, ptr %2, align 8
  %6 = getelementptr inbounds %"class.graphlab::thread_group", ptr %5, i32 0, i32 2
  call void @_ZNK8graphlab5mutex4lockEv(ptr noundef nonnull align 8 dereferenceable(40) %6)
  br label %7

7:                                                ; preds = %42, %1
  %8 = getelementptr inbounds %"class.graphlab::thread_group", ptr %5, i32 0, i32 1
  %9 = load i64, ptr %8, align 8, !tbaa !9
  %10 = icmp ugt i64 %9, 0
  br i1 %10, label %11, label %44

11:                                               ; preds = %7
  br label %12

12:                                               ; preds = %15, %11
  %13 = getelementptr inbounds %"class.graphlab::thread_group", ptr %5, i32 0, i32 4
  %14 = call noundef zeroext i1 @_ZNKSt5queueISt4pairImPKcESt5dequeIS3_SaIS3_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %13)
  br i1 %14, label %15, label %18

15:                                               ; preds = %12
  %16 = getelementptr inbounds %"class.graphlab::thread_group", ptr %5, i32 0, i32 3
  %17 = getelementptr inbounds %"class.graphlab::thread_group", ptr %5, i32 0, i32 2
  call void @_ZNK8graphlab11conditional4waitERKNS_5mutexE(ptr noundef nonnull align 8 dereferenceable(48) %16, ptr noundef nonnull align 8 dereferenceable(40) %17)
  br label %12, !llvm.loop !20

18:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 16, ptr %3) #6
  %19 = getelementptr inbounds %"class.graphlab::thread_group", ptr %5, i32 0, i32 4
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5queueISt4pairImPKcESt5dequeIS3_SaIS3_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %19)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %3, ptr align 8 %20, i64 16, i1 false)
  %21 = getelementptr inbounds %"class.graphlab::thread_group", ptr %5, i32 0, i32 4
  call void @_ZNSt5queueISt4pairImPKcESt5dequeIS3_SaIS3_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %21)
  %22 = getelementptr inbounds %"class.graphlab::thread_group", ptr %5, i32 0, i32 1
  %23 = load i64, ptr %22, align 8, !tbaa !9
  %24 = add i64 %23, -1
  store i64 %24, ptr %22, align 8, !tbaa !9
  %25 = getelementptr inbounds %"class.graphlab::thread_group", ptr %5, i32 0, i32 1
  %26 = load i64, ptr %25, align 8, !tbaa !9
  %27 = icmp eq i64 %26, 0
  br i1 %27, label %28, label %30

28:                                               ; preds = %18
  %29 = getelementptr inbounds %"class.graphlab::thread_group", ptr %5, i32 0, i32 0
  store i64 0, ptr %29, align 8, !tbaa !22
  br label %30

30:                                               ; preds = %28, %18
  %31 = getelementptr inbounds %"class.graphlab::thread_group", ptr %5, i32 0, i32 2
  call void @_ZNK8graphlab5mutex6unlockEv(ptr noundef nonnull align 8 dereferenceable(40) %31)
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  store ptr null, ptr %4, align 8, !tbaa !5
  %32 = getelementptr inbounds %"struct.std::pair", ptr %3, i32 0, i32 0
  %33 = load i64, ptr %32, align 8, !tbaa !23
  %34 = call i32 @pthread_join(i64 noundef %33, ptr noundef %4)
  %35 = getelementptr inbounds %"struct.std::pair", ptr %3, i32 0, i32 1
  %36 = load ptr, ptr %35, align 8, !tbaa !25
  %37 = icmp ne ptr %36, null
  br i1 %37, label %38, label %42

38:                                               ; preds = %30
  %39 = call ptr @__cxa_allocate_exception(i64 8) #6
  %40 = getelementptr inbounds %"struct.std::pair", ptr %3, i32 0, i32 1
  %41 = load ptr, ptr %40, align 8, !tbaa !25
  store ptr %41, ptr %39, align 16, !tbaa !5
  call void @__cxa_throw(ptr %39, ptr @_ZTIPKc, ptr null) #7
  unreachable

42:                                               ; preds = %30
  %43 = getelementptr inbounds %"class.graphlab::thread_group", ptr %5, i32 0, i32 2
  call void @_ZNK8graphlab5mutex4lockEv(ptr noundef nonnull align 8 dereferenceable(40) %43)
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %3) #6
  br label %7, !llvm.loop !26

44:                                               ; preds = %7
  %45 = getelementptr inbounds %"class.graphlab::thread_group", ptr %5, i32 0, i32 2
  call void @_ZNK8graphlab5mutex6unlockEv(ptr noundef nonnull align 8 dereferenceable(40) %45)
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt5queueISt4pairImPKcESt5dequeIS3_SaIS3_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80)) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK8graphlab11conditional4waitERKNS_5mutexE(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(40)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5queueISt4pairImPKcESt5dequeIS3_SaIS3_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80)) #4 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5queueISt4pairImPKcESt5dequeIS3_SaIS3_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80)) #4 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { nounwind }
attributes #7 = { noreturn }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 8}
!10 = !{!"_ZTSN8graphlab12thread_groupE", !11, i64 0, !11, i64 8, !12, i64 16, !13, i64 56, !14, i64 104}
!11 = !{!"long", !7, i64 0}
!12 = !{!"_ZTSN8graphlab5mutexE", !7, i64 0}
!13 = !{!"_ZTSN8graphlab11conditionalE", !7, i64 0}
!14 = !{!"_ZTSSt5queueISt4pairImPKcESt5dequeIS3_SaIS3_EEE", !15, i64 0}
!15 = !{!"_ZTSSt5dequeISt4pairImPKcESaIS3_EE", !16, i64 0}
!16 = !{!"_ZTSSt11_Deque_baseISt4pairImPKcESaIS3_EE", !17, i64 0}
!17 = !{!"_ZTSNSt11_Deque_baseISt4pairImPKcESaIS3_EE11_Deque_implE", !18, i64 0}
!18 = !{!"_ZTSNSt11_Deque_baseISt4pairImPKcESaIS3_EE16_Deque_impl_dataE", !6, i64 0, !11, i64 8, !19, i64 16, !19, i64 48}
!19 = !{!"_ZTSSt15_Deque_iteratorISt4pairImPKcERS3_PS3_E", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!10, !11, i64 0}
!23 = !{!24, !11, i64 0}
!24 = !{!"_ZTSSt4pairImPKcE", !11, i64 0, !6, i64 8}
!25 = !{!24, !6, i64 8}
!26 = distinct !{!26, !21}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@_ZTIPKc = external constant ptr

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

declare i32 @pthread_join(i64 noundef, ptr noundef) local_unnamed_addr #1

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK8graphlab5mutex4lockEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK8graphlab5mutex6unlockEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8graphlab12thread_group4joinEv(ptr noundef nonnull align 8 dereferenceable(184) %0) local_unnamed_addr #3 align 2 {
  %2 = alloca ptr, align 8
  %3 = getelementptr inbounds i8, ptr %0, i64 16
  tail call void @_ZNK8graphlab5mutex4lockEv(ptr noundef nonnull align 8 dereferenceable(40) %3)
  %4 = getelementptr inbounds i8, ptr %0, i64 8
  %5 = load i64, ptr %4, align 8, !tbaa !5
  %.not3 = icmp eq i64 %5, 0
  br i1 %.not3, label %._crit_edge4, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %1
  %6 = getelementptr inbounds i8, ptr %0, i64 104
  %7 = getelementptr inbounds i8, ptr %0, i64 56
  br label %.preheader

.preheader:                                       ; preds = %.preheader.lr.ph, %19
  %8 = call noundef zeroext i1 @_ZNKSt5queueISt4pairImPKcESt5dequeIS3_SaIS3_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %6)
  br i1 %8, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader, %.lr.ph
  call void @_ZNK8graphlab11conditional4waitERKNS_5mutexE(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull align 8 dereferenceable(40) %3)
  %9 = call noundef zeroext i1 @_ZNKSt5queueISt4pairImPKcESt5dequeIS3_SaIS3_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80) %6)
  br i1 %9, label %.lr.ph, label %._crit_edge, !llvm.loop !19

._crit_edge:                                      ; preds = %.lr.ph, %.preheader
  %10 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5queueISt4pairImPKcESt5dequeIS3_SaIS3_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80) %6)
  %.sroa.0.0.copyload = load i64, ptr %10, align 8
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %10, i64 8
  %.sroa.4.0.copyload = load ptr, ptr %.sroa.4.0..sroa_idx, align 8
  call void @_ZNSt5queueISt4pairImPKcESt5dequeIS3_SaIS3_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %6)
  %11 = load i64, ptr %4, align 8, !tbaa !5
  %12 = add i64 %11, -1
  store i64 %12, ptr %4, align 8, !tbaa !5
  %13 = icmp eq i64 %12, 0
  br i1 %13, label %14, label %15

14:                                               ; preds = %._crit_edge
  store i64 0, ptr %0, align 8, !tbaa !21
  br label %15

15:                                               ; preds = %14, %._crit_edge
  call void @_ZNK8graphlab5mutex6unlockEv(ptr noundef nonnull align 8 dereferenceable(40) %3)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  store ptr null, ptr %2, align 8, !tbaa !22
  %16 = call i32 @pthread_join(i64 noundef %.sroa.0.0.copyload, ptr noundef nonnull %2)
  %.not2 = icmp eq ptr %.sroa.4.0.copyload, null
  br i1 %.not2, label %19, label %17

17:                                               ; preds = %15
  %18 = call ptr @__cxa_allocate_exception(i64 8) #5
  store ptr %.sroa.4.0.copyload, ptr %18, align 16, !tbaa !22
  call void @__cxa_throw(ptr nonnull %18, ptr nonnull @_ZTIPKc, ptr null) #6
  unreachable

19:                                               ; preds = %15
  call void @_ZNK8graphlab5mutex4lockEv(ptr noundef nonnull align 8 dereferenceable(40) %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  %20 = load i64, ptr %4, align 8, !tbaa !5
  %.not = icmp eq i64 %20, 0
  br i1 %.not, label %._crit_edge4, label %.preheader, !llvm.loop !23

._crit_edge4:                                     ; preds = %19, %1
  call void @_ZNK8graphlab5mutex6unlockEv(ptr noundef nonnull align 8 dereferenceable(40) %3)
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt5queueISt4pairImPKcESt5dequeIS3_SaIS3_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK8graphlab11conditional4waitERKNS_5mutexE(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5queueISt4pairImPKcESt5dequeIS3_SaIS3_EEE5frontEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5queueISt4pairImPKcESt5dequeIS3_SaIS3_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #4 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { noreturn }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 8}
!6 = !{!"_ZTSN8graphlab12thread_groupE", !7, i64 0, !7, i64 8, !10, i64 16, !11, i64 56, !12, i64 104}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN8graphlab5mutexE", !8, i64 0}
!11 = !{!"_ZTSN8graphlab11conditionalE", !8, i64 0}
!12 = !{!"_ZTSSt5queueISt4pairImPKcESt5dequeIS3_SaIS3_EEE", !13, i64 0}
!13 = !{!"_ZTSSt5dequeISt4pairImPKcESaIS3_EE", !14, i64 0}
!14 = !{!"_ZTSSt11_Deque_baseISt4pairImPKcESaIS3_EE", !15, i64 0}
!15 = !{!"_ZTSNSt11_Deque_baseISt4pairImPKcESaIS3_EE11_Deque_implE", !16, i64 0}
!16 = !{!"_ZTSNSt11_Deque_baseISt4pairImPKcESaIS3_EE16_Deque_impl_dataE", !17, i64 0, !7, i64 8, !18, i64 16, !18, i64 48}
!17 = !{!"any pointer", !8, i64 0}
!18 = !{!"_ZTSSt15_Deque_iteratorISt4pairImPKcERS3_PS3_E", !17, i64 0, !17, i64 8, !17, i64 16, !17, i64 24}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!6, !7, i64 0}
!22 = !{!17, !17, i64 0}
!23 = distinct !{!23, !20}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass