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
29 changes: 17 additions & 12 deletions bench/cpython/optimized/parking_lot.ll
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,12 @@ define dso_local range(i32 -3, 1) i32 @_PyParkingLot_Park(ptr noundef %0, ptr no
br label %_PyRawMutex_Lock.exit

_PyRawMutex_Lock.exit: ; preds = %6, %15
switch i64 %2, label %28 [
i64 1, label %16
i64 2, label %20
i64 4, label %24
i64 8, label %atomic_memcmp.exit
%16 = tail call range(i64 0, 65) i64 @llvm.cttz.i64(i64 %2, i1 true)
switch i64 %16, label %29 [
i64 0, label %17
i64 1, label %21
i64 2, label %25
i64 3, label %atomic_memcmp.exit
]

16: ; preds = %_PyRawMutex_Lock.exit
Expand Down Expand Up @@ -320,7 +321,7 @@ _PyRawMutex_Unlock.exit27.split: ; preds = %_PyRawMutex_Unlock.
br label %75

75: ; preds = %74, %71, %_PyRawMutex_Unlock.exit27.split
%.0.i28 = phi ptr [ %70, %74 ], [ null, %71 ], [ null, %_PyRawMutex_Unlock.exit27.split ]
%.0.i28 = phi ptr [ %70, %75 ], [ null, %72 ], [ null, %_PyRawMutex_Unlock.exit27.split ]
%76 = call i32 @sem_wait(ptr noundef nonnull %37) #9
%.not = icmp eq i32 %76, -1
br i1 %.not, label %77, label %_PySemaphore_PlatformWait.exit.i
Expand All @@ -334,7 +335,7 @@ _PyRawMutex_Unlock.exit27.split: ; preds = %_PyRawMutex_Unlock.
]

.split.us: ; preds = %77, %.lr.ph
%.us-phi = phi i32 [ %68, %.lr.ph ], [ %79, %77 ]
%.us-phi = phi i32 [ %68, %.lr.ph ], [ %79, %78 ]
call void (ptr, ptr, ...) @_Py_FatalErrorFormat(ptr noundef nonnull @__func__._PySemaphore_PlatformWait, ptr noundef nonnull @.str.2, i32 noundef %.us-phi) #10
unreachable

Expand Down Expand Up @@ -368,12 +369,12 @@ _PySemaphore_Wait.exit: ; preds = %_PySemaphore_Platfo
br label %_PyRawMutex_Unlock.exit29

_PyRawMutex_Unlock.exit29: ; preds = %_PySemaphore_Wait.exit, %_PySemaphore_PlatformWait.exit.i.us, %_PyRawMutex_Unlock.exit27.split.us.preheader, %89, %81, %_PyRawMutex_Unlock.exit25
%.0 = phi i32 [ 0, %_PyRawMutex_Unlock.exit25 ], [ %52, %81 ], [ %52, %89 ], [ 0, %_PyRawMutex_Unlock.exit27.split.us.preheader ], [ 0, %_PySemaphore_PlatformWait.exit.i.us ], [ 0, %_PySemaphore_Wait.exit ]
%.0 = phi i32 [ 0, %_PyRawMutex_Unlock.exit25 ], [ %52, %82 ], [ %52, %90 ], [ 0, %_PyRawMutex_Unlock.exit27.split.us.preheader ], [ 0, %_PySemaphore_PlatformWait.exit.i.us ], [ 0, %_PySemaphore_Wait.exit ]
%90 = call i32 @sem_destroy(ptr noundef nonnull %37) #9
br label %_PyRawMutex_Unlock.exit

_PyRawMutex_Unlock.exit: ; preds = %35, %32, %_PyRawMutex_Unlock.exit29
%.021 = phi i32 [ %.0, %_PyRawMutex_Unlock.exit29 ], [ -1, %32 ], [ -1, %35 ]
%.021 = phi i32 [ %.0, %_PyRawMutex_Unlock.exit29 ], [ -1, %33 ], [ -1, %36 ]
call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %7) #9
ret i32 %.021
}
Expand Down Expand Up @@ -608,6 +609,9 @@ declare void @_PyRawMutex_LockSlow(ptr noundef) local_unnamed_addr #4

declare void @_PyRawMutex_UnlockSlow(ptr noundef) local_unnamed_addr #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.cttz.i64(i64, i1 immarg) #9

attributes #0 = { 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 #1 = { 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 #2 = { noreturn "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" }
Expand All @@ -617,9 +621,10 @@ attributes #5 = { mustprogress nocallback nofree nounwind willreturn memory(argm
attributes #6 = { nofree norecurse nosync nounwind memory(write, argmem: none, inaccessiblemem: none) 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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { mustprogress nofree nosync nounwind willreturn memory(none) "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 }
attributes #10 = { noreturn nounwind }
attributes #11 = { nounwind willreturn memory(none) }
attributes #9 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #10 = { nounwind }
attributes #11 = { noreturn nounwind }
attributes #12 = { nounwind willreturn memory(none) }

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

Expand Down
18 changes: 11 additions & 7 deletions bench/hermes/optimized/TypedArray.ll
Original file line number Diff line number Diff line change
Expand Up @@ -7739,11 +7739,12 @@ _ZN6hermes2vm16JSTypedArrayBase5beginERNS0_7RuntimeE.exit: ; preds = %if.end100
%37 = load i32, ptr %offset_.i, align 4
%idx.ext.i = zext i32 %37 to i64
%add.ptr.i = getelementptr inbounds nuw i8, ptr %36, i64 %idx.ext.i
switch i8 %call102, label %sw.default123 [
i8 1, label %sw.bb106
i8 2, label %sw.bb109
i8 4, label %sw.bb113
i8 8, label %sw.bb118
%38 = tail call range(i8 0, 9) i8 @llvm.cttz.i8(i8 %call102, i1 true)
switch i8 %38, label %sw.default123 [
i8 0, label %sw.bb106
i8 1, label %sw.bb109
i8 2, label %sw.bb113
i8 3, label %sw.bb118
]

sw.bb106: ; preds = %_ZN6hermes2vm16JSTypedArrayBase5beginERNS0_7RuntimeE.exit
Expand Down Expand Up @@ -13626,6 +13627,9 @@ declare ptr @_ZN6hermes2vm12JSTypedArrayImLNS0_8CellKindE45EE12getPrototypeERKNS

declare ptr @_ZN6hermes2vm17NativeConstructor15creatorFunctionINS0_12JSTypedArrayImLNS0_8CellKindE45EEEEENS0_10CallResultINS0_12PseudoHandleINS0_8JSObjectEEELNS0_6detail20CallResultSpecializeE6EEERNS0_7RuntimeENS0_6HandleIS8_EEPv(ptr noundef nonnull align 8 dereferenceable(9832), ptr, ptr noundef) #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i8 @llvm.cttz.i8(i8, i1 immarg) #7

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite)
declare void @llvm.experimental.noalias.scope.decl(metadata) #7

Expand All @@ -13645,9 +13649,9 @@ attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argm
attributes #4 = { nounwind "frame-pointer"="all" "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 = { noreturn "frame-pointer"="all" "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 = { nobuiltin nounwind "frame-pointer"="all" "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 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) }
attributes #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #9 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #9 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #10 = { nounwind }
attributes #11 = { noreturn nounwind }
attributes #12 = { builtin nounwind }
Expand Down
Loading