Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Aggressive constprop in LinearAlgebra.wrap (#51582)
This helps with type-stability, as the flag `tA` is usually known from the type of the matrix. On master, ```julia julia> f(A) = LinearAlgebra.wrap(A, 'N') f (generic function with 1 method) julia> @code_typed f([1;;]) CodeInfo( 1 ─ %1 = invoke LinearAlgebra.wrap(A::Matrix{Int64}, 'N'::Char)::Union{Adjoint{Int64, Matrix{Int64}}, Hermitian{Int64, Matrix{Int64}}, Symmetric{Int64, Matrix{Int64}}, Transpose{Int64, Matrix{Int64}}, Matrix{Int64}} └── return %1 ) => Union{Adjoint{Int64, Matrix{Int64}}, Hermitian{Int64, Matrix{Int64}}, Symmetric{Int64, Matrix{Int64}}, Transpose{Int64, Matrix{Int64}}, Matrix{Int64}} ``` This PR ```julia julia> @code_typed f([1;;]) CodeInfo( 1 ─ return A ) => Matrix{Int64} ``` (cherry picked from commit 0fd7f72)
- Loading branch information