-
Notifications
You must be signed in to change notification settings - Fork 10.5k
IRGen: Use the header size for the initial offset in non fixed heap l… #31049
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: Use the header size for the initial offset in non fixed heap l… #31049
Conversation
…ayouts When the first element in the heap layout was non fixed we would use the mininum size of the total heap layout for the initial offset. This would create unneccessary large heap layouts. rdar://61716736
@swift-ci Please test |
@swift-ci Please test source compatibility |
Build failed |
The source compat failure is unrelated:
|
@swift-ci Please test |
Build failed |
Build failed |
@swift-ci Please test source compat |
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's unfortunate that we support partial_apply
contexts with non-fixed offsets. Did we give up on using SILBoxType for this purpose?
@@ -285,7 +285,7 @@ static llvm::Value *calcInitOffset(swift::irgen::IRGenFunction &IGF, | |||
const swift::irgen::HeapLayout &layout) { | |||
llvm::Value *offset = nullptr; | |||
if (i == 0) { | |||
auto startoffset = layout.getSize(); | |||
auto startoffset = layout.getHeaderSize(); |
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.
Can you rename this to startOffset?
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.
Will change in a follow-up.
The source compatibility failure is unrelated:
|
I don't think we have given up on using SILBoxType's for the representation of closures. 'Just' needs some work in SILGen, SIL, IRGen. |
…ayouts
When the first element in the heap layout was non fixed we would use the
mininum size of the total heap layout for the initial offset. This would
create unneccessary large heap layouts.
rdar://61716736