myeisha (pmb)
User

Projects

User does not belong to any projects.

User Details

User Since
Sat, Feb 3, 5:52 PM (2 w, 2 d)

Recent Activity

Fri, Feb 16

myeisha added reviewers for D42898: Do not spill CSR to stack on entry to noreturn functions: efriedma, hfinkel, craig.topper.
Fri, Feb 16, 9:28 AM

Tue, Feb 13

myeisha added a reviewer for D42898: Do not spill CSR to stack on entry to noreturn functions: MatzeB.
Tue, Feb 13, 10:39 AM

Thu, Feb 8

myeisha updated the diff for D42898: Do not spill CSR to stack on entry to noreturn functions.

Added a comment about setjmp/longjmp and CSR spills.

Thu, Feb 8, 1:26 PM
myeisha added a comment to D42898: Do not spill CSR to stack on entry to noreturn functions.

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?

Thu, Feb 8, 1:10 PM

Tue, Feb 6

myeisha updated the diff for D42898: Do not spill CSR to stack on entry to noreturn functions.

Added a target hook to enable CSR spill skipping, default off and enabled currently only for ARM because that's what I know best.

Tue, Feb 6, 1:09 PM
myeisha added a comment to D42898: Do not spill CSR to stack on entry to noreturn functions.

I would rather make it generic, not break debug, and habe the user decide whether or not to apply this. If libraries are the concern it probably can't be the target's decision either. Would enabling the transform only with fp-elim and a cl option be just as good?

Tue, Feb 6, 10:47 AM
myeisha added a comment to D42898: Do not spill CSR to stack on entry to noreturn functions.

If I understand the IR correctly then this would either involve some nasty inline assembly or some form of tail call. If the target were not itself nonreturning, then the caller could also not be, so the transform would not apply.

Tue, Feb 6, 10:25 AM
myeisha added a comment to D42898: Do not spill CSR to stack on entry to noreturn functions.

Can you elaborate on that? I'm primarily interested in programs that do not terminate at all, with nested nonreturning functions. How would not saving CSRs in the outer nonreturning function prolog affect the inner nonreturning function? The only affected thing that comes to my mind right now is a debugger.

Tue, Feb 6, 10:12 AM
myeisha added a comment to D42898: Do not spill CSR to stack on entry to noreturn functions.

I do agree that if this breaks stack traces it should be under some flag or something.

Tue, Feb 6, 9:46 AM

Mon, Feb 5

myeisha updated the diff for D42898: Do not spill CSR to stack on entry to noreturn functions.
Mon, Feb 5, 3:50 PM
myeisha added a comment to D42898: Do not spill CSR to stack on entry to noreturn functions.

It looks like this transform destroys stack traces on non-x86 platforms. That technically isn't wrong, I guess, but it seems unfriendly (for example, LLVM produces a stack trace on an assertion failure).

Mon, Feb 5, 3:43 PM
myeisha added a comment to D42898: Do not spill CSR to stack on entry to noreturn functions.

One last comment and it should be good. Thanks!

Mon, Feb 5, 2:56 PM
myeisha updated the diff for D42898: Do not spill CSR to stack on entry to noreturn functions.

Restricated CSR save skip to noreturn nounwind functions from previously noreturn. Exception handlers might need CSRs restored.

Mon, Feb 5, 3:53 AM

Sun, Feb 4

myeisha created D42898: Do not spill CSR to stack on entry to noreturn functions.
Sun, Feb 4, 5:39 PM