; LLVM IR from NVIDIA/DALI :: dali/core/cuda_stream_pool.ll (ZN4dali14CUDAStreamPool3PutEONS_10CUDAStreamEi)

; 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"

%"class.std::unique_lock" = type <{ ptr, i8, [7 x i8] }>
%"class.dali::CUDAStream" = type { %"class.dali::UniqueHandle" }
%"class.dali::UniqueHandle" = type { ptr }
%"class.dali::CUDAStreamPool" = type <{ ptr, %"struct.std::atomic", [4 x i8], %"class.std::vector", %"class.dali::yielding_spinlock", [7 x i8] }>
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i32 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<dali::CUDAStreamPool::StreamEntry *, std::allocator<dali::CUDAStreamPool::StreamEntry *>>::_Vector_impl" }
%"struct.std::_Vector_base<dali::CUDAStreamPool::StreamEntry *, std::allocator<dali::CUDAStreamPool::StreamEntry *>>::_Vector_impl" = type { %"struct.std::_Vector_base<dali::CUDAStreamPool::StreamEntry *, std::allocator<dali::CUDAStreamPool::StreamEntry *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<dali::CUDAStreamPool::StreamEntry *, std::allocator<dali::CUDAStreamPool::StreamEntry *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.dali::yielding_spinlock" = type { %"struct.std::atomic_flag" }
%"struct.std::atomic_flag" = type { %"struct.std::__atomic_flag_base" }
%"struct.std::__atomic_flag_base" = type { i8 }
%"struct.dali::CUDAStreamPool::StreamEntry" = type { %"class.dali::CUDAStream", ptr }

@_ZTIN4dali9CUDAErrorE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str = external hidden unnamed_addr constant [68 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [75 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [38 x i8], align 1
@_ZTISt16invalid_argument = external constant ptr
@__PRETTY_FUNCTION__._ZN4dali14CUDAStreamPool3PutEONS_10CUDAStreamEi = external hidden unnamed_addr constant [51 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) #0

declare ptr @__cxa_begin_catch(ptr)

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN4dali10CUDAStreamaSEOS0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

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

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4dali14CUDAStreamPool4InitEv(ptr noundef nonnull align 8 dereferenceable(41)) #6 align 2

declare ptr @__cxa_allocate_exception(i64)

declare void @__cxa_free_exception(ptr)

declare void @__cxa_throw(ptr, ptr, ptr)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIPN4dali14CUDAStreamPool11StreamEntryESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #7

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN4dali14CUDAStreamPool11StreamEntryESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4dali10CUDAStreamC2EOS0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4dali14CUDAStreamPool3PutEONS_10CUDAStreamEi(ptr noundef nonnull align 8 dereferenceable(41) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, i32 noundef %2) #6 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca %"class.std::unique_lock", align 8
  %11 = alloca ptr, align 8
  %12 = alloca %"class.dali::CUDAStream", align 8
  %13 = alloca i1, align 1
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !9
  %14 = load ptr, ptr %4, align 8
  %15 = load ptr, ptr %5, align 8, !tbaa !5
  %16 = call noundef zeroext i1 @_ZNK4dali12UniqueHandleIP11CUstream_stNS_10CUDAStreamEEcvbEv(ptr noundef nonnull align 8 dereferenceable(8) %15) #12
  br i1 %16, label %24, label %17

17:                                               ; preds = %3
  %18 = call ptr @__cxa_allocate_exception(i64 16) #12
  invoke void @_ZNSt16invalid_argumentC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef @.str.2)
          to label %19 unwind label %20

19:                                               ; preds = %17
  call void @__cxa_throw(ptr %18, ptr @_ZTISt16invalid_argument, ptr @_ZNSt16invalid_argumentD1Ev) #13
  unreachable

20:                                               ; preds = %17
  %21 = landingpad { ptr, i32 }
          cleanup
  %22 = extractvalue { ptr, i32 } %21, 0
  store ptr %22, ptr %7, align 8
  %23 = extractvalue { ptr, i32 } %21, 1
  store i32 %23, ptr %8, align 4
  call void @__cxa_free_exception(ptr %18) #12
  br label %124

24:                                               ; preds = %3
  %25 = load i32, ptr %6, align 4, !tbaa !9
  %26 = icmp slt i32 %25, 0
  br i1 %26, label %27, label %54

27:                                               ; preds = %24
  %28 = load ptr, ptr %5, align 8, !tbaa !5
  %29 = invoke noundef i32 @_ZNK4dali10CUDAStream9GetDeviceEv(ptr noundef nonnull align 8 dereferenceable(8) %28)
          to label %30 unwind label %31

30:                                               ; preds = %27
  store i32 %29, ptr %6, align 4, !tbaa !9
  br label %53

31:                                               ; preds = %27
  %32 = landingpad { ptr, i32 }
          catch ptr @_ZTIN4dali9CUDAErrorE
  %33 = extractvalue { ptr, i32 } %32, 0
  store ptr %33, ptr %7, align 8
  %34 = extractvalue { ptr, i32 } %32, 1
  store i32 %34, ptr %8, align 4
  br label %35

35:                                               ; preds = %31
  %36 = load i32, ptr %8, align 4
  %37 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTIN4dali9CUDAErrorE) #12
  %38 = icmp eq i32 %36, %37
  br i1 %38, label %39, label %124

39:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #12
  %40 = load ptr, ptr %7, align 8
  %41 = call ptr @__cxa_begin_catch(ptr %40) #12
  store ptr %41, ptr %9, align 8
  %42 = load ptr, ptr %9, align 8, !tbaa !5
  %43 = call noundef zeroext i1 @_ZNK4dali9CUDAError12is_unloadingEv(ptr noundef nonnull align 8 dereferenceable(24) %42) #12
  br i1 %43, label %44, label %51

44:                                               ; preds = %39
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZN4dali12UniqueHandleIP11CUstream_stNS_10CUDAStreamEE5resetEv(ptr noundef nonnull align 8 dereferenceable(8) %45)
          to label %46 unwind label %47

46:                                               ; preds = %44
  call void @__cxa_end_catch()
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #12
  br label %121

47:                                               ; preds = %51, %44
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %7, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %8, align 4
  invoke void @__cxa_end_catch()
          to label %52 unwind label %129

51:                                               ; preds = %39
  invoke void @__cxa_rethrow() #13
          to label %132 unwind label %47

52:                                               ; preds = %47
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #12
  br label %124

53:                                               ; preds = %30
  br label %54

54:                                               ; preds = %53, %24
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #12
  %55 = getelementptr inbounds %"class.dali::CUDAStreamPool", ptr %14, i32 0, i32 4
  call void @_ZNSt11unique_lockIN4dali17yielding_spinlockILi100EEEEC2ERS2_(ptr noundef nonnull align 8 dereferenceable(9) %10, ptr noundef nonnull align 1 dereferenceable(1) %55)
  %56 = getelementptr inbounds %"class.dali::CUDAStreamPool", ptr %14, i32 0, i32 3
  %57 = call noundef zeroext i1 @_ZNKSt6vectorIPN4dali14CUDAStreamPool11StreamEntryESaIS3_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %56) #12
  br i1 %57, label %58, label %64

