Commit 9ee46552 by Michael Ploujnikov Committed by Jeff Law

ipa-cp.c (print_all_lattices): Skip cp clones.

	* ipa-cp.c (print_all_lattices): Skip cp clones.

	* gcc.dg/lto/pr88297_0.c: New test.
	* gcc.dg/lto/pr88297_1.c: New test.

From-SVN: r267118
parent e8e50c1b
2018-12-13 Michael Ploujnikov <michael.ploujnikov@oracle.com>
* ipa-cp.c (print_all_lattices): Skip cp clones.
* ipa-cp.c: Fix various comment typos.
2018-12-13 Jakub Jelinek <jakub@redhat.com>
......@@ -542,6 +542,9 @@ print_all_lattices (FILE * f, bool dump_sources, bool dump_benefits)
struct ipa_node_params *info;
info = IPA_NODE_REF (node);
/* Skip constprop clones since we don't make lattices for them. */
if (info->ipcp_orig_node)
continue;
fprintf (f, " Node: %s:\n", node->dump_name ());
count = ipa_get_param_count (info);
for (i = 0; i < count; i++)
......
2018-12-13 Michael Ploujnikov <michael.ploujnikov@oracle.com>
* gcc.dg/lto/pr88297_0.c: New test.
* gcc.dg/lto/pr88297_1.c: New test.
2018-12-13 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/88444
......
/* { dg-require-effective-target lto } */
/* { dg-lto-options { { -flto -O3 -fipa-cp -fipa-cp-clone } } } */
/* { dg-lto-do run } */
/* In order to trigger IPA-CP cloning we have to:
1. Put the calls in main into a loop; otherwise everything is
cold and we would not clone.
2. Make different foos and bars actually semantically different;
otherwise IPA-ICF unified them (as it should).
*/
volatile int g;
void __attribute__ ((noipa))
use (int v)
{
g = v;
}
static int __attribute__ ((noinline))
foo (int arg)
{
return 7 * arg;
}
static int __attribute__ ((noinline))
bar (int arg)
{
return arg * arg;
}
extern int __attribute__ ((noinline))
entry2 (void);
int __attribute__ ((noipa))
get_opaque_number (void)
{
return 1;
}
int main (void)
{
int i;
for (i = 0; i < get_opaque_number (); i++)
{
use (bar (3));
use (bar (4));
use (foo (5));
use (foo (6));
entry2 ();
}
return 0;
}
extern void __attribute__ ((noipa))
use (int v);
static int __attribute__ ((noinline))
foo (int arg)
{
return 8 * arg;
}
static int __attribute__ ((noinline))
bar (int arg)
{
return arg * arg + 3;
}
int __attribute__ ((noinline))
entry2 (void)
{
use (bar (3));
use (bar (4));
use (foo (5));
use (foo (6));
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment