nvptx doesn't use register allocation and avoids all the postreload passes. It needs to call thread_prologue_and_epilogue_insns manually from reorg.
gcc/ * function.c (thread_prologue_and_epilogue_insns): No longer static. * function.h (thread_prologue_and_epilogue_insns): Declare. ------------------------------------------------------------------------ Index: gcc/function.c =================================================================== --- gcc/function.c (revision 422424) +++ gcc/function.c (revision 422425) @@ -5945,7 +5945,7 @@ emit_return_for_exit (edge exit_fallthru in a sibcall omit the sibcall_epilogue if the block is not in ANTIC. */ -static void +void thread_prologue_and_epilogue_insns (void) { bool inserted; Index: gcc/function.h =================================================================== --- gcc/function.h (revision 422424) +++ gcc/function.h (revision 422425) @@ -773,6 +773,8 @@ extern void free_after_compilation (stru extern void init_varasm_status (void); +extern void thread_prologue_and_epilogue_insns (void); + #ifdef RTX_CODE extern void diddle_return_value (void (*)(rtx, void*), void*); extern void clobber_return_register (void);