58:                                               ; preds = %54
  invoke void @_ZN4dali14CUDAStreamPool4InitEv(ptr noundef nonnull align 8 dereferenceable(41) %14)
          to label %59 unwind label %60

59:                                               ; preds = %58
  br label %64

60:                                               ; preds = %58
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %7, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %8, align 4
  br label %123

64:                                               ; preds = %59, %54
  %65 = load i32, ptr %6, align 4, !tbaa !9
  %66 = icmp sge i32 %65, 0
  br i1 %66, label %67, label %73

67:                                               ; preds = %64
  %68 = load i32, ptr %6, align 4, !tbaa !9
  %69 = getelementptr inbounds %"class.dali::CUDAStreamPool", ptr %14, i32 0, i32 3
  %70 = call noundef i64 @_ZNKSt6vectorIPN4dali14CUDAStreamPool11StreamEntryESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %69) #12
  %71 = trunc i64 %70 to i32
  %72 = icmp slt i32 %68, %71
  br label %73

73:                                               ; preds = %67, %64
  %74 = phi i1 [ false, %64 ], [ %72, %67 ]
  br i1 %74, label %75, label %76

75:                                               ; preds = %73
  br label %78

76:                                               ; preds = %73
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 97, ptr noundef @__PRETTY_FUNCTION__._ZN4dali14CUDAStreamPool3PutEONS_10CUDAStreamEi) #14
  unreachable

