• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

JuliaLang / julia / #37767

02 May 2024 04:02AM UTC coverage: 85.708% (-1.7%) from 87.428%
#37767

push

local

web-flow
Pass CodeGenOpt::Less to LLVM at O1 (rather than CodeGenOpt::None). (#37893)

For context, please see
https://github.com/JuliaLang/julia/pull/35086#issuecomment-700944522.
Regarding alignment with clang, please see
https://reviews.llvm.org/D28409
(/https://github.com/JuliaLang/julia/pull/35086#issuecomment-598282810).

```
Prior to Julia 1.5, Julia passed CodeGenOpt::Aggressive to LLVM at -O1.
As of Julia 1.5, Julia passes CodeGenOpt::None to LLVM at -O1.

This reduction in optimization effort at -O1 improved compilation latency,
but induced appreciable runtime regressions.

This commit makes Julia pass CodeGenOpt::Less to LLVM at -O1,
mitigating the runtime regressions caused by CodeGenOpt::None,
while retaining most of CodeGenOpt::None's latency improvements.

This commit also aligns Julia's CodeGenOpt selection at -O1
with that of clang.
```

Best! :)

74571 of 87006 relevant lines covered (85.71%)

14871255.36 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/stdlib/LibGit2/src/strarray.jl
1
# This file is a part of Julia. License is MIT: https://julialang.org/license
2

3

4
function Base.cconvert(::Type{Ptr{StrArrayStruct}}, x::Vector)
5
    str_ref = Base.cconvert(Ref{Cstring}, x)
×
6
    sa_ref = Ref(StrArrayStruct(Base.unsafe_convert(Ref{Cstring}, str_ref), length(x)))
×
7
    sa_ref, str_ref
×
8
end
9
function Base.unsafe_convert(::Type{Ptr{StrArrayStruct}}, rr::Tuple{Ref{StrArrayStruct}, Ref{Cstring}})
10
    Base.unsafe_convert(Ptr{StrArrayStruct}, first(rr))
×
11
end
12

13
function Base.convert(::Type{Vector{String}}, sa::StrArrayStruct)
14
    [unsafe_string(unsafe_load(sa.strings, i)) for i = 1:sa.count]
×
15
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc