comparison gcc/gimple.h @ 5:a4c410aa4714

modifing gimple.[ch], cfgexpand.c to make gimple to support cbc goto flags.
author kent <kent@cr.ie.u-ryukyu.ac.jp>
date Thu, 30 Jul 2009 19:22:01 +0900
parents a06113de4d67
children 9de9dad105d4
comparison
equal deleted inserted replaced
4:60db277cbe4d 5:a4c410aa4714
99 GF_CALL_CANNOT_INLINE = 1 << 0, 99 GF_CALL_CANNOT_INLINE = 1 << 0,
100 GF_CALL_FROM_THUNK = 1 << 1, 100 GF_CALL_FROM_THUNK = 1 << 1,
101 GF_CALL_RETURN_SLOT_OPT = 1 << 2, 101 GF_CALL_RETURN_SLOT_OPT = 1 << 2,
102 GF_CALL_TAILCALL = 1 << 3, 102 GF_CALL_TAILCALL = 1 << 3,
103 GF_CALL_VA_ARG_PACK = 1 << 4, 103 GF_CALL_VA_ARG_PACK = 1 << 4,
104 #ifndef noCbC
105 GF_CALL_CBC_GOTO = 1 << 5,
106 #endif
104 GF_OMP_PARALLEL_COMBINED = 1 << 0, 107 GF_OMP_PARALLEL_COMBINED = 1 << 0,
105 108
106 /* True on an GIMPLE_OMP_RETURN statement if the return does not require 109 /* True on an GIMPLE_OMP_RETURN statement if the return does not require
107 a thread synchronization via some sort of barrier. The exact barrier 110 a thread synchronization via some sort of barrier. The exact barrier
108 that would otherwise be emitted is dependent on the OMP statement with 111 that would otherwise be emitted is dependent on the OMP statement with
2086 s->gsbase.subcode |= GF_CALL_TAILCALL; 2089 s->gsbase.subcode |= GF_CALL_TAILCALL;
2087 else 2090 else
2088 s->gsbase.subcode &= ~GF_CALL_TAILCALL; 2091 s->gsbase.subcode &= ~GF_CALL_TAILCALL;
2089 } 2092 }
2090 2093
2094 #ifndef noCbC
2095 /* If CBCGOTO_P is true, mark call statement S as being a cbc goto
2096 (i.e., a call just before the exit of a function). These calls are
2097 candidate for tail call optimization. */
2098
2099 static inline void
2100 gimple_call_set_cbc_goto (gimple s, bool cbcgoto_p)
2101 {
2102 GIMPLE_CHECK (s, GIMPLE_CALL);
2103 if (cbcgoto_p)
2104 s->gsbase.subcode |= GF_CALL_CBC_GOTO;
2105 else
2106 s->gsbase.subcode &= ~GF_CALL_CBC_GOTO;
2107 }
2108 #endif
2091 2109
2092 /* Return true if GIMPLE_CALL S is marked as a tail call. */ 2110 /* Return true if GIMPLE_CALL S is marked as a tail call. */
2093 2111
2094 static inline bool 2112 static inline bool
2095 gimple_call_tail_p (gimple s) 2113 gimple_call_tail_p (gimple s)
2096 { 2114 {
2097 GIMPLE_CHECK (s, GIMPLE_CALL); 2115 GIMPLE_CHECK (s, GIMPLE_CALL);
2098 return (s->gsbase.subcode & GF_CALL_TAILCALL) != 0; 2116 return (s->gsbase.subcode & GF_CALL_TAILCALL) != 0;
2099 } 2117 }
2100 2118
2119 #ifndef noCbC
2120 /* Return true if GIMPLE_CALL S is marked as a cbc goto. */
2121
2122 static inline bool
2123 gimple_call_cbc_goto_p (gimple s)
2124 {
2125 GIMPLE_CHECK (s, GIMPLE_CALL);
2126 return (s->gsbase.subcode & GF_CALL_CBC_GOTO) != 0;
2127 }
2128 #endif
2101 2129
2102 /* Set the inlinable status of GIMPLE_CALL S to INLINABLE_P. */ 2130 /* Set the inlinable status of GIMPLE_CALL S to INLINABLE_P. */
2103 2131
2104 static inline void 2132 static inline void
2105 gimple_call_set_cannot_inline (gimple s, bool inlinable_p) 2133 gimple_call_set_cannot_inline (gimple s, bool inlinable_p)