77:                                               ; No predecessors!
  br label %78

78:                                               ; preds = %77, %75
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #12
  %79 = getelementptr inbounds %"class.dali::CUDAStreamPool", ptr %14, i32 0, i32 0
  %80 = invoke noundef ptr @_ZN4dali14CUDAStreamPool3PopERPNS0_11StreamEntryE(ptr noundef nonnull align 8 dereferenceable(8) %79)
          to label %81 unwind label %92

81:                                               ; preds = %78
  store ptr %80, ptr %11, align 8, !tbaa !5
  %82 = load ptr, ptr %11, align 8, !tbaa !5
  %83 = icmp ne ptr %82, null
  br i1 %83, label %108, label %84

84:                                               ; preds = %81
  invoke void @_ZNSt11unique_lockIN4dali17yielding_spinlockILi100EEEE6unlockEv(ptr noundef nonnull align 8 dereferenceable(9) %10)
          to label %85 unwind label %92

85:                                               ; preds = %84
  %86 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 16) #15
          to label %87 unwind label %92

87:                                               ; preds = %85
  store i1 true, ptr %13, align 1
  %88 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZN4dali10CUDAStreamC2EOS0_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %88)
          to label %89 unwind label %96

89:                                               ; preds = %87
  invoke void @_ZN4dali14CUDAStreamPool11StreamEntryC2ENS_10CUDAStreamEPS1_(ptr noundef nonnull align 8 dereferenceable(16) %86, ptr noundef %12, ptr noundef null)
          to label %90 unwind label %100

90:                                               ; preds = %89
  store i1 false, ptr %13, align 1
  store ptr %86, ptr %11, align 8, !tbaa !5
  call void @_ZN4dali12UniqueHandleIP11CUstream_stNS_10CUDAStreamEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #12
  invoke void @_ZNSt11unique_lockIN4dali17yielding_spinlockILi100EEEE4lockEv(ptr noundef nonnull align 8 dereferenceable(9) %10)
          to label %91 unwind label %92

91:                                               ; preds = %90
  br label %114

92:                                               ; preds = %114, %108, %90, %85, %84, %78
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %7, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %8, align 4
  br label %122

96:                                               ; preds = %87
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %7, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %8, align 4
  br label %104

100:                                              ; preds = %89
  %101 = landingpad { ptr, i32 }
          cleanup
  %102 = extractvalue { ptr, i32 } %101, 0
  store ptr %102, ptr %7, align 8
  %103 = extractvalue { ptr, i32 } %101, 1
  store i32 %103, ptr %8, align 4
  call void @_ZN4dali12UniqueHandleIP11CUstream_stNS_10CUDAStreamEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #12
  br label %104

104:                                              ; preds = %100, %96
  %105 = load i1, ptr %13, align 1
  br i1 %105, label %106, label %107

106:                                              ; preds = %104
  call void @_ZdlPvm(ptr noundef %86, i64 noundef 16) #16
  br label %107

107:                                              ; preds = %106, %104
  br label %122

