-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Translate sil-opt bridge cast folding test into an Interpreter test. #23107
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
Translate sil-opt bridge cast folding test into an Interpreter test. #23107
Conversation
d71aadb
to
9b5d8da
Compare
@swift-ci smoke test and merge |
I renamed the file and forgot to rename the filecheck pattern. |
9b5d8da
to
db33d9c
Compare
@swift-ci smoke test and merge |
3 similar comments
@swift-ci smoke test and merge |
@swift-ci smoke test and merge |
@swift-ci smoke test and merge |
db33d9c
to
98ef349
Compare
Ok. This is it for real. |
@swift-ci smoke test and merge |
This will run with the ownership verifier and will improve our test coverage of the cast optimizer.
98ef349
to
f5a6032
Compare
@swift-ci smoke test and merge |
3 similar comments
@swift-ci smoke test and merge |
@swift-ci smoke test and merge |
@swift-ci smoke test and merge |
// error here like in the other crashes. | ||
// | ||
// CHECK-LABEL: [ RUN ] BridgedCastFolding.NSDictionary -> Swift (Dictionary). Crashing Test Cases | ||
// CHECK: stderr>>> OK: saw expected "crashed: sigill" |
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.
@ravikandhadai This is a cast where I think we could give a better error message. (Really we should see if we can de-obfuscate these types at runtime. If we know we are going to crash, we should see if we can do a better job with this since runtime isn't an issue. Might be interesting for you guys).
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.
Sorry, let me be more clear. I was commenting on two things here:
- I think we are optimizing this at -Onone when we should not be, not because we can't, but because we want to leave in the error messages. Today the cast optimizer always tries to optimize these at -Onone via constant propagation. This I think violates the stronger notion of as-if at -Onone. It might be interesting for you to look at.
- In general the runtime error messages that I found here have internal runtime names. I wonder if it would make sense to use for instance __NSCFString to just say NSString.
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.
@ravikandhadai (I might fix 1 if I have time).
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.
@gottesmm I am not very familiar with this aspect of constant propagation. Just to get more clarity on the problem, isforcedCast(nsDictString)
being optimized by ConstantPropagation? It is not transparent, so I am bit confused here.
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.
The missing message turned out to be caused by an issue in the Foundation overlay (fixed in #23174).
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.
Thanks for the update.
@swift-ci smoke test and merge |
This will run with the ownership verifier and will improve our test coverage of
the cast optimizer.