-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Avoid using the -O0 code emission because it has several bugs #54140
Conversation
9a99667
to
7aca251
Compare
src/jitlayers.cpp
Outdated
@@ -604,7 +604,7 @@ CodeGenOpt::Level CodeGenOptLevelFor(int optlevel) | |||
#ifdef DISABLE_OPT | |||
return CodeGenOpt::None; | |||
#else | |||
return optlevel < 2 ? CodeGenOpt::None : | |||
return optlevel < 1 ? CodeGenOpt::None : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
optlevel == 1
will now give CodeGenOpt::Aggressive
. Is that intended?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, yeah that's wrong. I want Default. The nested conditionals messed me up
I've been running a large number of tests with different aggressiveness settings for the different pipelines. I do not have a complete set of results yet, but here are a few observations related to this PR:
Happy to share some of our testing results on Slack, if you are interested. |
That module triggers an llvm assertion for example, and we disable fast isel on two targets already and have seen issues before. Does this really make that much of a difference in some tests? |
We don't have exhaustive results on this test yet, but early indications are that Also, we find that |
Maybe we can reopen sacha's PR (or push to it) to open an updated standalone PR for just the O1 less change, so that can be merged separately from the rest of the changes here? |
Oh, wait, actually Sacha's PR is up to date. Sorry for my confusion! Yeah, let's merge that on its own! |
It is?! After almost four years?! Color me shocked 😂 |
Closed by #37893 |
This only affects debug builds of julia but i've found multiple issues with the backends with O0. The latest being a crash while compiling the following module. To reproduce do
llc -O0
with LLVM 16, given that the "fast" backend implementations have repeating issues I propose to just never use them.