This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: setjmp () detection in RTL
On Thu, Feb 14, 2013 at 9:35 AM, Kirill Yukhin <kirill.yukhin@gmail.com> wrote:
> Hi,
> Could anybody pls advise, if I can detect that given RTL `call` is
> actually a setjmp ()?
Get at the function-decl and use special_function_p (decl, 0) &
ECF_RETURNS_TWICE
(that will conservatively detect all possible setjmp calls but not
identify only calls
to exactly setjmp).
Richard.
> I see no references in dump...
> (call_insn 6 5 7 (set (reg:SI 0 ax)
> (call (mem:QI (symbol_ref:DI ("_setjmp") [flags 0x41]
> <function_decl 0x7f6ede1e0000 _setjmp>) [0 _setjmp S1 A8])
> (const_int 0 [0]))) 4.c:17 -1
> (expr_list:REG_SETJMP (const_int 0 [0])
> (expr_list:REG_EH_REGION (const_int 0 [0])
> (nil)))
> (expr_list:REG_FRAME_RELATED_EXPR (use (reg:DI 5 di))
> (nil)))
>
> Thanks