Skip to content

Commit

Permalink
Giveup on Julia v1.6, use v1.7 at minimum
Browse files Browse the repository at this point in the history
  • Loading branch information
Keluaa committed Apr 1, 2024
1 parent 48ecd70 commit f931a7e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
matrix:
version:
- '1.10'
- '1.6'
- '1.7'
- 'nightly'
os:
- ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ f1 (generic function with 1 method)
julia> @code_diff type=:llvm debuginfo=:none f1(Int64(1)) f1(Int8(1))
define i64 @f1(i64 signext %0) #0 { ⟪╋⟫define i64 @f1(i8 signext %0) #0 {
top: ┃ top:
┣⟫ %1 = sext i8 %0 to i64
%1 = add i64 %0, 1 ⟪╋⟫ %2 = add nsw i64 %1, 1
ret i64 %1 ⟪╋⟫ ret i64 %2
┣⟫ %1 = sext i8 %0 to i64
} ┃ }

julia> f2(a) = a - 1
Expand Down
2 changes: 1 addition & 1 deletion docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ f1 (generic function with 1 method)
julia> @code_diff type=:llvm debuginfo=:none color=false f1(Int64(1)) f1(Int8(1))
define i64 @f1(i64 signext %0) #0 { ⟪╋⟫define i64 @f1(i8 signext %0) #0 {
top: ┃ top:
┣⟫ %1 = sext i8 %0 to i64
%1 = add i64 %0, 1 ⟪╋⟫ %2 = add nsw i64 %1, 1
ret i64 %1 ⟪╋⟫ ret i64 %2
┣⟫ %1 = sext i8 %0 to i64
} ┃ }
julia> f2(a) = a - 1
Expand Down
6 changes: 1 addition & 5 deletions src/compare.jl
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,7 @@ function replace_llvm_module_name(code::AbstractString, function_name)
# See 'get_function_name' in 'julia/src/codegen.cpp'
function_name = function_name[2:end]
end
if v"1.7-" VERSION
func_re = Regex("(?>julia|japi3|japi1)_\\Q$(function_name)\\E_(\\d+)")
else
func_re = Regex("(?>julia|japi3|japi1)_$(function_name)_(\\d+)")
end
func_re = Regex("(?>julia|japi3|japi1)_\\Q$(function_name)\\E_(\\d+)")
return replace(code, func_re => function_name)
end

Expand Down

0 comments on commit f931a7e

Please sign in to comment.