Skip to content
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

fix Issue 17098 - Takes hours to -O compile then fails with Internal … #10789

Merged
merged 1 commit into from
Feb 18, 2020

Conversation

WalterBright
Copy link
Member

…error: backend/cgreg.c 405

The long compilation times are not fixed, there's not much to be done about that as the behavior of the optimizer is inherently quadratic. But the test case compiles now.

The test case isn't included because it takes hours to compile.

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @WalterBright!

Bugzilla references

Auto-close Bugzilla Severity Description
17098 regression Takes hours to -O compile then fails with Internal error: backend/cgreg.c 405

⚠️⚠️⚠️ Warnings ⚠️⚠️⚠️

To target stable perform these two steps:

  1. Rebase your branch to upstream/stable:
git rebase --onto upstream/stable upstream/master
  1. Change the base branch of your PR to stable

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub fetch digger
dub run digger -- build "master + dmd#10789"

@WalterBright
Copy link
Member Author

This is a very minor regression and very ancient, so no need to go into stable.

@Geod24
Copy link
Member

Geod24 commented Feb 16, 2020

This is a very minor regression and very ancient, so no need to go into stable.

TL;DR Safe fixes should always go into stable, all the time.

Maybe we should amend that DIP if we are not going to follow the process outlined in it.

@WalterBright
Copy link
Member Author

It's not a safety issue.

@Geod24
Copy link
Member

Geod24 commented Feb 17, 2020

"Safe fixes" => "Fixes that are safe to merge", as opposed to "fixes that require significant work / refactoring / change to existing code".

But that is a good example on what part of the wording could use an update.

@WalterBright
Copy link
Member Author

This particular issue is very old and blocks nobody. The example for it is a toy program. Putting it into stable suggests to users that they should waste their time downloading a point release for this. Besides, all fixes carry an inherent risk of causing another problem, and for this PR, that would be further disruptive. The only reason to even fix this is a QoI dot-i-and-cross-t sort of thing.

The rules do not take precedence over common sense.

@RazvanN7
Copy link
Contributor

I'm ok with this not going into stable, but I am concerned about the missing test case. I do not doubt the implementation, but I fear that people might break this in the feature and we have no way of preventing that.

@WalterBright
Copy link
Member Author

I would include it, but having a test case that takes 2 hours to run is not very practical for the autotester.

@RazvanN7
Copy link
Contributor

Isn't it possible to add a simplified test case that covers the benefit = int.max; and would compile faster?

@WalterBright
Copy link
Member Author

I don't know how. You need a gigantic function to do it.

@WalterBright WalterBright merged commit 2f55458 into dlang:master Feb 18, 2020
@WalterBright WalterBright deleted the fix17098 branch February 18, 2020 07:52
tramker pushed a commit to tramker/dmd that referenced this pull request Jul 24, 2020
fix Issue 17098 - Takes hours to -O compile then fails with Internal …

Signed-off-by: Martin Krejcirik <mk@krej.cz>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants