[PATCH] D42898: Do not spill CSR to stack on entry to noreturn functions
pmb via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 8 13:10:38 PST 2018
myeisha added a comment.
I did think about that, but came to the conclusion that longjmp would have to restore all callee-saves to the state they had at setjmp, and that setjmp would have to store them into the jmp_buf. If longjmp uses CSR spills the transform is indeed unsound, but I'm not sure how it would access those without being an llvm builtin. I've checked with what musl does on ARM (because that's what I'm familiar with) to confirm that idea, so at least on ARM the transform should be safe?
https://reviews.llvm.org/D42898
More information about the llvm-commits
mailing list