re PR middle-end/55797 (ICE: verify_cgraph_node failed: edge has no corresponding call_stmt)
PR tree-optimization/55789 * g++.dg/tree-ssa/inline-1.C: Update max-inliner-iterations. * g++.dg/tree-ssa/inline-2.C: Update max-inliner-iterations. * g++.dg/tree-ssa/inline-3.C: Update max-inliner-iterations. * g++.dg/ipa/inline-1.C: New testcase. * g++.dg/ipa/inline-2.C: New testcase. * g++.dg/ipa/inline-3.C: New testcase. * params.def (PARAM_EARLY_INLINER_MAX_ITERATIONS): Drop to 1. From-SVN: r195751
This commit is contained in:
parent
39f9719e9a
commit
ec4224ace5
@ -1,6 +1,11 @@
|
||||
2013-02-05 Jan Hubicka <jh@suse.cz>
|
||||
|
||||
PR tree-optimization/r55789
|
||||
PR tree-optimization/55789
|
||||
* params.def (PARAM_EARLY_INLINER_MAX_ITERATIONS): Drop to 1.
|
||||
|
||||
2013-02-05 Jan Hubicka <jh@suse.cz>
|
||||
|
||||
PR tree-optimization/55789
|
||||
* cgraphclones.c (cgraph_remove_node_and_inline_clones): Remove
|
||||
the dead call anyway.
|
||||
|
||||
|
@ -109,7 +109,7 @@ DEFPARAM (PARAM_MIN_INLINE_RECURSIVE_PROBABILITY,
|
||||
DEFPARAM (PARAM_EARLY_INLINER_MAX_ITERATIONS,
|
||||
"max-early-inliner-iterations",
|
||||
"The maximum number of nested indirect inlining performed by early inliner",
|
||||
10, 0, 0)
|
||||
1, 0, 0)
|
||||
|
||||
/* Limit on probability of entry BB. */
|
||||
DEFPARAM (PARAM_COMDAT_SHARING_PROBABILITY,
|
||||
|
36
gcc/testsuite/g++.dg/ipa/inline-1.C
Normal file
36
gcc/testsuite/g++.dg/ipa/inline-1.C
Normal file
@ -0,0 +1,36 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2 -fdump-ipa-inline --param max-early-inliner-iterations=1" } */
|
||||
/* { dg-add-options bind_pic_locally } */
|
||||
|
||||
namespace std {
|
||||
extern "C" void puts(const char *s);
|
||||
}
|
||||
|
||||
template <class T, class E> void
|
||||
foreach (T b, T e, void (*ptr)(E))
|
||||
{
|
||||
for (; b != e; b++)
|
||||
ptr(*b);
|
||||
}
|
||||
|
||||
void
|
||||
inline_me (char *x)
|
||||
{
|
||||
std::puts(x);
|
||||
}
|
||||
|
||||
static void
|
||||
inline_me_too (char *x)
|
||||
{
|
||||
std::puts(x);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
foreach (argv, argv + argc, inline_me);
|
||||
foreach (argv, argv + argc, inline_me_too);
|
||||
}
|
||||
|
||||
/* { dg-final { scan-tree-dump-times "Considering void inline_me\\(" 1 "inline"} } */
|
||||
/* { dg-final { scan-tree-dump-times "Considering void inline_me_too\\(" 1 "inline"} } */
|
||||
/* { dg-final { cleanup-tree-dump "einline" } } */
|
36
gcc/testsuite/g++.dg/ipa/inline-2.C
Normal file
36
gcc/testsuite/g++.dg/ipa/inline-2.C
Normal file
@ -0,0 +1,36 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2 -fdump-ipa-inline --param max-early-inliner-iterations=1" } */
|
||||
/* { dg-add-options bind_pic_locally } */
|
||||
|
||||
namespace std {
|
||||
extern "C" void puts(const char *s);
|
||||
}
|
||||
|
||||
template <class T, class E> void
|
||||
foreach (T b, T e, E ptr)
|
||||
{
|
||||
for (; b != e; b++)
|
||||
ptr(*b);
|
||||
}
|
||||
|
||||
void
|
||||
inline_me (char *x)
|
||||
{
|
||||
std::puts(x);
|
||||
}
|
||||
|
||||
static void
|
||||
inline_me_too (char *x)
|
||||
{
|
||||
std::puts(x);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
foreach (argv, argv + argc, inline_me);
|
||||
foreach (argv, argv + argc, inline_me_too);
|
||||
}
|
||||
|
||||
/* { dg-final { scan-ipa-dump-times "Considering void inline_me\\(" 1 "inline"} } */
|
||||
/* { dg-final { scan-ipa-dump-times "Considering void inline_me_too\\(" 1 "inline"} } */
|
||||
/* { dg-final { cleanup-ipa-dump "inline" } } */
|
29
gcc/testsuite/g++.dg/ipa/inline-3.C
Normal file
29
gcc/testsuite/g++.dg/ipa/inline-3.C
Normal file
@ -0,0 +1,29 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2 -fdump-ipa-inline --param max-early-inliner-iterations=1" } */
|
||||
/* { dg-add-options bind_pic_locally } */
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
void foo(const char *s);
|
||||
|
||||
void
|
||||
inline_me (char *x)
|
||||
{
|
||||
foo(x);
|
||||
}
|
||||
|
||||
static void
|
||||
inline_me_too (char *x)
|
||||
{
|
||||
foo(x);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
std::for_each (argv, argv + argc, inline_me);
|
||||
std::for_each (argv, argv + argc, inline_me_too);
|
||||
}
|
||||
|
||||
/* { dg-final { scan-ipa-dump-times "Considering void inline_me\\(" 1 "inline"} } */
|
||||
/* { dg-final { scan-ipa-dump-times "Considering void inline_me_too\\(" 1 "inline"} } */
|
||||
/* { dg-final { cleanup-tree-dump "inline" } } */
|
@ -1,5 +1,5 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2 -fdump-tree-einline" } */
|
||||
/* { dg-options "-O2 -fdump-tree-einline --param max-early-inliner-iterations=3" } */
|
||||
/* { dg-add-options bind_pic_locally } */
|
||||
|
||||
namespace std {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2 -fdump-tree-einline" } */
|
||||
/* { dg-options "-O2 -fdump-tree-einline --param max-early-inliner-iterations=3" } */
|
||||
/* { dg-add-options bind_pic_locally } */
|
||||
|
||||
namespace std {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2 -fdump-tree-einline" } */
|
||||
/* { dg-options "-O2 -fdump-tree-einline --param max-early-inliner-iterations=3" } */
|
||||
/* { dg-add-options bind_pic_locally } */
|
||||
|
||||
#include <algorithm>
|
||||
|
Loading…
x
Reference in New Issue
Block a user