julia
julia copied to clipboard
Pass CodeGenOpt::Less to LLVM at O1 (rather than CodeGenOpt::None).
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! :)
For me this increases the TTFP from 7.3 to 8.5 seconds.
For me this increases the TTFP from 7.3 to 8.5 seconds.
Ouch, that's more significant than observed on our workloads. Thoughts on acceptability at O1? :)
Well, Plots specifies @optlevel 1, so maybe we can reduce that to 0.
Well, Plots specifies
@optlevel 1, so maybe we can reduce that to 0.
I see, and cheers if that's workable; if not, I totally understand :).
We managed to work around the LLVM compilation time blowup at O2 that was keeping us at O1, subsequently migrated back to O2, and so no longer need to carry this patch. That said, this change may still make sense in principle though, what with e.g. clang's behavior; it also may not given the tradeoff identified above. Thoughts Jeff? :)
The change here itself seems fine but it's probably good to get some updated benchmarks on this @kpamnany
This could do with a rebase + CI before merging @NHDaly
Tapped the handy master-merge button. Let's see what explodes! 🎉
@gbaraldi, if you're happy with this patch, would you like to do the honors? :)