; LLVM IR from JoshuaSBrown/QC_Tools :: src/libcatnip/matrix.ll (ZN6catnip11Matrix_diagERKNS_6MatrixE)

; 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.catnip::Matrix" = type { i32, i32, i32, ptr }

@.str = external hidden unnamed_addr constant [68 x i8], align 1
@_ZTISt16invalid_argument = external constant ptr
@.str.1 = external hidden unnamed_addr constant [95 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6catnip11Matrix_diagERKNS_6MatrixE(ptr dead_on_unwind noalias writable sret(%"class.catnip::Matrix") align 8 %0, ptr noundef nonnull align 8 dereferenceable(24) %1) #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca double, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca double, align 8
  store ptr %1, ptr %3, align 8, !tbaa !5
  %12 = load ptr, ptr %3, align 8, !tbaa !5
  %13 = call noundef i32 @_ZNK6catnip6Matrix8get_colsEv(ptr noundef nonnull align 8 dereferenceable(24) %12)
  %14 = icmp sgt i32 %13, 1
  br i1 %14, label %15, label %26

15:                                               ; preds = %2
  %16 = load ptr, ptr %3, align 8, !tbaa !5
  %17 = call noundef i32 @_ZNK6catnip6Matrix8get_rowsEv(ptr noundef nonnull align 8 dereferenceable(24) %16)
  %18 = icmp sgt i32 %17, 1
  br i1 %18, label %19, label %26

19:                                               ; preds = %15
  %20 = call ptr @__cxa_allocate_exception(i64 16) #5
  invoke void @_ZNSt16invalid_argumentC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef @.str)
          to label %21 unwind label %22

21:                                               ; preds = %19
  call void @__cxa_throw(ptr %20, ptr @_ZTISt16invalid_argument, ptr @_ZNSt16invalid_argumentD1Ev) #6
  unreachable

22:                                               ; preds = %19
  %23 = landingpad { ptr, i32 }
          cleanup
  %24 = extractvalue { ptr, i32 } %23, 0
  store ptr %24, ptr %4, align 8
  %25 = extractvalue { ptr, i32 } %23, 1
  store i32 %25, ptr %5, align 4
  call void @__cxa_free_exception(ptr %20) #5
  br label %86

26:                                               ; preds = %15, %2
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  %28 = call noundef i32 @_ZNK6catnip6Matrix8get_shelEv(ptr noundef nonnull align 8 dereferenceable(24) %27)
  %29 = icmp sgt i32 %28, 1
  br i1 %29, label %30, label %37

30:                                               ; preds = %26
  %31 = call ptr @__cxa_allocate_exception(i64 16) #5
  invoke void @_ZNSt16invalid_argumentC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %31, ptr noundef @.str.1)
          to label %32 unwind label %33

32:                                               ; preds = %30
  call void @__cxa_throw(ptr %31, ptr @_ZTISt16invalid_argument, ptr @_ZNSt16invalid_argumentD1Ev) #6
  unreachable

33:                                               ; preds = %30
  %34 = landingpad { ptr, i32 }
          cleanup
  %35 = extractvalue { ptr, i32 } %34, 0
  store ptr %35, ptr %4, align 8
  %36 = extractvalue { ptr, i32 } %34, 1
  store i32 %36, ptr %5, align 4
  call void @__cxa_free_exception(ptr %31) #5
  br label %86

37:                                               ; preds = %26
  %38 = load ptr, ptr %3, align 8, !tbaa !5
  %39 = call noundef i32 @_ZNK6catnip6Matrix8get_colsEv(ptr noundef nonnull align 8 dereferenceable(24) %38)
  %40 = load ptr, ptr %3, align 8, !tbaa !5
  %41 = call noundef i32 @_ZNK6catnip6Matrix8get_rowsEv(ptr noundef nonnull align 8 dereferenceable(24) %40)
  %42 = icmp sgt i32 %39, %41
  br i1 %42, label %43, label %64

43:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %44 = load ptr, ptr %3, align 8, !tbaa !5
  %45 = call noundef i32 @_ZNK6catnip6Matrix8get_colsEv(ptr noundef nonnull align 8 dereferenceable(24) %44)
  store i32 %45, ptr %6, align 4, !tbaa !9
  %46 = load i32, ptr %6, align 4, !tbaa !9
  %47 = load i32, ptr %6, align 4, !tbaa !9
  call void @_ZN6catnip6MatrixC1Eii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %46, i32 noundef %47)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 1, ptr %7, align 4, !tbaa !9
  br label %48

48:                                               ; preds = %60, %43
  %49 = load i32, ptr %7, align 4, !tbaa !9
  %50 = load i32, ptr %6, align 4, !tbaa !9
  %51 = icmp sle i32 %49, %50
  br i1 %51, label %53, label %52

52:                                               ; preds = %48
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %63

53:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %54 = load ptr, ptr %3, align 8, !tbaa !5
  %55 = load i32, ptr %7, align 4, !tbaa !9
  %56 = call noundef double @_ZNK6catnip6Matrix8get_elemEii(ptr noundef nonnull align 8 dereferenceable(24) %54, i32 noundef 1, i32 noundef %55)
  store double %56, ptr %8, align 8, !tbaa !11
  %57 = load double, ptr %8, align 8, !tbaa !11
  %58 = load i32, ptr %7, align 4, !tbaa !9
  %59 = load i32, ptr %7, align 4, !tbaa !9
  call void @_ZN6catnip6Matrix8set_elemEdii(ptr noundef nonnull align 8 dereferenceable(24) %0, double noundef %57, i32 noundef %58, i32 noundef %59)
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %60

60:                                               ; preds = %53
  %61 = load i32, ptr %7, align 4, !tbaa !9
  %62 = add nsw i32 %61, 1
  store i32 %62, ptr %7, align 4, !tbaa !9
  br label %48, !llvm.loop !13

63:                                               ; preds = %52
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %85

64:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %65 = load ptr, ptr %3, align 8, !tbaa !5
  %66 = call noundef i32 @_ZNK6catnip6Matrix8get_rowsEv(ptr noundef nonnull align 8 dereferenceable(24) %65)
  store i32 %66, ptr %9, align 4, !tbaa !9
  %67 = load i32, ptr %9, align 4, !tbaa !9
  %68 = load i32, ptr %9, align 4, !tbaa !9
  call void @_ZN6catnip6MatrixC1Eii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %67, i32 noundef %68)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 1, ptr %10, align 4, !tbaa !9
  br label %69

69:                                               ; preds = %81, %64
  %70 = load i32, ptr %10, align 4, !tbaa !9
  %71 = load i32, ptr %9, align 4, !tbaa !9
  %72 = icmp sle i32 %70, %71
  br i1 %72, label %74, label %73

73:                                               ; preds = %69
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %84

74:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %75 = load ptr, ptr %3, align 8, !tbaa !5
  %76 = load i32, ptr %10, align 4, !tbaa !9
  %77 = call noundef double @_ZNK6catnip6Matrix8get_elemEii(ptr noundef nonnull align 8 dereferenceable(24) %75, i32 noundef %76, i32 noundef 1)
  store double %77, ptr %11, align 8, !tbaa !11
  %78 = load double, ptr %11, align 8, !tbaa !11
  %79 = load i32, ptr %10, align 4, !tbaa !9
  %80 = load i32, ptr %10, align 4, !tbaa !9
  call void @_ZN6catnip6Matrix8set_elemEdii(ptr noundef nonnull align 8 dereferenceable(24) %0, double noundef %78, i32 noundef %79, i32 noundef %80)
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %81

81:                                               ; preds = %74
  %82 = load i32, ptr %10, align 4, !tbaa !9
  %83 = add nsw i32 %82, 1
  store i32 %83, ptr %10, align 4, !tbaa !9
  br label %69, !llvm.loop !15

84:                                               ; preds = %73
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %85

85:                                               ; preds = %84, %63
  ret void

86:                                               ; preds = %33, %22
  %87 = load ptr, ptr %4, align 8
  %88 = load i32, ptr %5, align 4
  %89 = insertvalue { ptr, i32 } poison, ptr %87, 0
  %90 = insertvalue { ptr, i32 } %89, i32 %88, 1
  resume { ptr, i32 } %90
}

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

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

declare ptr @__cxa_allocate_exception(i64)

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

declare i32 @__gxx_personality_v0(...)

declare void @__cxa_free_exception(ptr)

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

