fix Issue 16958 - replace -mavx switch with -mcpu=id#6306
Merged
andralex merged 1 commit intodlang:masterfrom Dec 12, 2016
Merged
fix Issue 16958 - replace -mavx switch with -mcpu=id#6306andralex merged 1 commit intodlang:masterfrom
andralex merged 1 commit intodlang:masterfrom
Conversation
Contributor
|
andralex
requested changes
Dec 8, 2016
src/mars.d
Outdated
| else | ||
| goto Lerror; | ||
| } | ||
| else if (memcmp(p + 1, cast(char*)"mcpu", 4) == 0) |
| "); | ||
| exit(EXIT_SUCCESS); | ||
| } | ||
| else if (Identifier.isValidIdentifier(p + 6)) |
Member
There was a problem hiding this comment.
This API is awkward - first it tells you whether an identifier is valid, than you need to do the same work again to load it. How about parseCPUType that returns an enum value?
Member
Author
There was a problem hiding this comment.
It's a copy/paste bit of code from the "-transition=id" block. Splitting out the parser would wind up being even more lines of code, since it's a one-off job. Of course, at some point we should just migrate the whole shebang to std.getopt, but I don't think it is worthwhile to badly reinvent std.getopt in the meantime.
Member
|
Auto-merge toggled on |
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 -mcpu=native will allow the autotester to randomly check the AVX code generation, since only some of the machines are AVX capable, and are randomly assigned.