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

[SR-14453] Remove UseSwiftCall/enable_swiftcall frontend option #56809

Closed
typesanitizer opened this issue Apr 6, 2021 · 7 comments
Closed

[SR-14453] Remove UseSwiftCall/enable_swiftcall frontend option #56809

typesanitizer opened this issue Apr 6, 2021 · 7 comments

Comments

@typesanitizer
Copy link

@typesanitizer typesanitizer commented Apr 6, 2021

Previous ID SR-14453
Radar rdar://problem/76283411
Original Reporter @typesanitizer
Type Task
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Task, StarterBug
Assignee @jirid
Priority Medium

md5: 9b96fff3e1854e58c4eae34c5381cf53

Issue Description:

From what I can tell, it isn't being used anywhere; we've been using the swiftcall convention for several years now.

  1. Remove enable_swiftcall from FrontendOptions.td

  2. Remove UseSwiftCall from FrontendOptions.h and other places it is mentioned.

This shouldn't require any new test cases.

@typesanitizer
Copy link
Author

@typesanitizer typesanitizer commented Apr 6, 2021

@swift-ci create

@typesanitizer
Copy link
Author

@typesanitizer typesanitizer commented Apr 6, 2021

As a bonus, if you're interested in deleting code, you can try to see if there are other options which aren't being used anywhere.

@jirid
Copy link
Contributor

@jirid jirid commented Apr 21, 2021

theindigamer (JIRA User) is this jirid@c03c40f what you're looking for? I did not find the option in FrontendOptions.h, I did find it in IRGenOptions.h and removing it did not break the build for me.

@jirid
Copy link
Contributor

@jirid jirid commented May 16, 2021

@jirid
Copy link
Contributor

@jirid jirid commented May 21, 2021

I went through `FrontendOptions.h` and `IRGenOptions.h` and found 2 options that might be removable.

FrontendOptions.h:
DebugTimeExpressionTypeChecking
jirid@b6776e2

IRGenOptions.h:
DisableLLVMSLPVectorizer
jirid@ed72797

I prepared 2 independent branches with the changes. The default test suite passes after the removal. theindigamer (JIRA User) please let me know whether you consider these removals valid and would like me to open pull requests.

@typesanitizer
Copy link
Author

@typesanitizer typesanitizer commented May 21, 2021

Hmm, that's weird. I think for the first one at least, I thought compiler engineers used it for debugging. Maybe there's a bug somewhere and that variable should actually be used.

For the second one, Clang does support that as an option. So it seems like a bug that it's not being used anywhere. I'll get back to you on Monday/Tuesday on whether these two should be removed or not.

@typesanitizer
Copy link
Author

@typesanitizer typesanitizer commented Jun 1, 2021

@jirid, the DisableLLVMSLPVectorizer flag can be removed.

The two flags DebugTimeFunctionBodies and DebugTimeExpressionTypeChecking on FrontendOptions should be set when the FrontendOptions are getting parsed (they are not currently set). Then, in ParseTypeCheckerArgs, the type-checker options should copy the value from the FrontendOpts instead of parsing the arguments directly.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants