diff options
author | dnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-29 14:16:16 +0000 |
---|---|---|
committer | dnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-29 14:16:16 +0000 |
commit | d3e6368b4470dd443cf5d301714446124eed1d0a (patch) | |
tree | 9382a98287f149b3489fbec9ed7daf0d6424b4c7 /gcc/gimple.c | |
parent | 8848d797e95253b9d406ef47b7d679db9d50847e (diff) | |
download | gcc-d3e6368b4470dd443cf5d301714446124eed1d0a.tar.gz |
* gimple.c (gimple_call_set_cannot_inline): Move from gimple.h.
Update field call_stmt_cannot_inline_p from call graph edge, if
needed.
* gimple.h (gimple_call_set_cannot_inline): Move to gimple.c.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181803 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimple.c')
-rw-r--r-- | gcc/gimple.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/gcc/gimple.c b/gcc/gimple.c index 071c6515b4c..d27e94b218c 100644 --- a/gcc/gimple.c +++ b/gcc/gimple.c @@ -5558,4 +5558,34 @@ gimple_asm_clobbers_memory_p (const_gimple stmt) return false; } + + +/* Set the inlinable status of GIMPLE_CALL S to INLINABLE_P. */ + +void +gimple_call_set_cannot_inline (gimple s, bool inlinable_p) +{ + bool prev_inlinable_p; + + GIMPLE_CHECK (s, GIMPLE_CALL); + + prev_inlinable_p = gimple_call_cannot_inline_p (s); + + if (inlinable_p) + s->gsbase.subcode |= GF_CALL_CANNOT_INLINE; + else + s->gsbase.subcode &= ~GF_CALL_CANNOT_INLINE; + + /* If we have changed the inlinable attribute, and there is a call + graph edge going out of this statement, update its inlinable + attribute as well. */ + if (current_function_decl && prev_inlinable_p != inlinable_p) + { + struct cgraph_node *n = cgraph_get_node (current_function_decl); + struct cgraph_edge *e = cgraph_edge (n, s); + if (e) + e->call_stmt_cannot_inline_p = inlinable_p; + } +} + #include "gt-gimple.h" |