From patchwork Mon Jan 9 15:05:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 90476 Delivered-To: patch@linaro.org Received: by 10.182.3.34 with SMTP id 2csp651071obz; Mon, 9 Jan 2017 07:06:20 -0800 (PST) X-Received: by 10.99.0.194 with SMTP id 185mr162002425pga.111.1483974380401; Mon, 09 Jan 2017 07:06:20 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id k2si15453562pln.176.2017.01.09.07.06.20 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Jan 2017 07:06:20 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-445690-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-445690-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-445690-patch=linaro.org@gcc.gnu.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:references:cc:from:message-id:date:mime-version :in-reply-to:content-type; q=dns; s=default; b=XpvBbozEj3HZ1cLGd v9mF1Niam8a1LqRKjm+ViX81TfasWXL3G65bTKNj/rbrQnBVJPGXKz+MxLiR78oc r1sBjtNb9kw55cU7AXr6N302D4K7/3lYs8WYPDyQyCkdJNtzX2PStw/IV9qe3w00 ZIo08vfwdePAQ6+2kDsBmGnhYg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:references:cc:from:message-id:date:mime-version :in-reply-to:content-type; s=default; bh=i3EjQX+xvjkNIpaACjFujpS PeGs=; b=kIiPTawEI1XBCIlx9Y4jB8qng0SZ5fTTTyqFbTyXXhClEWWlyzJ2U45 CT3MWFDjBfwvvhkjEU9cgmCeP0TOt+02lWkdaBaAaCeBRuGid1HgLyZfVmQV4ABK elaYUM2s5WIeUC1ZfSewMrexo0HNTVRW0iaBmVoDUiIjOxyh+JgY= Received: (qmail 24706 invoked by alias); 9 Jan 2017 15:06:04 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 24693 invoked by uid 89); 9 Jan 2017 15:06:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00, SPF_PASS autolearn=ham version=3.3.2 spammy=38, 5, zap, (unknown), scanned X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 09 Jan 2017 15:05:53 +0000 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 805F6ACE4; Mon, 9 Jan 2017 15:05:51 +0000 (UTC) Subject: [PATCH 2/2] IPA ICF: make algorithm stable to survive -fcompare-debug To: Richard Biener , Alexandre Oliva , Jakub Jelinek References: <20170105085729.GU21933@tucnak> <20170105220218.GF21933@tucnak> <0b1a1a91-260b-8684-8264-1fab3152246f@suse.cz> Cc: GCC Patches From: =?UTF-8?Q?Martin_Li=c5=a1ka?= Message-ID: <719d17b0-baf0-4fe8-dd7c-43365e9c689c@suse.cz> Date: Mon, 9 Jan 2017 16:05:43 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <0b1a1a91-260b-8684-8264-1fab3152246f@suse.cz> X-IsSubscribed: yes Second part of the patch does sorting of final congruence classes, it's groups and items included in the groups according DECL_UID. Both patches can bootstrap together on ppc64le-redhat-linux and survive regression tests. Ready to be installed? Martin >From c3baaad9da1fdaa95ff5b8a69fc7925ede13d8c9 Mon Sep 17 00:00:00 2001 From: marxin Date: Fri, 6 Jan 2017 13:30:08 +0100 Subject: [PATCH 2/2] IPA ICF: make algorithm stable to survive -fcompare-debug gcc/testsuite/ChangeLog: 2017-01-06 Martin Liska * gcc.dg/ipa/ipa-icf-1.c: Change scanned pattern. * gcc.dg/ipa/ipa-icf-10.c: Likewise. * gcc.dg/ipa/ipa-icf-11.c: Likewise. * gcc.dg/ipa/ipa-icf-12.c: Likewise. * gcc.dg/ipa/ipa-icf-13.c: Likewise. * gcc.dg/ipa/ipa-icf-16.c: Likewise. * gcc.dg/ipa/ipa-icf-18.c: Likewise. * gcc.dg/ipa/ipa-icf-2.c: Likewise. * gcc.dg/ipa/ipa-icf-20.c: Likewise. * gcc.dg/ipa/ipa-icf-21.c: Likewise. * gcc.dg/ipa/ipa-icf-23.c: Likewise. * gcc.dg/ipa/ipa-icf-25.c: Likewise. * gcc.dg/ipa/ipa-icf-26.c: Likewise. * gcc.dg/ipa/ipa-icf-27.c: Likewise. * gcc.dg/ipa/ipa-icf-3.c: Likewise. * gcc.dg/ipa/ipa-icf-35.c: Likewise. * gcc.dg/ipa/ipa-icf-36.c: Likewise. * gcc.dg/ipa/ipa-icf-37.c: Likewise. * gcc.dg/ipa/ipa-icf-5.c: Likewise. * gcc.dg/ipa/ipa-icf-7.c: Likewise. * gcc.dg/ipa/ipa-icf-8.c: Likewise. * gcc.dg/ipa/pr64307.c: Likewise. * gcc.dg/ipa/pr77653.c: Likewise. gcc/ChangeLog: 2017-01-06 Martin Liska * ipa-icf.c (sort_sem_items_by_decl_uid): New function. (sort_congruence_classes_by_decl_uid): Likewise. (sort_congruence_class_groups_by_decl_uid): Likewise. (sem_item_optimizer::merge_classes): Sort class, groups in these classes and members in the groups by DECL_UID of declarations. This would make merge operations stable. --- gcc/ipa-icf.c | 92 +++++++++++++++++++++++++++++++++-- gcc/testsuite/gcc.dg/ipa/ipa-icf-1.c | 2 +- gcc/testsuite/gcc.dg/ipa/ipa-icf-10.c | 2 +- gcc/testsuite/gcc.dg/ipa/ipa-icf-11.c | 2 +- gcc/testsuite/gcc.dg/ipa/ipa-icf-12.c | 2 +- gcc/testsuite/gcc.dg/ipa/ipa-icf-13.c | 6 +-- gcc/testsuite/gcc.dg/ipa/ipa-icf-16.c | 2 +- gcc/testsuite/gcc.dg/ipa/ipa-icf-18.c | 2 +- gcc/testsuite/gcc.dg/ipa/ipa-icf-2.c | 2 +- gcc/testsuite/gcc.dg/ipa/ipa-icf-20.c | 2 +- gcc/testsuite/gcc.dg/ipa/ipa-icf-21.c | 2 +- gcc/testsuite/gcc.dg/ipa/ipa-icf-23.c | 2 +- gcc/testsuite/gcc.dg/ipa/ipa-icf-25.c | 4 +- gcc/testsuite/gcc.dg/ipa/ipa-icf-26.c | 2 +- gcc/testsuite/gcc.dg/ipa/ipa-icf-27.c | 2 +- gcc/testsuite/gcc.dg/ipa/ipa-icf-3.c | 2 +- gcc/testsuite/gcc.dg/ipa/ipa-icf-35.c | 6 +-- gcc/testsuite/gcc.dg/ipa/ipa-icf-36.c | 10 ++-- gcc/testsuite/gcc.dg/ipa/ipa-icf-37.c | 10 ++-- gcc/testsuite/gcc.dg/ipa/ipa-icf-5.c | 2 +- gcc/testsuite/gcc.dg/ipa/ipa-icf-7.c | 2 +- gcc/testsuite/gcc.dg/ipa/ipa-icf-8.c | 2 +- gcc/testsuite/gcc.dg/ipa/pr64307.c | 2 +- gcc/testsuite/gcc.dg/ipa/pr77653.c | 2 +- 24 files changed, 124 insertions(+), 40 deletions(-) diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c index 28de251c421..4c835c39e3d 100644 --- a/gcc/ipa-icf.c +++ b/gcc/ipa-icf.c @@ -3380,6 +3380,66 @@ sem_item_optimizer::dump_cong_classes (void) free (histogram); } +/* Sort pair of sem_items A and B by DECL_UID. */ + +static int +sort_sem_items_by_decl_uid (const void *a, const void *b) +{ + const sem_item *i1 = *(const sem_item * const *)a; + const sem_item *i2 = *(const sem_item * const *)b; + + int uid1 = DECL_UID (i1->decl); + int uid2 = DECL_UID (i2->decl); + + if (uid1 < uid2) + return -1; + else if (uid1 > uid2) + return 1; + else + return 0; +} + +/* Sort pair of congruence_classes A and B by DECL_UID of the first member. */ + +static int +sort_congruence_classes_by_decl_uid (const void *a, const void *b) +{ + const congruence_class *c1 = *(const congruence_class * const *)a; + const congruence_class *c2 = *(const congruence_class * const *)b; + + int uid1 = DECL_UID (c1->members[0]->decl); + int uid2 = DECL_UID (c2->members[0]->decl); + + if (uid1 < uid2) + return -1; + else if (uid1 > uid2) + return 1; + else + return 0; +} + +/* Sort pair of congruence_class_groups A and B by + DECL_UID of the first member of a first group. */ + +static int +sort_congruence_class_groups_by_decl_uid (const void *a, const void *b) +{ + const congruence_class_group *g1 + = *(const congruence_class_group * const *)a; + const congruence_class_group *g2 + = *(const congruence_class_group * const *)b; + + int uid1 = DECL_UID (g1->classes[0]->members[0]->decl); + int uid2 = DECL_UID (g2->classes[0]->members[0]->decl); + + if (uid1 < uid2) + return -1; + else if (uid1 > uid2) + return 1; + else + return 0; +} + /* After reduction is done, we can declare all items in a group to be equal. PREV_CLASS_COUNT is start number of classes before reduction. True is returned if there's a merge operation @@ -3397,6 +3457,22 @@ sem_item_optimizer::merge_classes (unsigned int prev_class_count) bool merged_p = false; + /* PR lto/78211 + Sort functions in congruence classes by DECL_UID and do the same + for the classes to not to break -fcompare-debug. */ + + for (hash_table::iterator it = m_classes.begin (); + it != m_classes.end (); ++it) + { + for (unsigned int i = 0; i < (*it)->classes.length (); i++) + { + congruence_class *c = (*it)->classes[i]; + c->members.qsort (sort_sem_items_by_decl_uid); + } + + (*it)->classes.qsort (sort_congruence_classes_by_decl_uid); + } + for (hash_table::iterator it = m_classes.begin (); it != m_classes.end (); ++it) for (unsigned int i = 0; i < (*it)->classes.length (); i++) @@ -3409,6 +3485,13 @@ sem_item_optimizer::merge_classes (unsigned int prev_class_count) } } + auto_vec classes; + for (hash_table::iterator it = m_classes.begin (); + it != m_classes.end (); ++it) + classes.safe_push (*it); + + classes.qsort (sort_congruence_class_groups_by_decl_uid); + if (dump_file) { fprintf (dump_file, "\nItem count: %u\n", item_count); @@ -3426,11 +3509,12 @@ sem_item_optimizer::merge_classes (unsigned int prev_class_count) item_count ? 100.0f * equal_items / item_count : 0.0f); } - for (hash_table::iterator it = m_classes.begin (); - it != m_classes.end (); ++it) - for (unsigned int i = 0; i < (*it)->classes.length (); i++) + unsigned int l; + congruence_class_group *it; + FOR_EACH_VEC_ELT (classes, l, it) + for (unsigned int i = 0; i < it->classes.length (); i++) { - congruence_class *c = (*it)->classes[i]; + congruence_class *c = it->classes[i]; if (c->members.length () == 1) continue; diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-1.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-1.c index af86b9b8d50..a3d88585a9e 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-1.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-1.c @@ -56,5 +56,5 @@ int main(int argc, char **argv) return 0; } -/* { dg-final { scan-ipa-dump "Semantic equality hit:x2->x1" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:x1->x2" "icf" } } */ /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-10.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-10.c index 6a2dd008849..5f76c1d87e7 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-10.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-10.c @@ -29,5 +29,5 @@ int main(int argc, char **argv) return 0; } -/* { dg-final { scan-ipa-dump "Semantic equality hit:funkce->ferda" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:ferda->funkce" "icf" } } */ /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-11.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-11.c index 33b62ca6eb7..2610af9e55c 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-11.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-11.c @@ -24,5 +24,5 @@ int main(int argc, char **argv) return f0(argc) * f1(argc); } -/* { dg-final { scan-ipa-dump "Semantic equality hit:f1->f0" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:f0->f1" "icf" } } */ /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-12.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-12.c index 8c03a47431b..8e4aa56b032 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-12.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-12.c @@ -73,5 +73,5 @@ int main(int argc, char **argv) return 0; } -/* { dg-final { scan-ipa-dump "Semantic equality hit:nsd->gcd" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:gcd->nsd" "icf" } } */ /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-13.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-13.c index dd3f262146f..09d817c4030 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-13.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-13.c @@ -187,7 +187,7 @@ int main(int argc, char **argv) printf("Test2: %d, %d, gdc: %d\n", a, b, nsd(a, b)); } -/* { dg-final { scan-ipa-dump "Semantic equality hit:s2->s1" "icf" } } */ -/* { dg-final { scan-ipa-dump "Semantic equality hit:nsd_different_result2->nsd_different_result" "icf" } } */ -/* { dg-final { scan-ipa-dump "Semantic equality hit:nsd->gcd" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:s1->s2" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:nsd_different_result->nsd_different_result2" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:gcd->nsd" "icf" } } */ /* { dg-final { scan-ipa-dump "Equal symbols: 3" "icf" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-16.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-16.c index 6f038f13cf9..a2613af5dd5 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-16.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-16.c @@ -22,5 +22,5 @@ int main() return foo() + bar(); } -/* { dg-final { scan-ipa-dump "Semantic equality hit:bar->foo" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:foo->bar" "icf" } } */ /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-18.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-18.c index a8e28c1ff3a..e246c2b3404 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-18.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-18.c @@ -32,5 +32,5 @@ int main() return 0; } -/* { dg-final { scan-ipa-dump "Semantic equality hit:bar->foo" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:foo->bar" "icf" } } */ /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-2.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-2.c index 4d3cbafff4a..983e3d818d0 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-2.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-2.c @@ -64,5 +64,5 @@ int main(int argc, char **argv) return 0; } -/* { dg-final { scan-ipa-dump "Semantic equality hit:f2->f1" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:f1->f2" "icf" } } */ /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-20.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-20.c index 470e466ba23..46dc70492f0 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-20.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-20.c @@ -23,5 +23,5 @@ int main() return 0; } -/* { dg-final { scan-ipa-dump "Semantic equality hit:bar->foo" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:foo->bar" "icf" } } */ /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-21.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-21.c index 447fd7bad51..a20b4a43ffe 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-21.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-21.c @@ -22,5 +22,5 @@ int main() return 2; } -/* { dg-final { scan-ipa-dump "Semantic equality hit:bar->foo" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:foo->bar" "icf" } } */ /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-23.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-23.c index 7787f06938e..02bb138c28d 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-23.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-23.c @@ -24,5 +24,5 @@ int main() return foo(0) + bar(0); } -/* { dg-final { scan-ipa-dump "Semantic equality hit:bar->foo" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:foo->bar" "icf" } } */ /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-25.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-25.c index 7e42052fe20..4b364eb7c72 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-25.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-25.c @@ -46,6 +46,6 @@ int main() return foo() + bar(); } -/* { dg-final { scan-ipa-dump "Semantic equality hit:bar->foo" "icf" } } */ -/* { dg-final { scan-ipa-dump "Semantic equality hit:zap->zip" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:foo->bar" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:zip->zap" "icf" } } */ /* { dg-final { scan-ipa-dump "Equal symbols: 2" "icf" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-26.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-26.c index f3bb675d82a..325ece1befa 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-26.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-26.c @@ -38,5 +38,5 @@ int main() return 0; } -/* { dg-final { scan-ipa-dump "Semantic equality hit:remove->destroy" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:destroy->remove" "icf" } } */ /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-27.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-27.c index 7265ee4035e..bc49e58cb95 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-27.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-27.c @@ -25,5 +25,5 @@ int main() return 0; } -/* { dg-final { scan-ipa-dump "Semantic equality hit:remove->destroy" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:destroy->remove" "icf" } } */ /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-3.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-3.c index 6418acea19c..2ecab2335c2 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-3.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-3.c @@ -31,5 +31,5 @@ int main() return 0; } -/* { dg-final { scan-ipa-dump "Semantic equality hit:bar->foo" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:foo->bar" "icf" } } */ /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-35.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-35.c index ace6ae2b353..d194f918fd0 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-35.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-35.c @@ -25,6 +25,6 @@ int main() } /* { dg-final { scan-ipa-dump "Equal symbols: 3" "icf" } } */ -/* { dg-final { scan-ipa-dump "Semantic equality hit:f2->f1" "icf" } } */ -/* { dg-final { scan-ipa-dump "Semantic equality hit:d->c" "icf" } } */ -/* { dg-final { scan-ipa-dump "Semantic equality hit:b->a" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:f1->f2" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:c->d" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:a->b" "icf" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-36.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-36.c index d8cd5c8567e..5d125d0e1b7 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-36.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-36.c @@ -29,8 +29,8 @@ int t(int tt) } } /* { dg-final { scan-ipa-dump "Equal symbols: 6" "icf" } } */ -/* { dg-final { scan-ipa-dump "Semantic equality hit:b->a" "icf" } } */ -/* { dg-final { scan-ipa-dump "Semantic equality hit:d->c" "icf" } } */ -/* { dg-final { scan-ipa-dump "Semantic equality hit:f->e" "icf" } } */ -/* { dg-final { scan-ipa-dump "Semantic equality hit:h->g" "icf" } } */ -/* { dg-final { scan-ipa-dump "Semantic equality hit:k->i" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:a->b" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:c->d" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:e->f" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:g->h" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:i->k" "icf" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-37.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-37.c index 7314697e887..5c02e8ec336 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-37.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-37.c @@ -29,8 +29,8 @@ int t(int tt) } } /* { dg-final { scan-ipa-dump "Equal symbols: 5" "icf" } } */ -/* { dg-final { scan-ipa-dump "Semantic equality hit:b->a" "icf" } } */ -/* { dg-final { scan-ipa-dump "Semantic equality hit:d->c" "icf" } } */ -/* { dg-final { scan-ipa-dump "Semantic equality hit:f->e" "icf" } } */ -/* { dg-final { scan-ipa-dump "Semantic equality hit:h->g" "icf" } } */ -/* { dg-final { scan-ipa-dump "Semantic equality hit:j->i" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:a->b" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:c->d" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:e->f" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:g->h" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:i->j" "icf" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-5.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-5.c index bef80f27f65..b2d48f9d79d 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-5.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-5.c @@ -51,5 +51,5 @@ int main() return 1; } -/* { dg-final { scan-ipa-dump "Semantic equality hit:f2->f1" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:f1->f2" "icf" } } */ /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-7.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-7.c index 862dd70d50c..488e133d93f 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-7.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-7.c @@ -68,5 +68,5 @@ int main() return 1; } -/* { dg-final { scan-ipa-dump "Semantic equality hit:foo2->foo" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:foo->foo2" "icf" } } */ /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-icf-8.c b/gcc/testsuite/gcc.dg/ipa/ipa-icf-8.c index 32eed406d53..8ee46d034e7 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-icf-8.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-icf-8.c @@ -40,5 +40,5 @@ int main(int argc, char **argv) printf("fce2: %d\n", fce2(argc, 2 * argc)); } -/* { dg-final { scan-ipa-dump "Semantic equality hit:fce2->fce1" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:fce1->fce2" "icf" } } */ /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/pr64307.c b/gcc/testsuite/gcc.dg/ipa/pr64307.c index 87537c6113f..79d93af6eb7 100644 --- a/gcc/testsuite/gcc.dg/ipa/pr64307.c +++ b/gcc/testsuite/gcc.dg/ipa/pr64307.c @@ -27,5 +27,5 @@ int main() return r1 - r2; } -/* { dg-final { scan-ipa-dump "Semantic equality hit:real_part_2->real_part" "icf" } } */ +/* { dg-final { scan-ipa-dump "Semantic equality hit:real_part->real_part_2" "icf" } } */ /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf" } } */ diff --git a/gcc/testsuite/gcc.dg/ipa/pr77653.c b/gcc/testsuite/gcc.dg/ipa/pr77653.c index 16ae510bbb0..f508815a3fb 100644 --- a/gcc/testsuite/gcc.dg/ipa/pr77653.c +++ b/gcc/testsuite/gcc.dg/ipa/pr77653.c @@ -21,4 +21,4 @@ int main () } /* { dg-final { scan-ipa-dump "Equal symbols: 1" "icf" } } */ -/* { dg-final { scan-ipa-dump "Not unifying; address of original may be compared." "icf" } } */ +/* { dg-final { scan-ipa-dump "Not unifying; alias cannot be created; target is discardable" "icf" } } */ -- 2.11.0