change backend_init code to workaround bug in VC optimizer#5037
Merged
WalterBright merged 1 commit intodlang:masterfrom Sep 5, 2015
Merged
change backend_init code to workaround bug in VC optimizer#5037WalterBright merged 1 commit intodlang:masterfrom
WalterBright merged 1 commit intodlang:masterfrom
Conversation
…et tysize[TYnref]
Member
Author
|
With this patch and #5010, I finally get a working (i.e. passing the test suite) release build using VC for the backend. Apart from better debugging, it generates faster code than dmc. Compile times for the D sources of ddmd with
Building the debug version takes about 2 seconds, so I expect the additional time is spent in the optimizer. |
Member
|
The strange loop is an anachronism from olden code. |
WalterBright
added a commit
that referenced
this pull request
Sep 5, 2015
change backend_init code to workaround bug in VC optimizer
Member
Which I expect would have been better written as 'do { ... } while (0)' some years later. ;) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The VC optimizer fails to change tysize[TYnref] when using optimized builds, all other entries seem ok.
This is clearly a MS compiler bug, but removing the non-looping loop seems to help avoid the troubles. Is there a reason to keep these loops running from 0 to 0?
I'm not sure why this worked before the frontend switch to D. Maybe the link time code generation uses a slightly different code generator.
I'm currently using VS2013 Update 4.