-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use CodeGenOpt::None at optlevel<2, Default at 2, and Aggressive at >2 #35086
Conversation
Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @ararslan |
FWIW, looks like clang made a similar change recently https://reviews.llvm.org/D28409 |
This change caused some runtime regressions in RAI's codebase between 1.4 and 1.5 at O1. For the moment we've happily resolved those regressions by patching Julia to pass Out of curiosity, why depart from clang's selection of |
We should compare some latencies with |
Haven't tested, but will! :) |
A bit of testing indicates that using CodeGenOpt::Less at O1: a) mitigates some of the runtime regressions we observe with CodeGenOpt::None at O1; and b) provides most of the compilation time reduction we observe with CodeGenOpt::None at O1. That being the case, I will submit a pull request migrating O1 to CodeGenOpt::Less shortly, with the hope that it can find its way into 1.6 :). Thanks and best! |
…37893) For context, please see #35086 (comment). Regarding alignment with clang, please see https://reviews.llvm.org/D28409 (/#35086 (comment)). ``` 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! :)
…uliaLang#37893) For context, please see JuliaLang#35086 (comment). Regarding alignment with clang, please see https://reviews.llvm.org/D28409 (/JuliaLang#35086 (comment)). ``` 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! :)
This provides a little bit of speedup. I don't fully understand what these flags mean, but it seems to make sense to use
Default
at the default optimization level. Anyway I'm curious to see what the benchmarks say.The difference in compile time between None and Default is quite large, with a much smaller difference between Default and Aggressive (which I assume is why we were using Aggressive most of the time). In fact using None for -O1 is even faster than using FastISel, so we might want to consider dropping FastISel entirely.
@nanosoldier
runbenchmarks(ALL, vs=":master")