aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDiego Novillo <dnovillo@google.com>2011-11-29 09:16:16 -0500
committerDiego Novillo <dnovillo@gcc.gnu.org>2011-11-29 09:16:16 -0500
commite62acfd26fc984cfb994de7e350ef1a0dbdac0ef (patch)
tree9382a98287f149b3489fbec9ed7daf0d6424b4c7 /gcc
parent635a48fbd6dc2f2b72affb7d8708a1cb38e98107 (diff)
downloadgcc-e62acfd26fc984cfb994de7e350ef1a0dbdac0ef.zip
gcc-e62acfd26fc984cfb994de7e350ef1a0dbdac0ef.tar.gz
gcc-e62acfd26fc984cfb994de7e350ef1a0dbdac0ef.tar.bz2
gimple.c (gimple_call_set_cannot_inline): Move from gimple.h.
* 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. From-SVN: r181803
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/gimple.c30
-rw-r--r--gcc/gimple.h14
3 files changed, 38 insertions, 13 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9bacc8e..bf5a6a1 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2011-11-29 Diego Novillo <dnovillo@google.com>
+
+ * 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.
+
2011-11-29 Sameera Deshpande <sameera.deshpande@arm.com>
* config/arm/arm.md (arm_movdi): Update NEG_POOL_RANGE.
diff --git a/gcc/gimple.c b/gcc/gimple.c
index 071c651..d27e94b 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"
diff --git a/gcc/gimple.h b/gcc/gimple.h
index 8536c70..df31bf3 100644
--- a/gcc/gimple.h
+++ b/gcc/gimple.h
@@ -1035,6 +1035,7 @@ extern bool walk_stmt_load_store_ops (gimple, void *,
extern bool gimple_ior_addresses_taken (bitmap, gimple);
extern bool gimple_call_builtin_p (gimple, enum built_in_function);
extern bool gimple_asm_clobbers_memory_p (const_gimple);
+extern void gimple_call_set_cannot_inline (gimple, bool);
/* In gimplify.c */
extern tree create_tmp_var_raw (tree, const char *);
@@ -2343,19 +2344,6 @@ gimple_call_tail_p (gimple s)
}
-/* Set the inlinable status of GIMPLE_CALL S to INLINABLE_P. */
-
-static inline void
-gimple_call_set_cannot_inline (gimple s, bool inlinable_p)
-{
- GIMPLE_CHECK (s, GIMPLE_CALL);
- if (inlinable_p)
- s->gsbase.subcode |= GF_CALL_CANNOT_INLINE;
- else
- s->gsbase.subcode &= ~GF_CALL_CANNOT_INLINE;
-}
-
-
/* Return true if GIMPLE_CALL S cannot be inlined. */
static inline bool