Skip to content

Make interface thunks forward variadic args#2630

Merged
kinke merged 1 commit intoldc-developers:masterfrom
kinke:fix2613
Apr 10, 2018
Merged

Make interface thunks forward variadic args#2630
kinke merged 1 commit intoldc-developers:masterfrom
kinke:fix2613

Conversation

@kinke
Copy link
Member

@kinke kinke commented Mar 27, 2018

This fixes issue #2613.

call->setCallingConv(irFunc->getCallingConv());
call->setTailCallKind(llvm::CallInst::TCK_Tail);
call->setTailCallKind(thunk->isVarArg() ? llvm::CallInst::TCK_MustTail
: llvm::CallInst::TCK_Tail);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a reason why this shouldn't always be a tail call?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got Phobos compile errors (std.regex) when always using must-tail, so I switched to this without further investigation.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm ok. LGTM otherwise. Perhaps we can investigate at some later moment

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like musttail is causing problems on PowerPC: #2686

@kinke kinke merged commit 6c21e76 into ldc-developers:master Apr 10, 2018
@kinke kinke deleted the fix2613 branch April 10, 2018 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants