From 6209a13e202b97e040f91e57281a2c23e0022bea Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Wed, 6 Jan 2010 17:52:09 +0000 Subject: ipa-inline.c (cgraph_decide_inlining_incrementally): Do not inline regular functions into always-inline functions. 2010-01-06 Richard Guenther * ipa-inline.c (cgraph_decide_inlining_incrementally): Do not inline regular functions into always-inline functions. * gcc.c-torture/compile/pr42632.c: New testcase. From-SVN: r155679 --- gcc/ChangeLog | 5 +++++ gcc/ipa-inline.c | 5 ++++- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gcc.c-torture/compile/pr42632.c | 16 ++++++++++++++++ 4 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.c-torture/compile/pr42632.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a8b61a3..6435d2a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2010-01-06 Richard Guenther + + * ipa-inline.c (cgraph_decide_inlining_incrementally): Do + not inline regular functions into always-inline functions. + 2010-01-06 Nick Clifton * config/rx/rx.h (enum rx_cpu_type): Add RX200. diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c index 7dbafb8..c6c84f9 100644 --- a/gcc/ipa-inline.c +++ b/gcc/ipa-inline.c @@ -1506,7 +1506,10 @@ cgraph_decide_inlining_incrementally (struct cgraph_node *node, } /* Now do the automatic inlining. */ - if (mode != INLINE_ALL && mode != INLINE_ALWAYS_INLINE) + if (mode != INLINE_ALL && mode != INLINE_ALWAYS_INLINE + /* Never inline regular functions into always-inline functions + during incremental inlining. */ + && !node->local.disregard_inline_limits) for (e = node->callees; e; e = e->next_callee) { int allowed_growth = 0; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e9c215d..ef879de 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2010-01-06 Richard Guenther + + * gcc.c-torture/compile/pr42632.c: New testcase. + 2010-01-05 H.J. Lu PR target/42542 diff --git a/gcc/testsuite/gcc.c-torture/compile/pr42632.c b/gcc/testsuite/gcc.c-torture/compile/pr42632.c new file mode 100644 index 0000000..a677853 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr42632.c @@ -0,0 +1,16 @@ +static inline __attribute__((always_inline)) int +__pskb_trim(void) +{ + return ___pskb_trim(); +} +static inline __attribute__((always_inline)) +int pskb_trim(void) +{ + return __pskb_trim(); +} +int ___pskb_trim(void) +{ + pskb_trim(); + return 0; +} + -- cgit v1.1