Skip to content

Instantly share code, notes, and snippets.

Jameson Nash vtjnash

View GitHub Profile
@vtjnash
vtjnash / ambig.jl
Created May 19, 2020
method-ambiguities on f12cde0e8c7f4268838d3201dd9e13b90ea44633 (Version 1.6.0-DEV.29)
View ambig.jl
julia> Test.detect_ambiguities(Base)
35-element Array{Tuple{Method,Method},1}:
(\(F::LinearAlgebra.Factorization{T}, B::Union{Array{Complex{T},1}, Array{Complex{T},2}}) where T<:Union{Float32, Float64} in LinearAlgebra at /data/vtjnash/julia/usr/share/julia/stdlib/v1.6/LinearAlgebra/src/factorization.jl:84, \(A::LinearAlgebra.LQ{TA,S} where S<:AbstractArray{TA,2}, B::StridedVecOrMat{TB}) where {TA, TB} in LinearAlgebra at /data/vtjnash/julia/usr/share/julia/stdlib/v1.6/LinearAlgebra/src/lq.jl:310)
(convert(::Type{T}, x::T) where T in Base at essentials.jl:171, convert(::Type{T}, x) where T>:Missing in Base at missing.jl:69)
(convert(::Type{T}, x) where T>:Missing in Base at missing.jl:69, convert(::Type{T}, x::T) where T>:Nothing in Base at some.jl:33)
View japi1_vcat_52196.ll
define internal nonnull %jl_value_t addrspace(10)* @japi1_vcat_52196(%jl_value_t addrspace(10)*, %jl_value_t addrspace(10)**, i32) #8 !dbg !60493 {
top:
%3 = alloca %jl_value_t addrspace(10)*, i32 2
%gcframe = alloca %jl_value_t addrspace(10)*, i32 4, align 16
%4 = bitcast %jl_value_t addrspace(10)** %gcframe to i8*
call void @llvm.memset.p0i8.i32(i8* align 16 %4, i8 0, i32 32, i1 false), !tbaa !11893
%5 = alloca %jl_value_t addrspace(10)**, align 8
store volatile %jl_value_t addrspace(10)** %1, %jl_value_t addrspace(10)*** %5, align 8
%6 = load i64, i64* @jl_tls_offset.real, !tbaa !11895, !invariant.load !4
@vtjnash
vtjnash / prettyprint.asm
Created Dec 2, 2019
dwarf linetable pretty printer
View prettyprint.asm
julia> @code_native write(devnull, 'x')
.text
; ┌ @ io.jl:644 within `write'
; │┌ @ io.jl:644 within `bswap'
bswapl %edi
xorl %eax, %eax
nopw %cs:(%rax,%rax)
nop
; │└
; │ @ io.jl:648 within `write'
@vtjnash
vtjnash / after.ll
Last active Apr 28, 2019
bad TBAA/LICM
View after.ll
; *** IR Dump After Loop Invariant Code Motion *** (loop: %L140)
; ModuleID = 'reverse1'
source_filename = "reverse1"
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128-ni:10:11:12:13"
target triple = "x86_64--linux-gnu"
%jl_value_t = type opaque
@llvm.compiler.used = appending global [2 x i8*] [i8* bitcast (%jl_value_t addrspace(10)* (i8*, i32, i32)* @jl_gc_pool_alloc to i8*), i8* bitcast (%jl_value_t addrspace(10)* (i8*, i64)* @jl_gc_big_alloc to i8*)], section "llvm.metadata"
@vtjnash
vtjnash / print_to_string.ll
Last active Apr 27, 2019
X86AvoidStoreForwardingBlocks bug
View print_to_string.ll
; ModuleID = 'print_to_string_module.ll'
source_filename = "show"
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128-ni:10:11:12:13"
target triple = "x86_64--linux-gnu"
%jl_value_t = type opaque
%jl_array_t = type { i8 addrspace(13)*, i64, i16, i16, i32 }
@llvm.compiler.used = appending global [2 x i8*] [i8* bitcast (%jl_value_t addrspace(10)* (i8*, i32, i32)* @jl_gc_pool_alloc to i8*), i8* bitcast (%jl_value_t addrspace(10)* (i8*, i64)* @jl_gc_big_alloc to i8*)], section "llvm.metadata"
@vtjnash
vtjnash / VNpatch2.diff
Created Feb 22, 2019
some likely looking GVN bugs
View VNpatch2.diff
diff -rpu llvm-6.0.0.src/lib/Transforms/Scalar/GVN.cpp llvm-6.0.0-VNpatch2/lib/Transforms/Scalar/GVN.cpp
--- llvm-6.0.0.src/lib/Transforms/Scalar/GVN.cpp 2017-12-08 19:21:41.000000000 -0500
+++ llvm-6.0.0-VNpatch2/lib/Transforms/Scalar/GVN.cpp 2018-07-19 16:35:26.000000000 -0400
@@ -871,6 +871,10 @@ bool GVN::AnalyzeLoadAvailability(LoadIn
// read by the load, we can extract the bits we need for the load from the
// stored value.
if (StoreInst *DepSI = dyn_cast<StoreInst>(DepInfo.getInst())) {
+ if (DepSI->getValueOperand()->getType() != LI->getType() &&
+ !canCoerceMustAliasedValueToLoad(DepSI->getValueOperand(),
+ LI->getType(), DL))
@vtjnash
vtjnash / openblas 0.3.5
Created Jan 8, 2019
openblas 0.3.5 test failures
View openblas 0.3.5
Test Summary: | Pass Fail Total
Overall | 69682 645 70327
LinearAlgebra/hessenberg | 40 40
LinearAlgebra/givens | 1840 1840
LinearAlgebra/pinv | 264 24 288
LinearAlgebra/structuredbroadcast | 408 408
LinearAlgebra/uniformscaling | 354 354
LinearAlgebra/generic | 434 434
LinearAlgebra/schur | 390 390
LinearAlgebra/adjtrans | 253 253
@vtjnash
vtjnash / pcre-handle-ill-formed-utf8.diff
Created Jun 20, 2018
Patch to PCRE2 to handle ill-formed UTF8 data (assuming it is safe to skip the length check)
View pcre-handle-ill-formed-utf8.diff
diff -prU12 pcre2-10.30-release/src/pcre2_internal.h pcre2-10.30/src/pcre2_internal.h
--- pcre2-10.30-release/src/pcre2_internal.h 2017-07-19 12:00:20.000000000 -0400
+++ pcre2-10.30/src/pcre2_internal.h 2018-06-20 17:03:09.000000000 -0400
@@ -271,103 +271,157 @@ is not supported. */
/* The following macros were originally written in the form of loops that used
data from the tables whose names start with PRIV(utf8_table). They were
rewritten by a user so as not to use loops, because in some environments this
gives a significant performance advantage, and it seems never to do any harm.
*/
View gist:91b07812ba2d49d65c5813067c9c91e1
a020a44e72 112143378 bytes ############# Merge pull request #25655 from JuliaLang
3f34c629e1 112221811 bytes ############# Replace the --machinefile to --machine-f
a0fe64cde1 112154555 bytes ############# Merge pull request #25578 from JuliaLang
bca94e4bd5 0 bytes Merge pull request #25698 from fredrikek
dcb0517b22 0 bytes Merge pull request #25622 from JuliaLang
1888eb67f7 111775845 bytes ############ Merge pull request #23724 from invenia/a
6aae4d5b3f 112000185 bytes ############# Merge pull request #25644 from fredrikek
f7b1033464 111820037 bytes ############ Update julia version number in README.md
56c5075f8f 112699665 bytes ############### open: deprecate positional flags for key
5d6dc89826 112467897 bytes ############## remove testgroups moved to stdlib (#2560
View gist:735443e84aca353579d3b646755e4b78
9f41f148c5 89575738 bytes ####################### Eliminate full from test/math.jl and test/linalg/uniformscal
8c07a51de7 89172946 bytes ###################### Eliminate full from test/linalg/[dense|diagonal.jl]. (#23890
d31010ac1b 0 bytes FAILED Eliminate full from test/linalg/cholesky.jl. (#23891)
c240439eca 89152138 bytes ###################### Eliminate full from test/linalg/special.jl. (#23895)
ed51793c7e 89161862 bytes ###################### Eliminate uses of full from test/sparse/[spqr|cholmod|sparse
d7e7d313f9 0 bytes FAILED Merge pull request #23892 from JuliaLang/yyc/codegen/phi-uni
b3dc531383 89591122 bytes ####################### Merge pull request #23883 from JuliaLang/jn/fix-static-align
aee64e3528 89581242 bytes ####################### eliminate full from test/linalg/symmetric.jl (#23896)
b72af507df 89171090 bytes ###################### Merge pull request #23894 from JuliaLang/yyc/tests/llvm40
91b75cd859 89605094 bytes ##########
You can’t perform that action at this time.