Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 45 additions & 47 deletions bench/abc/optimized/extraUtilFile.ll
Original file line number Diff line number Diff line change
Expand Up @@ -910,21 +910,18 @@ Extra_ReadHex.exit: ; preds = %27, %32, %._crit_ed
; Function Attrs: nofree nounwind uwtable
define void @Extra_PrintHexadecimal(ptr noundef captures(none) %0, ptr noundef readonly captures(none) %1, i32 noundef %2) local_unnamed_addr #1 {
%4 = shl nuw i32 1, %2
%5 = icmp sgt i32 %4, 3
br i1 %5, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader: ; preds = %3
%6 = lshr i32 %4, 2
br label %.lr.ph
%5 = sdiv i32 %4, 4
%.012 = add nsw i32 %5, -1
%6 = icmp ult i32 %.012, 536870911
br i1 %6, label %.lr.ph, label %._crit_edge

.lr.ph: ; preds = %.lr.ph.preheader, %20
%.013.in = phi i32 [ %.013, %20 ], [ %6, %.lr.ph.preheader ]
%.013 = add nsw i32 %.013.in, -1
.lr.ph: ; preds = %3, %20
%.013.in = phi i32 [ %.0, %20 ], [ %.012, %3 ]
%7 = lshr i32 %.013, 3
%8 = zext nneg i32 %7 to i64
%9 = getelementptr inbounds nuw i32, ptr %1, i64 %8
%10 = load i32, ptr %9, align 4, !tbaa !16
%11 = shl i32 %.013, 2
%11 = shl nuw nsw i32 %.013, 2
%12 = and i32 %11, 28
%13 = lshr i32 %10, %12
%14 = and i32 %13, 15
Expand All @@ -941,7 +938,8 @@ define void @Extra_PrintHexadecimal(ptr noundef captures(none) %0, ptr noundef r
br label %20

20: ; preds = %16, %18
%21 = icmp samesign ugt i32 %.013.in, 1
%.0 = add nsw i32 %.013.in, -1
%21 = icmp ult i32 %.0, 536870910
br i1 %21, label %.lr.ph, label %._crit_edge, !llvm.loop !21

._crit_edge: ; preds = %20, %3
Expand Down Expand Up @@ -985,34 +983,32 @@ define void @Extra_PrintHexadecimalString(ptr noundef writeonly captures(none) %

.critedge31: ; preds = %3
%14 = shl nuw i32 1, %2
%15 = icmp sgt i32 %14, 3
br i1 %15, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader: ; preds = %.critedge31
%16 = lshr i32 %14, 2
br label %.lr.ph

.lr.ph: ; preds = %.lr.ph.preheader, %.lr.ph
%.0.in33 = phi i32 [ %.0, %.lr.ph ], [ %16, %.lr.ph.preheader ]
%.02432 = phi ptr [ %.1, %.lr.ph ], [ %0, %.lr.ph.preheader ]
%.0 = add nsw i32 %.0.in33, -1
%17 = lshr i32 %.0, 3
%18 = zext nneg i32 %17 to i64
%19 = getelementptr inbounds nuw i32, ptr %1, i64 %18
%20 = load i32, ptr %19, align 4, !tbaa !16
%21 = shl i32 %.0, 2
%22 = and i32 %21, 28
%23 = lshr i32 %20, %22
%24 = and i32 %23, 15
%25 = icmp samesign ult i32 %24, 10
%26 = trunc nuw nsw i32 %24 to i8
%27 = add nuw nsw i8 %26, 87
%28 = or disjoint i8 %26, 48
%storemerge = select i1 %25, i8 %28, i8 %27
%.1 = getelementptr inbounds nuw i8, ptr %.02432, i64 1
store i8 %storemerge, ptr %.02432, align 1, !tbaa !3
%29 = icmp samesign ugt i32 %.0.in33, 1
br i1 %29, label %.lr.ph, label %._crit_edge, !llvm.loop !22
%17 = sdiv i32 %14, 4
%.032 = add nsw i32 %17, -1
%18 = icmp ult i32 %.032, 536870911
br i1 %18, label %.lr.ph, label %._crit_edge

.lr.ph:; preds = %.critedge31, %.lr.ph
%.034 = phi i32 [ %.0, %.lr.ph ], [ %.032, %.critedge31 ]
%.02433 = phi ptr [ %.1, %.lr.ph ], [ %0, %.critedge31 ]
%19 = lshr i32 %.034, 3
%20 = zext nneg i32 %19 to i64
%21 = getelementptr inbounds nuw i32, ptr %1, i64 %20
%22 = load i32, ptr %21, align 4, !tbaa !16
%23 = shl nuw nsw i32 %.034, 2
%24 = and i32 %23, 28
%25 = lshr i32 %22, %24
%26 = and i32 %25, 15
%27 = icmp samesign ult i32 %26, 8
%28 = trunc nuw nsw i32 %26 to i8
%29 = add nuw nsw i8 %28, 87
%30 = or disjoint i8 %28, 48
%storemerge = select i1 %27, i8 %30, i8 %29
%.1 = getelementptr inbounds nuw i8, ptr %.02433, i64 1
store i8 %storemerge, ptr %.02433, align 1, !tbaa !3
%.0 = add nsw i32 %.034, -1
%31 = icmp ult i32 %.0, 536870911
br i1 %31, label %.lr.ph, label %._crit_edge, !llvm.loop !22

._crit_edge: ; preds = %.lr.ph, %.critedge31
%.024.lcssa = phi ptr [ %0, %.critedge31 ], [ %.1, %.lr.ph ]
Expand All @@ -1032,12 +1028,12 @@ define void @Extra_PrintHex(ptr noundef captures(none) %0, ptr noundef readonly
%8 = icmp sgt i32 %7, 0
%9 = zext i1 %8 to i32
%10 = add nsw i32 %6, %9
%11 = icmp sgt i32 %10, 0
%.015 = add nsw i32 %10, -1
%11 = icmp ult i32 %.015, 536870912
br i1 %11, label %.lr.ph, label %._crit_edge

.lr.ph: ; preds = %3, %24
%.016.in = phi i32 [ %.016, %24 ], [ %10, %3 ]
%.016 = add nsw i32 %.016.in, -1
%.016.in = phi i32 [ %.0, %24 ], [ %.015, %3 ]
%12 = lshr i32 %.016, 3
%13 = zext nneg i32 %12 to i64
%14 = getelementptr inbounds nuw i32, ptr %1, i64 %13
Expand All @@ -1058,7 +1054,8 @@ define void @Extra_PrintHex(ptr noundef captures(none) %0, ptr noundef readonly
br label %24

24: ; preds = %20, %22
%25 = icmp samesign ugt i32 %.016.in, 1
%.0 = add nsw i32 %.016.in, -1
%25 = icmp ult i32 %.0, 536870911
br i1 %25, label %.lr.ph, label %._crit_edge, !llvm.loop !23

._crit_edge: ; preds = %24, %3
Expand All @@ -1073,12 +1070,12 @@ define void @Extra_PrintHex2(ptr noundef captures(none) %0, ptr noundef readonly
%7 = icmp sgt i32 %6, 0
%8 = zext i1 %7 to i32
%9 = add nsw i32 %5, %8
%10 = icmp sgt i32 %9, 0
%.014 = add nsw i32 %9, -1
%10 = icmp ult i32 %.014, 536870912
br i1 %10, label %.lr.ph, label %._crit_edge

.lr.ph: ; preds = %3, %23
%.015.in = phi i32 [ %.015, %23 ], [ %9, %3 ]
%.015 = add nsw i32 %.015.in, -1
%.015.in = phi i32 [ %.0, %23 ], [ %.014, %3 ]
%11 = lshr i32 %.015, 3
%12 = zext nneg i32 %11 to i64
%13 = getelementptr inbounds nuw i32, ptr %1, i64 %12
Expand All @@ -1099,7 +1096,8 @@ define void @Extra_PrintHex2(ptr noundef captures(none) %0, ptr noundef readonly
br label %23

23: ; preds = %19, %21
%24 = icmp samesign ugt i32 %.015.in, 1
%.0 = add nsw i32 %.015.in, -1
%24 = icmp ult i32 %.0, 536870911
br i1 %24, label %.lr.ph, label %._crit_edge, !llvm.loop !24

._crit_edge: ; preds = %23, %3
Expand Down
27 changes: 14 additions & 13 deletions bench/abc/optimized/mapperTime.ll
Original file line number Diff line number Diff line change
Expand Up @@ -94,33 +94,33 @@ define float @Map_TimeCutComputeArrival(ptr noundef readonly captures(none) %0,
store float 0x47B9999980000000, ptr %25, align 4, !tbaa !24
%26 = getelementptr inbounds nuw i8, ptr %1, i64 76
%27 = load i8, ptr %26, align 4, !tbaa !41
%28 = icmp sgt i8 %27, 0
br i1 %28, label %.lr.ph, label %._crit_edge
%28 = sext i8 %27 to i32
%.085 = add nsw i32 %28, -1
%29 = icmp ult i32 %.085, 127
br i1 %29, label %.lr.ph, label %._crit_edge

.lr.ph: ; preds = %22
%29 = xor i32 %11, -1
%30 = getelementptr inbounds nuw i8, ptr %1, i64 24
%31 = getelementptr inbounds nuw i8, ptr %9, i64 80
%32 = getelementptr inbounds nuw i8, ptr %9, i64 152
%33 = zext nneg i8 %27 to i64
br label %34

34: ; preds = %.lr.ph, %102
%35 = phi float [ 0.000000e+00, %.lr.ph ], [ %103, %102 ]
%36 = phi float [ 0.000000e+00, %.lr.ph ], [ %104, %102 ]
%37 = phi float [ 0.000000e+00, %.lr.ph ], [ %74, %102 ]
%38 = phi float [ 0.000000e+00, %.lr.ph ], [ %75, %102 ]
%indvars.iv = phi i64 [ %33, %.lr.ph ], [ %indvars.iv.next, %102 ]
%indvars.iv.next = add nsw i64 %indvars.iv, -1
%39 = trunc nsw i64 %indvars.iv.next to i32
%40 = lshr i32 %29, %39
%41 = and i32 %40, 1
%42 = getelementptr inbounds nuw ptr, ptr %30, i64 %indvars.iv.next
%indvars.iv = phi i32 [ %.085, %.lr.ph ], [ %.0, %102 ]
%39 = lshr i32 %30, %indvars.iv
%40 = and i32 %39, 1
%41 = zext nneg i32 %.086 to i64
%42 = getelementptr inbounds nuw ptr, ptr %30, i64 %41
%43 = load ptr, ptr %42, align 8, !tbaa !23
%44 = getelementptr inbounds nuw i8, ptr %43, i64 96
%45 = zext nneg i32 %41 to i64
%45 = zext nneg i32 %40 to i64
%46 = getelementptr inbounds nuw %struct.Map_TimeStruct_t_, ptr %44, i64 %45
%47 = getelementptr inbounds nuw %struct.Map_TimeStruct_t_, ptr %31, i64 %indvars.iv.next
%47 = getelementptr inbounds nuw %struct.Map_TimeStruct_t_, ptr %31, i64 %41
%48 = load float, ptr %47, align 4, !tbaa !40
%49 = fcmp ogt float %48, 0.000000e+00
br i1 %49, label %50, label %58
Expand Down Expand Up @@ -167,7 +167,7 @@ define float @Map_TimeCutComputeArrival(ptr noundef readonly captures(none) %0,
73: ; preds = %70, %72, %58
%74 = phi float [ %59, %70 ], [ %68, %72 ], [ %59, %58 ]
%75 = phi float [ %59, %70 ], [ %68, %72 ], [ %60, %58 ]
%76 = getelementptr inbounds nuw %struct.Map_TimeStruct_t_, ptr %32, i64 %indvars.iv.next
%76 = getelementptr inbounds nuw %struct.Map_TimeStruct_t_, ptr %32, i64 %41
%77 = load float, ptr %76, align 4, !tbaa !40
%78 = fcmp ogt float %77, 0.000000e+00
br i1 %78, label %79, label %87
Expand Down Expand Up @@ -214,7 +214,8 @@ define float @Map_TimeCutComputeArrival(ptr noundef readonly captures(none) %0,
102: ; preds = %87, %101, %99
%103 = phi float [ %88, %87 ], [ %97, %101 ], [ %88, %99 ]
%104 = phi float [ %89, %87 ], [ %97, %101 ], [ %88, %99 ]
%105 = icmp samesign ugt i64 %indvars.iv, 1
%.0 = add nsw i32 %indvars.iv, -1
%105 = icmp ult i32 %.0, 126
br i1 %105, label %34, label %._crit_edge, !llvm.loop !43

._crit_edge: ; preds = %102, %22
Expand Down
48 changes: 31 additions & 17 deletions bench/abc/optimized/mvcApi.ll
Original file line number Diff line number Diff line change
Expand Up @@ -241,13 +241,19 @@ Mvc_CoverMakeEmpty.exit: ; preds = %.lr.ph.i, %1
%24 = zext nneg i32 %8 to i64
%25 = getelementptr inbounds nuw i32, ptr %23, i64 %24
store i32 %22, ptr %25, align 4, !tbaa !23
%26 = shl i32 %7, 2
%27 = and i32 %26, 67108860
%28 = zext nneg i32 %27 to i64
tail call void @llvm.memset.p0.i64(ptr nonnull align 4 %23, i8 -1, i64 %28, i1 false), !tbaa !23
br label %.loopexit

.loopexit: ; preds = %.lr.ph.preheader, %14, %9
%.027 = add nsw i32 %8, -1
br label %.lr.ph

.lr.ph: ; preds = %.lr.ph.preheader, %.lr.ph
%.028 = phi i32 [ %.0, %.lr.ph ], [ %.027, %.lr.ph.preheader ]
%26 = zext nneg i32 %.028 to i64
%27 = getelementptr inbounds nuw i32, ptr %23, i64 %26
store i32 -1, ptr %27, align 4, !tbaa !23
%.0 = add nsw i32 %.028, -1
%28 = icmp ult i32 %.0, 16777215
br i1 %28, label %.lr.ph, label %.loopexit, !llvm.loop !29

.loopexit: ; preds = %.lr.ph, %14, %9
Comment on lines +244 to +256
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a regression: the new version expands the call void @llvm.memset.p0.i64, which is faster but with more IR lines.

%29 = load ptr, ptr %2, align 8, !tbaa !19
%30 = icmp eq ptr %29, null
br i1 %30, label %31, label %32
Expand Down Expand Up @@ -278,7 +284,7 @@ declare ptr @Mvc_CubeAlloc(ptr noundef) local_unnamed_addr #8
; Function Attrs: nounwind uwtable
define ptr @Mvc_CoverCreateEmpty(ptr noundef readonly captures(none) %0) local_unnamed_addr #7 {
%2 = getelementptr inbounds nuw i8, ptr %0, i64 72
%3 = load ptr, ptr %2, align 8, !tbaa !29
%3 = load ptr, ptr %2, align 8, !tbaa !30
%4 = getelementptr inbounds nuw i8, ptr %0, i64 8
%5 = load i32, ptr %4, align 8, !tbaa !14
%6 = tail call ptr @Mvc_CoverAlloc(ptr noundef %3, i32 noundef %5) #10
Expand All @@ -290,7 +296,7 @@ declare ptr @Mvc_CoverAlloc(ptr noundef, i32 noundef) local_unnamed_addr #8
; Function Attrs: nounwind uwtable
define noundef ptr @Mvc_CoverCreateTautology(ptr noundef readonly captures(none) %0) local_unnamed_addr #7 {
%2 = getelementptr inbounds nuw i8, ptr %0, i64 72
%3 = load ptr, ptr %2, align 8, !tbaa !29
%3 = load ptr, ptr %2, align 8, !tbaa !30
%4 = getelementptr inbounds nuw i8, ptr %0, i64 8
%5 = load i32, ptr %4, align 8, !tbaa !14
%6 = tail call ptr @Mvc_CoverAlloc(ptr noundef %3, i32 noundef %5) #10
Expand Down Expand Up @@ -329,13 +335,19 @@ define noundef ptr @Mvc_CoverCreateTautology(ptr noundef readonly captures(none)
%26 = zext nneg i32 %10 to i64
%27 = getelementptr inbounds nuw i32, ptr %25, i64 %26
store i32 %24, ptr %27, align 4, !tbaa !23
%28 = shl i32 %9, 2
%29 = and i32 %28, 67108860
%30 = zext nneg i32 %29 to i64
tail call void @llvm.memset.p0.i64(ptr nonnull align 4 %25, i8 -1, i64 %30, i1 false), !tbaa !23
br label %.loopexit

.loopexit: ; preds = %.lr.ph.preheader, %16, %11
%.029 = add nsw i32 %10, -1
br label %.lr.ph

.lr.ph: ; preds = %.lr.ph.preheader, %.lr.ph
%.030 = phi i32 [ %.0, %.lr.ph ], [ %.029, %.lr.ph.preheader ]
%28 = zext nneg i32 %.030 to i64
%29 = getelementptr inbounds nuw i32, ptr %25, i64 %28
store i32 -1, ptr %29, align 4, !tbaa !23
%.0 = add nsw i32 %.030, -1
%30 = icmp ult i32 %.0, 16777215
br i1 %30, label %.lr.ph, label %.loopexit, !llvm.loop !31

.loopexit: ; preds = %.lr.ph, %16, %11
%31 = getelementptr inbounds nuw i8, ptr %6, i64 16
%32 = load ptr, ptr %31, align 8, !tbaa !19
%33 = icmp eq ptr %32, null
Expand Down Expand Up @@ -408,4 +420,6 @@ attributes #10 = { nounwind }
!26 = !{!27, !9, i64 0}
!27 = !{!"MvcCubeStruct", !9, i64 0, !5, i64 8, !5, i64 11, !5, i64 11, !5, i64 11, !5, i64 12, !6, i64 16}
!28 = distinct !{!28, !25}
!29 = !{!4, !13, i64 72}
!29 = distinct !{!29, !25}
!30 = !{!4, !13, i64 72}
!31 = distinct !{!31, !25}
18 changes: 8 additions & 10 deletions bench/actix-rs/optimized/3z8xs86q8mjw7jd4.ll
Original file line number Diff line number Diff line change
Expand Up @@ -356,11 +356,10 @@ define internal void @"_ZN4core3ptr55drop_in_place$LT$$RF$core..option..Option$L
; Function Attrs: nonlazybind uwtable
define internal void @"_ZN4core3ptr59drop_in_place$LT$actix_multipart..form..text..TextError$GT$17h4e6b60a93c3e3eeeE"(ptr noalias noundef align 8 dereferenceable(40) %0) unnamed_addr #0 {
%2 = load i64, ptr %0, align 8, !range !45, !noundef !4
%3 = add i64 %2, 9223372036854775804
%4 = icmp ugt i64 %3, 2
%cond1 = icmp eq i64 %3, 1
%cond = or i1 %4, %cond1
br i1 %cond, label %6, label %5
%3 = icmp ult i64 %2, -9223372036854775804
%4 = icmp eq i64 %2, -9223372036854775803
%5 = or i1 %3, %4
br i1 %5, label %7, label %6

5: ; preds = %1, %6
ret void
Expand Down Expand Up @@ -958,11 +957,10 @@ define { ptr, ptr } @_ZN15actix_multipart4form4text10TextConfig9map_error17hb2fe
%25 = landingpad { ptr, i32 }
cleanup
%26 = load i64, ptr %2, align 8, !range !45, !alias.scope !176, !noundef !4
%27 = add i64 %26, 9223372036854775804
%28 = icmp ugt i64 %27, 2
%cond1.i = icmp eq i64 %27, 1
%cond.i = or i1 %28, %cond1.i
br i1 %cond.i, label %29, label %"_ZN4core3ptr59drop_in_place$LT$actix_multipart..form..text..TextError$GT$17h4e6b60a93c3e3eeeE.exit"
%27 = icmp ult i64 %26, -9223372036854775804
%28 = icmp eq i64 %26, -9223372036854775803
%29 = or i1 %27, %28
br i1 %29, label %30, label %"_ZN4core3ptr59drop_in_place$LT$actix_multipart..form..text..TextError$GT$17h4e6b60a93c3e3eeeE.exit"

29: ; preds = %24
invoke void @"_ZN4core3ptr46drop_in_place$LT$serde_plain..error..Error$GT$17h69b7813d61c189c1E"(ptr noalias noundef nonnull align 8 dereferenceable(40) %2)
Expand Down
Loading