[PATCH] D42898: Do not spill CSR to stack on entry to noreturn functions
Krzysztof Parzyszek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 7 06:54:13 PST 2018
kparzysz added a comment.
By library function I simply meant a function that is provided by the user, which the compiler doesn't see the definition of. The problem I remember seeing was that he didn't restore a callee-saved register, but I don't remember exactly where this was in relation to a noreturn function. The code that we were compiling was written in C, not C++. I suspect there was something similar to longjmp (but probably not a longjmp itself) somewhere in the user code that aborted some processing routines and "returned" to a top-level function. It's just a guess though (I couldn't find that bug with a quick search).
My main concern here is that this should not be a default behavior for all targets. As long as we have an option to opt out of this, I don't have objections, especially because a problematic case is not very common. The added callback should take care of it.
https://reviews.llvm.org/D42898
More information about the llvm-commits
mailing list