108:                                              ; preds = %81
  %109 = load ptr, ptr %5, align 8, !tbaa !5
  %110 = load ptr, ptr %11, align 8, !tbaa !5
  %111 = getelementptr inbounds %"struct.dali::CUDAStreamPool::StreamEntry", ptr %110, i32 0, i32 0
  %112 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN4dali10CUDAStreamaSEOS0_(ptr noundef nonnull align 8 dereferenceable(8) %111, ptr noundef nonnull align 8 dereferenceable(8) %109)
          to label %113 unwind label %92

113:                                              ; preds = %108
  br label %114

114:                                              ; preds = %113, %91
  %115 = getelementptr inbounds %"class.dali::CUDAStreamPool", ptr %14, i32 0, i32 3
  %116 = load i32, ptr %6, align 4, !tbaa !9
  %117 = sext i32 %116 to i64
  %118 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN4dali14CUDAStreamPool11StreamEntryESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %115, i64 noundef %117) #12
  %119 = load ptr, ptr %11, align 8, !tbaa !5
  invoke void @_ZN4dali14CUDAStreamPool4PushERPNS0_11StreamEntryES2_(ptr noundef nonnull align 8 dereferenceable(8) %118, ptr noundef %119)
          to label %120 unwind label %92

120:                                              ; preds = %114
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #12
  call void @_ZNSt11unique_lockIN4dali17yielding_spinlockILi100EEEED2Ev(ptr noundef nonnull align 8 dereferenceable(9) %10) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #12
  br label %121

121:                                              ; preds = %120, %46
  ret void

122:                                              ; preds = %107, %92
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #12
  br label %123

123:                                              ; preds = %122, %60
  call void @_ZNSt11unique_lockIN4dali17yielding_spinlockILi100EEEED2Ev(ptr noundef nonnull align 8 dereferenceable(9) %10) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #12
  br label %124

124:                                              ; preds = %123, %52, %35, %20
  %125 = load ptr, ptr %7, align 8
  %126 = load i32, ptr %8, align 4
  %127 = insertvalue { ptr, i32 } poison, ptr %125, 0
  %128 = insertvalue { ptr, i32 } %127, i32 %126, 1
  resume { ptr, i32 } %128

129:                                              ; preds = %47
  %130 = landingpad { ptr, i32 }
          catch ptr null
  %131 = extractvalue { ptr, i32 } %130, 0
  call void @__clang_call_terminate(ptr %131) #14
  unreachable

132:                                              ; preds = %51
  unreachable
}

declare void @_ZNSt16invalid_argumentC1EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #8

; Function Attrs: nounwind
declare void @_ZNSt16invalid_argumentD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #9

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK4dali10CUDAStream9GetDeviceEv(ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

; Function Attrs: nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #10

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

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

declare void @__cxa_rethrow()

declare void @__cxa_end_catch()

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt11unique_lockIN4dali17yielding_spinlockILi100EEEEC2ERS2_(ptr noundef nonnull align 8 dereferenceable(9), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt11unique_lockIN4dali17yielding_spinlockILi100EEEE6unlockEv(ptr noundef nonnull align 8 dereferenceable(9)) #6 align 2

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #11

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4dali14CUDAStreamPool11StreamEntryC2ENS_10CUDAStreamEPS1_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, ptr noundef) unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt11unique_lockIN4dali17yielding_spinlockILi100EEEE4lockEv(ptr noundef nonnull align 8 dereferenceable(9)) #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt11unique_lockIN4dali17yielding_spinlockILi100EEEED2Ev(ptr noundef nonnull align 8 dereferenceable(9)) unnamed_addr #2 align 2

attributes #0 = { noinline noreturn nounwind uwtable "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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { inlinehint 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 = { nobuiltin nounwind "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 #6 = { 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 #7 = { noreturn nounwind "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 #8 = { "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 #9 = { nounwind "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 #10 = { nounwind memory(none) }
attributes #11 = { nobuiltin allocsize(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 #12 = { nounwind }
attributes #13 = { noreturn }
attributes #14 = { noreturn nounwind }
attributes #15 = { builtin allocsize(0) }
attributes #16 = { builtin nounwind }

!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, !10, i64 0}
!10 = !{!"int", !7, i64 0}


