Mercurial > hg > CbC > CbC_gcc
diff gcc/gimple.h @ 73:ce75bd9117e4
merge calls.c, cfgexpand.c, gcc.c, gimple.c, gimple.h and gimplify.c
author | Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 22 Aug 2011 01:54:47 +0900 |
parents | b81903832de2 |
children | ab0bcb71f44d |
line wrap: on
line diff
--- a/gcc/gimple.h Sun Aug 21 22:22:32 2011 +0900 +++ b/gcc/gimple.h Mon Aug 22 01:54:47 2011 +0900 @@ -102,6 +102,9 @@ GF_CALL_TAILCALL = 1 << 3, GF_CALL_VA_ARG_PACK = 1 << 4, GF_CALL_NOTHROW = 1 << 5, +#ifndef noCbC + GF_CALL_CBC_GOTO = 1 << 5, +#endif GF_OMP_PARALLEL_COMBINED = 1 << 0, /* True on an GIMPLE_OMP_RETURN statement if the return does not require @@ -2172,6 +2175,21 @@ s->gsbase.subcode &= ~GF_CALL_TAILCALL; } +#ifndef noCbC +/* If CBCGOTO_P is true, mark call statement S as being a cbc goto + (i.e., a call just before the exit of a function). These calls are + candidate for tail call optimization. */ + +static inline void +gimple_call_set_cbc_goto (gimple s, bool cbcgoto_p) +{ + GIMPLE_CHECK (s, GIMPLE_CALL); + if (cbcgoto_p) + s->gsbase.subcode |= GF_CALL_CBC_GOTO; + else + s->gsbase.subcode &= ~GF_CALL_CBC_GOTO; +} +#endif /* Return true if GIMPLE_CALL S is marked as a tail call. */ @@ -2182,6 +2200,16 @@ return (s->gsbase.subcode & GF_CALL_TAILCALL) != 0; } +#ifndef noCbC +/* Return true if GIMPLE_CALL S is marked as a cbc goto. */ + +static inline bool +gimple_call_cbc_goto_p (gimple s) +{ + GIMPLE_CHECK (s, GIMPLE_CALL); + return (s->gsbase.subcode & GF_CALL_CBC_GOTO) != 0; +} +#endif /* Set the inlinable status of GIMPLE_CALL S to INLINABLE_P. */