declare void @__cxa_throw(ptr, ptr, ptr)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZNK6catnip6Matrix8get_elemEii(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6catnip6Matrix8set_elemEdii(ptr noundef nonnull align 8 dereferenceable(24), double noundef, i32 noundef, i32 noundef) #0 align 2

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

declare void @_ZN6catnip6MatrixC1Eii(ptr, i32, i32)

attributes #0 = { 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 #1 = { 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 #2 = { "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 = { 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 #4 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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, !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}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}


; 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.catnip::Matrix" = type { i32, i32, i32, ptr }

@.str = external hidden unnamed_addr constant [68 x i8], align 1
@_ZTISt16invalid_argument = external constant ptr
@.str.1 = external hidden unnamed_addr constant [95 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6catnip11Matrix_diagERKNS_6MatrixE(ptr dead_on_unwind noalias writable sret(%"class.catnip::Matrix") align 8 %0, ptr noundef nonnull align 8 dereferenceable(24) %1) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %3 = tail call noundef i32 @_ZNK6catnip6Matrix8get_colsEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %4 = icmp sgt i32 %3, 1
  br i1 %4, label %5, label %13

5:                                                ; preds = %2
  %6 = tail call noundef i32 @_ZNK6catnip6Matrix8get_rowsEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %7 = icmp sgt i32 %6, 1
  br i1 %7, label %8, label %13

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

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

11:                                               ; preds = %8
  %12 = landingpad { ptr, i32 }
          cleanup
  br label %33

13:                                               ; preds = %5, %2
  %14 = tail call noundef i32 @_ZNK6catnip6Matrix8get_shelEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %15 = icmp sgt i32 %14, 1
  br i1 %15, label %16, label %21

16:                                               ; preds = %13
  %17 = tail call ptr @__cxa_allocate_exception(i64 16) #4
  invoke void @_ZNSt16invalid_argumentC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull @.str.1)
          to label %18 unwind label %19

18:                                               ; preds = %16
  tail call void @__cxa_throw(ptr nonnull %17, ptr nonnull @_ZTISt16invalid_argument, ptr nonnull @_ZNSt16invalid_argumentD1Ev) #5
  unreachable

19:                                               ; preds = %16
  %20 = landingpad { ptr, i32 }
          cleanup
  br label %33

21:                                               ; preds = %13
  %22 = tail call noundef i32 @_ZNK6catnip6Matrix8get_colsEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %23 = tail call noundef i32 @_ZNK6catnip6Matrix8get_rowsEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  %24 = icmp sgt i32 %22, %23
  br i1 %24, label %25, label %29

25:                                               ; preds = %21
  %26 = tail call noundef i32 @_ZNK6catnip6Matrix8get_colsEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  tail call void @_ZN6catnip6MatrixC1Eii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %26, i32 noundef %26)
  %.not3136 = icmp slt i32 %26, 1
  br i1 %.not3136, label %.loopexit, label %.lr.ph38

.lr.ph38:                                         ; preds = %25, %.lr.ph38
  %.03037 = phi i32 [ %28, %.lr.ph38 ], [ 1, %25 ]
  %27 = tail call noundef double @_ZNK6catnip6Matrix8get_elemEii(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef 1, i32 noundef %.03037)
  tail call void @_ZN6catnip6Matrix8set_elemEdii(ptr noundef nonnull align 8 dereferenceable(24) %0, double noundef %27, i32 noundef %.03037, i32 noundef %.03037)
  %28 = add nuw i32 %.03037, 1
  %exitcond40.not = icmp eq i32 %.03037, %26
  br i1 %exitcond40.not, label %.loopexit, label %.lr.ph38, !llvm.loop !5

29:                                               ; preds = %21
  %30 = tail call noundef i32 @_ZNK6catnip6Matrix8get_rowsEv(ptr noundef nonnull align 8 dereferenceable(24) %1)
  tail call void @_ZN6catnip6MatrixC1Eii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %30, i32 noundef %30)
  %.not34 = icmp slt i32 %30, 1
  br i1 %.not34, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %29, %.lr.ph
  %.02835 = phi i32 [ %32, %.lr.ph ], [ 1, %29 ]
  %31 = tail call noundef double @_ZNK6catnip6Matrix8get_elemEii(ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %.02835, i32 noundef 1)
  tail call void @_ZN6catnip6Matrix8set_elemEdii(ptr noundef nonnull align 8 dereferenceable(24) %0, double noundef %31, i32 noundef %.02835, i32 noundef %.02835)
  %32 = add nuw i32 %.02835, 1
  %exitcond.not = icmp eq i32 %.02835, %30
  br i1 %exitcond.not, label %.loopexit, label %.lr.ph, !llvm.loop !7

.loopexit:                                        ; preds = %.lr.ph, %.lr.ph38, %29, %25
  ret void

33:                                               ; preds = %19, %11
  %.sink = phi ptr [ %17, %19 ], [ %9, %11 ]
  %.pn = phi { ptr, i32 } [ %20, %19 ], [ %12, %11 ]
  tail call void @__cxa_free_exception(ptr %.sink) #4
  resume { ptr, i32 } %.pn
}

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

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

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

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

declare i32 @__gxx_personality_v0(...)

declare void @__cxa_free_exception(ptr) local_unnamed_addr

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZNK6catnip6Matrix8get_elemEii(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef, i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6catnip6Matrix8set_elemEdii(ptr noundef nonnull align 8 dereferenceable(24), double noundef, i32 noundef, i32 noundef) local_unnamed_addr #0 align 2

declare void @_ZN6catnip6MatrixC1Eii(ptr, i32, i32) local_unnamed_addr

attributes #0 = { 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 #1 = { 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 #2 = { "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 = { 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 #4 = { nounwind }
attributes #5 = { 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = distinct !{!7, !6}


; Effective O3 passes: GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass