This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Functions using attribute `noreturn'...
- To: pmw at uk dot research dot att dot com (Paul Webster)
- Subject: Re: Functions using attribute `noreturn'...
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Wed, 02 Feb 2000 15:18:43 -0700
- cc: gcc-help at gcc dot gnu dot org
- Reply-To: law at cygnus dot com
In message <200002021707.RAA14128@rocoto>you write:
> To minimise the amount of code output, I would like to check to see if the
> current function is declared with the __noreturn__ attribute. If it is,
> then I don't need to do output any of the function return code or
> save/restore any registers that otherwise would be.
This will happen automatically if you are using RTL prologues and epilogues.
The code which emits the epilogue will notice that the exit block has no
true predecessors and thus the epilogue code is unnecessary and never added
to the insn stream.
jeff