; 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"

%"class.std::unique_lock" = type <{ ptr, i8, [7 x i8] }>
%"class.dali::CUDAStream" = type { %"class.dali::UniqueHandle" }
%"class.dali::UniqueHandle" = type { ptr }

@_ZTIN4dali9CUDAErrorE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str = external hidden unnamed_addr constant [68 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [75 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [38 x i8], align 1
@_ZTISt16invalid_argument = external constant ptr
@__PRETTY_FUNCTION__._ZN4dali14CUDAStreamPool3PutEONS_10CUDAStreamEi = external hidden unnamed_addr constant [51 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) local_unnamed_addr #0

declare ptr @__cxa_begin_catch(ptr) local_unnamed_addr

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN4dali10CUDAStreamaSEOS0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

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

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4dali14CUDAStreamPool4InitEv(ptr noundef nonnull align 8 dereferenceable(41)) local_unnamed_addr #6 align 2

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

declare void @__cxa_free_exception(ptr) local_unnamed_addr

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIPN4dali14CUDAStreamPool11StreamEntryESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #7

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN4dali14CUDAStreamPool11StreamEntryESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4dali10CUDAStreamC2EOS0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4dali14CUDAStreamPool3PutEONS_10CUDAStreamEi(ptr noundef nonnull align 8 dereferenceable(41) %0, ptr noundef nonnull align 8 dereferenceable(8) %1, i32 noundef %2) local_unnamed_addr #6 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::unique_lock", align 8
  %5 = alloca %"class.dali::CUDAStream", align 8
  %6 = tail call noundef zeroext i1 @_ZNK4dali12UniqueHandleIP11CUstream_stNS_10CUDAStreamEEcvbEv(ptr noundef nonnull align 8 dereferenceable(8) %1) #12
  br i1 %6, label %12, label %7

7:                                                ; preds = %3
  %8 = tail call ptr @__cxa_allocate_exception(i64 16) #12
  invoke void @_ZNSt16invalid_argumentC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull @.str.2)
          to label %9 unwind label %10

9:                                                ; preds = %7
  tail call void @__cxa_throw(ptr nonnull %8, ptr nonnull @_ZTISt16invalid_argument, ptr nonnull @_ZNSt16invalid_argumentD1Ev) #13
  unreachable

10:                                               ; preds = %7
  %11 = landingpad { ptr, i32 }
          cleanup
  tail call void @__cxa_free_exception(ptr %8) #12
  br label %65

12:                                               ; preds = %3
  %13 = icmp slt i32 %2, 0
  br i1 %13, label %14, label %30

14:                                               ; preds = %12
  %15 = invoke noundef i32 @_ZNK4dali10CUDAStream9GetDeviceEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %30 unwind label %16

16:                                               ; preds = %14
  %17 = landingpad { ptr, i32 }
          catch ptr @_ZTIN4dali9CUDAErrorE
  %18 = extractvalue { ptr, i32 } %17, 1
  %19 = tail call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTIN4dali9CUDAErrorE) #12
  %20 = icmp eq i32 %18, %19
  br i1 %20, label %21, label %65

21:                                               ; preds = %16
  %22 = extractvalue { ptr, i32 } %17, 0
  %23 = tail call ptr @__cxa_begin_catch(ptr %22) #12
  %24 = tail call noundef zeroext i1 @_ZNK4dali9CUDAError12is_unloadingEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #12
  br i1 %24, label %25, label %29

25:                                               ; preds = %21
  invoke void @_ZN4dali12UniqueHandleIP11CUstream_stNS_10CUDAStreamEE5resetEv(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %26 unwind label %27

26:                                               ; preds = %25
  tail call void @__cxa_end_catch()
  br label %63

27:                                               ; preds = %29, %25
  %28 = landingpad { ptr, i32 }
          cleanup
  invoke void @__cxa_end_catch()
          to label %65 unwind label %66

29:                                               ; preds = %21
  invoke void @__cxa_rethrow() #13
          to label %69 unwind label %27

30:                                               ; preds = %14, %12
  %.018 = phi i32 [ %2, %12 ], [ %15, %14 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #12
  %31 = getelementptr inbounds i8, ptr %0, i64 40
  call void @_ZNSt11unique_lockIN4dali17yielding_spinlockILi100EEEEC2ERS2_(ptr noundef nonnull align 8 dereferenceable(9) %4, ptr noundef nonnull align 1 dereferenceable(1) %31)
  %32 = getelementptr inbounds i8, ptr %0, i64 16
  %33 = call noundef zeroext i1 @_ZNKSt6vectorIPN4dali14CUDAStreamPool11StreamEntryESaIS3_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %32) #12
  br i1 %33, label %34, label %37

34:                                               ; preds = %30
  invoke void @_ZN4dali14CUDAStreamPool4InitEv(ptr noundef nonnull align 8 dereferenceable(41) %0)
          to label %37 unwind label %35

35:                                               ; preds = %34
  %36 = landingpad { ptr, i32 }
          cleanup
  br label %64

37:                                               ; preds = %34, %30
  %38 = icmp sgt i32 %.018, -1
  br i1 %38, label %39, label %.critedge

39:                                               ; preds = %37
  %40 = call noundef i64 @_ZNKSt6vectorIPN4dali14CUDAStreamPool11StreamEntryESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %32) #12
  %41 = trunc i64 %40 to i32
  %42 = icmp slt i32 %.018, %41
  br i1 %42, label %43, label %.critedge

.critedge:                                        ; preds = %37, %39
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 97, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN4dali14CUDAStreamPool3PutEONS_10CUDAStreamEi) #14
  unreachable

43:                                               ; preds = %39
  %44 = call noundef ptr @_ZN4dali14CUDAStreamPool3PopERPNS0_11StreamEntryE(ptr noundef nonnull align 8 dereferenceable(8) %0)
  %.not = icmp eq ptr %44, null
  br i1 %.not, label %45, label %58

45:                                               ; preds = %43
  invoke void @_ZNSt11unique_lockIN4dali17yielding_spinlockILi100EEEE6unlockEv(ptr noundef nonnull align 8 dereferenceable(9) %4)
          to label %46 unwind label %51

46:                                               ; preds = %45
  %47 = invoke noalias noundef nonnull dereferenceable(16) ptr @_Znwm(i64 noundef 16) #15
          to label %48 unwind label %51

48:                                               ; preds = %46
  invoke void @_ZN4dali10CUDAStreamC2EOS0_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %49 unwind label %53

49:                                               ; preds = %48
  invoke void @_ZN4dali14CUDAStreamPool11StreamEntryC2ENS_10CUDAStreamEPS1_(ptr noundef nonnull align 8 dereferenceable(16) %47, ptr noundef nonnull %5, ptr noundef null)
          to label %50 unwind label %55

50:                                               ; preds = %49
  call void @_ZN4dali12UniqueHandleIP11CUstream_stNS_10CUDAStreamEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #12
  invoke void @_ZNSt11unique_lockIN4dali17yielding_spinlockILi100EEEE4lockEv(ptr noundef nonnull align 8 dereferenceable(9) %4)
          to label %60 unwind label %51

51:                                               ; preds = %58, %50, %46, %45
  %52 = landingpad { ptr, i32 }
          cleanup
  br label %64

53:                                               ; preds = %48
  %54 = landingpad { ptr, i32 }
          cleanup
  br label %57

55:                                               ; preds = %49
  %56 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4dali12UniqueHandleIP11CUstream_stNS_10CUDAStreamEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #12
  br label %57

57:                                               ; preds = %53, %55
  %.pn = phi { ptr, i32 } [ %56, %55 ], [ %54, %53 ]
  call void @_ZdlPvm(ptr noundef nonnull %47, i64 noundef 16) #16
  br label %64

58:                                               ; preds = %43
  %59 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN4dali10CUDAStreamaSEOS0_(ptr noundef nonnull align 8 dereferenceable(8) %44, ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %60 unwind label %51

60:                                               ; preds = %58, %50
  %.0 = phi ptr [ %44, %58 ], [ %47, %50 ]
  %61 = zext nneg i32 %.018 to i64
  %62 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN4dali14CUDAStreamPool11StreamEntryESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %32, i64 noundef %61) #12
  call void @_ZN4dali14CUDAStreamPool4PushERPNS0_11StreamEntryES2_(ptr noundef nonnull align 8 dereferenceable(8) %62, ptr noundef nonnull %.0)
  call void @_ZNSt11unique_lockIN4dali17yielding_spinlockILi100EEEED2Ev(ptr noundef nonnull align 8 dereferenceable(9) %4) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #12
  br label %63

63:                                               ; preds = %60, %26
  ret void

64:                                               ; preds = %51, %57, %35
  %.pn28.pn = phi { ptr, i32 } [ %36, %35 ], [ %52, %51 ], [ %.pn, %57 ]
  call void @_ZNSt11unique_lockIN4dali17yielding_spinlockILi100EEEED2Ev(ptr noundef nonnull align 8 dereferenceable(9) %4) #12
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #12
  br label %65

65:                                               ; preds = %27, %64, %16, %10
  %.merged = phi { ptr, i32 } [ %.pn28.pn, %64 ], [ %17, %16 ], [ %11, %10 ], [ %28, %27 ]
  resume { ptr, i32 } %.merged

66:                                               ; preds = %27
  %67 = landingpad { ptr, i32 }
          catch ptr null
  %68 = extractvalue { ptr, i32 } %67, 0
  tail call void @__clang_call_terminate(ptr %68) #14
  unreachable

69:                                               ; preds = %29
  unreachable
}

declare void @_ZNSt16invalid_argumentC1EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #8

; Function Attrs: nounwind
declare void @_ZNSt16invalid_argumentD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #9

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_ZNK4dali10CUDAStream9GetDeviceEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

; Function Attrs: nofree nosync nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #10

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

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

declare void @__cxa_rethrow() local_unnamed_addr

declare void @__cxa_end_catch() local_unnamed_addr

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt11unique_lockIN4dali17yielding_spinlockILi100EEEEC2ERS2_(ptr noundef nonnull align 8 dereferenceable(9), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt11unique_lockIN4dali17yielding_spinlockILi100EEEE6unlockEv(ptr noundef nonnull align 8 dereferenceable(9)) local_unnamed_addr #6 align 2

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #11

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4dali14CUDAStreamPool11StreamEntryC2ENS_10CUDAStreamEPS1_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, ptr noundef) unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt11unique_lockIN4dali17yielding_spinlockILi100EEEE4lockEv(ptr noundef nonnull align 8 dereferenceable(9)) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt11unique_lockIN4dali17yielding_spinlockILi100EEEED2Ev(ptr noundef nonnull align 8 dereferenceable(9)) unnamed_addr #2 align 2

attributes #0 = { noinline noreturn nounwind uwtable "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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { inlinehint 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 = { nobuiltin nounwind "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 #6 = { 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 #7 = { noreturn nounwind "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 #8 = { "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 #9 = { nounwind "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 #10 = { nofree nosync nounwind memory(none) }
attributes #11 = { nobuiltin allocsize(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 #12 = { nounwind }
attributes #13 = { noreturn }
attributes #14 = { noreturn nounwind }
attributes #15 = { builtin allocsize(0) }
attributes #16 = { builtin nounwind }

!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)"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass