; LLVM IR from gem5/gem5 :: ext/systemc/src/sysc/utils/sc_string.ll (ZN5sc_dt13sc_string_old9to_stringEPKcz)

; 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.sc_dt::sc_string_old" = type { ptr }
%struct.__va_list_tag = type { i32, i32, ptr, ptr }

@_ZN7sc_core22SC_ID_STRING_TOO_LONG_E = external constant [0 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [84 x i8], align 1

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

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) #2

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5sc_dt13sc_string_old9to_stringEPKcz(ptr dead_on_unwind noalias writable sret(%"class.sc_dt::sc_string_old") align 8 %0, ptr noundef %1, ...) #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca [1 x %struct.__va_list_tag], align 16
  %6 = alloca i1, align 1
  %7 = alloca [1024 x i8], align 16
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #7
  store i1 false, ptr %6, align 1
  call void @_ZN5sc_dt13sc_string_oldC1Ei(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 16)
  call void @llvm.lifetime.start.p0(i64 1024, ptr %7) #7
  %14 = getelementptr inbounds [1024 x i8], ptr %7, i64 0, i64 1023
  store i8 0, ptr %14, align 1, !tbaa !9
  %15 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %5, i64 0, i64 0
  call void @llvm.va_start.p0(ptr %15)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  %16 = getelementptr inbounds [1024 x i8], ptr %7, i64 0, i64 0
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %5, i64 0, i64 0
  %19 = call i32 @vsnprintf(ptr noundef %16, i64 noundef 1024, ptr noundef %17, ptr noundef %18) #7
  store i32 %19, ptr %8, align 4, !tbaa !10
  %20 = load i32, ptr %8, align 4, !tbaa !10
  %21 = icmp sgt i32 %20, 1023
  br i1 %21, label %22, label %72

22:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  store i32 1024, ptr %9, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 65000, ptr %10, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  store ptr null, ptr %11, align 8, !tbaa !5
  br label %23

23:                                               ; preds = %47, %22
  %24 = load ptr, ptr %11, align 8, !tbaa !5
  %25 = icmp eq ptr %24, null
  br i1 %25, label %27, label %26

26:                                               ; preds = %23
  call void @_ZdaPv(ptr noundef %24) #8
  br label %27

27:                                               ; preds = %26, %23
  %28 = load i32, ptr %9, align 4, !tbaa !10
  %29 = mul nsw i32 %28, 2
  store i32 %29, ptr %9, align 4, !tbaa !10
  %30 = load i32, ptr %9, align 4, !tbaa !10
  %31 = sext i32 %30 to i64
  %32 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %31) #9
          to label %33 unwind label %60

33:                                               ; preds = %27
  store ptr %32, ptr %11, align 8, !tbaa !5
  %34 = load ptr, ptr %11, align 8, !tbaa !5
  %35 = load i32, ptr %9, align 4, !tbaa !10
  %36 = sext i32 %35 to i64
  %37 = load ptr, ptr %4, align 8, !tbaa !5
  %38 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %5, i64 0, i64 0
  %39 = call i32 @vsnprintf(ptr noundef %34, i64 noundef %36, ptr noundef %37, ptr noundef %38) #7
  store i32 %39, ptr %8, align 4, !tbaa !10
  br label %40

40:                                               ; preds = %33
  %41 = load i32, ptr %9, align 4, !tbaa !10
  %42 = icmp slt i32 %41, 65000
  br i1 %42, label %43, label %47

43:                                               ; preds = %40
  %44 = load i32, ptr %8, align 4, !tbaa !10
  %45 = load i32, ptr %9, align 4, !tbaa !10
  %46 = icmp sge i32 %44, %45
  br label %47

47:                                               ; preds = %43, %40
  %48 = phi i1 [ false, %40 ], [ %46, %43 ]
  br i1 %48, label %23, label %49, !llvm.loop !12

49:                                               ; preds = %47
  %50 = load i32, ptr %8, align 4, !tbaa !10
  %51 = load i32, ptr %9, align 4, !tbaa !10
  %52 = icmp sge i32 %50, %51
  br i1 %52, label %53, label %64

53:                                               ; preds = %49
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 1, ptr noundef @_ZN7sc_core22SC_ID_STRING_TOO_LONG_E, ptr noundef @.str.2, ptr noundef @.str.3, i32 noundef 400)
          to label %54 unwind label %60

54:                                               ; preds = %53
  %55 = load ptr, ptr %11, align 8, !tbaa !5
  %56 = load i32, ptr %9, align 4, !tbaa !10
  %57 = sub nsw i32 %56, 1
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds i8, ptr %55, i64 %58
  store i8 0, ptr %59, align 1, !tbaa !9
  br label %64

60:                                               ; preds = %64, %53, %27
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %12, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %83

64:                                               ; preds = %54, %49
  %65 = load ptr, ptr %11, align 8, !tbaa !5
  %66 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN5sc_dt13sc_string_oldaSEPKc(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %65)
          to label %67 unwind label %60

67:                                               ; preds = %64
  %68 = load ptr, ptr %11, align 8, !tbaa !5
  %69 = icmp eq ptr %68, null
  br i1 %69, label %71, label %70

70:                                               ; preds = %67
  call void @_ZdaPv(ptr noundef %68) #8
  br label %71

71:                                               ; preds = %70, %67
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %80

72:                                               ; preds = %2
  %73 = getelementptr inbounds [1024 x i8], ptr %7, i64 0, i64 0
  %74 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN5sc_dt13sc_string_oldaSEPKc(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %73)
          to label %75 unwind label %76

75:                                               ; preds = %72
  br label %80

76:                                               ; preds = %72
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %12, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %13, align 4
  br label %83

80:                                               ; preds = %75, %71
  %81 = getelementptr inbounds [1 x %struct.__va_list_tag], ptr %5, i64 0, i64 0
  call void @llvm.va_end.p0(ptr %81)
  store i1 true, ptr %6, align 1
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 1024, ptr %7) #7
  %82 = load i1, ptr %6, align 1
  br i1 %82, label %85, label %84

83:                                               ; preds = %76, %60
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 1024, ptr %7) #7
  call void @_ZN5sc_dt13sc_string_oldD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #7
  br label %86

84:                                               ; preds = %80
  call void @_ZN5sc_dt13sc_string_oldD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #7
  br label %85

85:                                               ; preds = %84, %80
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #7
  ret void

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.va_start.p0(ptr) #4

; Function Attrs: nounwind
declare i32 @vsnprintf(ptr noundef, i64 noundef, ptr noundef, ptr noundef) #5

declare void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) #6

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.va_end.p0(ptr) #4

declare void @_ZN5sc_dt13sc_string_oldC1Ei(ptr, i32)

declare void @_ZN5sc_dt13sc_string_oldD1Ev(ptr)

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 = { nocallback nofree nosync nounwind willreturn }
attributes #5 = { 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 = { "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 = { nounwind }
attributes #8 = { builtin nounwind }
attributes #9 = { builtin allocsize(0) }

!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 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}


; 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.sc_dt::sc_string_old" = type { ptr }
%struct.__va_list_tag = type { i32, i32, ptr, ptr }

@_ZN7sc_core22SC_ID_STRING_TOO_LONG_E = external constant [0 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [84 x i8], align 1

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

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) local_unnamed_addr #2

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5sc_dt13sc_string_old9to_stringEPKcz(ptr dead_on_unwind noalias writable sret(%"class.sc_dt::sc_string_old") align 8 %0, ptr nocapture noundef readonly %1, ...) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca [1 x %struct.__va_list_tag], align 16
  %4 = alloca [1024 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #7
  tail call void @_ZN5sc_dt13sc_string_oldC1Ei(ptr noundef nonnull align 8 dereferenceable(8) %0, i32 noundef 16)
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %4) #7
  %5 = getelementptr inbounds i8, ptr %4, i64 1023
  store i8 0, ptr %5, align 1, !tbaa !5
  call void @llvm.va_start.p0(ptr nonnull %3)
  %6 = call i32 @vsnprintf(ptr noundef nonnull %4, i64 noundef 1024, ptr noundef %1, ptr noundef nonnull %3) #7
  %7 = icmp sgt i32 %6, 1023
  br i1 %7, label %.preheader, label %27

.preheader:                                       ; preds = %2, %14
  %.021 = phi i32 [ %11, %14 ], [ 1024, %2 ]
  %.020 = phi ptr [ %13, %14 ], [ null, %2 ]
  %8 = icmp eq ptr %.020, null
  br i1 %8, label %10, label %9

9:                                                ; preds = %.preheader
  call void @_ZdaPv(ptr noundef nonnull %.020) #8
  br label %10

10:                                               ; preds = %9, %.preheader
  %11 = shl nsw i32 %.021, 1
  %12 = sext i32 %11 to i64
  %13 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %12) #9
          to label %14 unwind label %.loopexit

14:                                               ; preds = %10
  %15 = call i32 @vsnprintf(ptr noundef nonnull %13, i64 noundef %12, ptr noundef %1, ptr noundef nonnull %3) #7
  %16 = icmp slt i32 %.021, 32500
  %17 = icmp sge i32 %15, %11
  %18 = and i1 %16, %17
  br i1 %18, label %.preheader, label %19, !llvm.loop !8

19:                                               ; preds = %14
  br i1 %17, label %20, label %24

20:                                               ; preds = %19
  invoke void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef 1, ptr noundef nonnull @_ZN7sc_core22SC_ID_STRING_TOO_LONG_E, ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, i32 noundef 400)
          to label %21 unwind label %.loopexit.split-lp

21:                                               ; preds = %20
  %22 = getelementptr i8, ptr %13, i64 %12
  %23 = getelementptr i8, ptr %22, i64 -1
  store i8 0, ptr %23, align 1, !tbaa !5
  br label %24

.loopexit:                                        ; preds = %10
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %32

.loopexit.split-lp:                               ; preds = %20, %24
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %32

24:                                               ; preds = %21, %19
  %25 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN5sc_dt13sc_string_oldaSEPKc(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull %13)
          to label %26 unwind label %.loopexit.split-lp

26:                                               ; preds = %24
  call void @_ZdaPv(ptr noundef nonnull %13) #8
  br label %31

27:                                               ; preds = %2
  %28 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN5sc_dt13sc_string_oldaSEPKc(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull %4)
          to label %31 unwind label %29

29:                                               ; preds = %27
  %30 = landingpad { ptr, i32 }
          cleanup
  br label %32

31:                                               ; preds = %27, %26
  call void @llvm.va_end.p0(ptr nonnull %3)
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #7
  ret void

32:                                               ; preds = %.loopexit, %.loopexit.split-lp, %29
  %.pn = phi { ptr, i32 } [ %30, %29 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %4) #7
  call void @_ZN5sc_dt13sc_string_oldD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #7
  resume { ptr, i32 } %.pn
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.va_start.p0(ptr) #4

; Function Attrs: nofree nounwind
declare noundef i32 @vsnprintf(ptr nocapture noundef, i64 noundef, ptr nocapture noundef readonly, ptr noundef) local_unnamed_addr #5

declare void @_ZN7sc_core17sc_report_handler6reportENS_11sc_severityEPKcS3_S3_i(i32 noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #6

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.va_end.p0(ptr) #4

declare void @_ZN5sc_dt13sc_string_oldC1Ei(ptr, i32) local_unnamed_addr

declare void @_ZN5sc_dt13sc_string_oldD1Ev(ptr) local_unnamed_addr

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #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 nocallback nofree nosync nounwind willreturn }
attributes #5 = { nofree 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 = { "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 = { nounwind }
attributes #8 = { builtin nounwind }
attributes #9 = { builtin allocsize(0) }

!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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass