-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Add -Xfrontend -mergeable-traps as a way to emit mergeable traps #76045
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
Conversation
d90423c
to
ff04af4
Compare
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.
I think it also makes sense to relax the condition in
(condFailToMerge.isEmpty || cfi.message == condFailToMerge.first!.message) { |
@@ -503,7 +503,7 @@ llvm::CallInst *IRBuilder::CreateNonMergeableTrap(IRGenModule &IGM, | |||
} | |||
} | |||
|
|||
if (IGM.IRGen.Opts.shouldOptimize()) { |
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.
Shouldn't we keep IGM.IRGen.Opts.shouldOptimize()
, too?
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.
Ok, done!
ff04af4
to
6e0d765
Compare
Done! |
@swift-ci please test |
e685980
to
23e4d64
Compare
@swift-ci please test |
23e4d64
to
934e11a
Compare
…perimental features
934e11a
to
859c565
Compare
@swift-ci please test |
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.
lgtm!
@swift-ci please test |
Only adding as a hidden frontend flag, not intending this to actually be used in normal production code. But this is potentially useful for Embedded Swift and especially codesize constrained environments: (1) A/B testing to see how much codesize are we paying for non-mergeable traps, (2) if it's appropriate in special cases to regress debuggability to save on codesize.