-
Notifications
You must be signed in to change notification settings - Fork 10.5k
IRGen: Ensure collocation of relative pointers in resilient witness tables #15793
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
IRGen: Ensure collocation of relative pointers in resilient witness tables #15793
Conversation
…ables Ensure collocation by recording the dependence between witness table and witness before functions are processed. Debug info of inlined function scopes can reference the witness and will cause the wrong IRGenModule to be associated before lazy witness tables are processed. No, I am not sure that this is the only instance of this but the same solution can apply to other instances if we find them. rdar://39116991
@swift-ci Please test |
@@ -1832,10 +1832,6 @@ static llvm::Constant *emitResilientWitnessTable(IRGenModule &IGM, | |||
SILFunction *Func = entry.getMethodWitness().Witness; | |||
llvm::Constant *witness; | |||
if (Func) { | |||
// Force the thunk to be emitted in the current translation unit | |||
// when in multi-threaded mode. | |||
IGM.IRGen.forceLocalEmitOfLazyFunction(Func); |
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 this was the only usage of forceLocalEmitOfLazyFunction so you can remove it
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 now use it in ensureRelativeSymbolCollocation.
@@ -1832,10 +1832,6 @@ static llvm::Constant *emitResilientWitnessTable(IRGenModule &IGM, | |||
SILFunction *Func = entry.getMethodWitness().Witness; | |||
llvm::Constant *witness; | |||
if (Func) { | |||
// Force the thunk to be emitted in the current translation unit | |||
// when in multi-threaded mode. | |||
IGM.IRGen.forceLocalEmitOfLazyFunction(Func); |
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 now use it in ensureRelativeSymbolCollocation.
continue; | ||
auto *witness = entry.getMethodWitness().Witness; | ||
if (witness) | ||
IRGen.forceLocalEmitOfLazyFunction(witness); |
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.
Using IRGen.forceLocalEmitOfLazyFunction here.
Ensure collocation by recording the dependence between witness table and
witness before functions are processed. Debug info of inlined function
scopes can reference the witness and will cause the wrong IRGenModule to
be associated before lazy witness tables are processed.
No, I am not sure that this is the only instance of this but the same
solution can apply to other instances if we find them.
rdar://39116991