so RISC-V has a bunch of registers and some get clobbered after function calls and others must be saved by the callee. that's clear, i get that
-
so RISC-V has a bunch of registers and some get clobbered after function calls and others must be saved by the callee. that's clear, i get that
but how on earth do compilers figure out which ones to use? obviously it's best to use clobbered registers if you're not calling any functions anyway, and callee saved registers if you do, but how does a compiler determine when to use which type?
i feel like there's some incredibly obvious answer here i'm not seeing cause i'm overthinking it >_>
EDIT: okay i think this would just necessitate a 2nd pass with DDCG so maybe it's not worth stressing about
-
Cyborusreplied to Eniko | Kitsune Tails out now! last edited by
@[email protected] i believe i heard this is one of the hardest problems in this space a while back
-
Eniko | Kitsune Tails out now!replied to Cyborus last edited by
@Cyborus oh no. your reply is giving me drop & run vibes
-
Cyborusreplied to Eniko | Kitsune Tails out now! last edited by
@[email protected]
DANGER
NP-HARD
DROP
&
RUN -
Blort™ 🐀Ⓥ🥋☣️replied to Eniko | Kitsune Tails out now! last edited by
@eniko
None of this sounds "incredibly obvious" to me.