[PATCH] D42898: Do not spill CSR to stack on entry to noreturn functions
Francis Visoiu Mistrih via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 6 14:51:18 PST 2018
thegameg added a comment.
In https://reviews.llvm.org/D42898#999350, @kparzysz wrote:
> It could be a call to some library function (from a user-provided library). I agree that this is a very unlikely scenario, but we've had a customer report a bug related to a similar situation.
Just out of curiosity, can you please share some more information about that?
>From what I understand,
A (nounwind) calls B (nounwind, noreturn)
B (nounwind, noreturn) calls library function C (nounwind?)
C (nounwind?) returns to A (nounwind) ?
In that case, B not saving the CSRs will destroy A's CSRs, but I can't really understand how we can end up in this case.
My assumptions are:
- can't (tail-)call throwing functions from `nounwind` functions
- can't (tail-)call returning functions from `noreturn` functions
but I might be wrong on that.
https://reviews.llvm.org/D42898
More information about the llvm-commits
mailing list