From patchwork Fri Dec 8 11:23:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 846168 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-468766-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="J5LhW5W+"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3ytVN021q3z9s83 for ; Fri, 8 Dec 2017 22:23:28 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=wiHr/93K5+MyK1VmSLePb+UDFcBBBXfRnEjQS3pUbgvcybmQzpfiv FkgYPwqkDTLEbxFCaA48NSlnKaiwzZmST8jKDH6Rdg9Smv5Pe/jsExNdIYlp/MmI QQLG4XGQb4+SVK981C9Non2CGaolMHxGpnv7JaRoZC/eNGnTm7m0wc= 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:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=Jl3eRdBU1YrH5VPgQR9HwCG9vBE=; b=J5LhW5W+u4ImXKefcA5W lF5ipk/Laq8FwyH9HYkraqA1pAU+9rehxT13VmoJtTqSE6n9THquZp3QD/jbp2jV DiajUA8wgjktbieQYfJAtE90k1K8nD4I0hC/mKHNRA1UlS/b0V8e3lKGtLcqbGDX aHl9XZLEkjjMM1TBnRo0QWI= Received: (qmail 64562 invoked by alias); 8 Dec 2017 11:23:21 -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 64553 invoked by uid 89); 8 Dec 2017 11:23:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= 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; Fri, 08 Dec 2017 11:23:20 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id AF169ADDE for ; Fri, 8 Dec 2017 11:23:17 +0000 (UTC) Date: Fri, 8 Dec 2017 12:23:17 +0100 (CET) From: Richard Biener To: gcc-patches@gcc.gnu.org Subject: [PATCH] Add -fopt-info-loop support for interchange. Message-ID: User-Agent: Alpine 2.20 (LSU 67 2015-01-07) MIME-Version: 1.0 Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2017-12-08 Richard Biener * gimple-loop-interchange.cc (tree_loop_interchange::interchange): Provide -fopt-info-loop feedback when we interchange in a nest. Index: gcc/gimple-loop-interchange.cc =================================================================== --- gcc/gimple-loop-interchange.cc (revision 255499) +++ gcc/gimple-loop-interchange.cc (working copy) @@ -1550,6 +1550,7 @@ bool tree_loop_interchange::interchange (vec datarefs, vec ddrs) { + location_t loc = find_loop_location (m_loop_nest[0]); bool changed_p = false; /* In each iteration we try to interchange I-th loop with (I+1)-th loop. The overall effect is to push inner loop to outermost level in whole @@ -1597,8 +1598,12 @@ tree_loop_interchange::interchange (vec< oloop.m_loop->num, iloop.m_loop->num); } } - simple_dce_from_worklist (m_dce_seeds); + + if (changed_p) + dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, loc, + "loops interchanged in loop nest\n"); + return changed_p; }