From patchwork Sun Jul 24 07:25:33 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Pop X-Patchwork-Id: 106508 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 1D522B6F72 for ; Sun, 24 Jul 2011 18:30:35 +1000 (EST) Received: (qmail 15533 invoked by alias); 24 Jul 2011 08:30:30 -0000 Received: (qmail 15516 invoked by uid 22791); 24 Jul 2011 08:30:28 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-yw0-f47.google.com (HELO mail-yw0-f47.google.com) (209.85.213.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 24 Jul 2011 08:30:13 +0000 Received: by ywa12 with SMTP id 12so2151068ywa.20 for ; Sun, 24 Jul 2011 01:30:12 -0700 (PDT) Received: by 10.236.182.40 with SMTP id n28mr279340yhm.88.1311492346331; Sun, 24 Jul 2011 00:25:46 -0700 (PDT) Received: from napoca (adsl-99-184-92-236.dsl.austtx.sbcglobal.net [99.184.92.236]) by mx.google.com with ESMTPS id j9sm1543553yhn.53.2011.07.24.00.25.44 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 24 Jul 2011 00:25:45 -0700 (PDT) Received: by napoca (sSMTP sendmail emulation); Sun, 24 Jul 2011 02:25:43 -0500 From: Sebastian Pop To: gcc-patches@gcc.gnu.org Cc: rguenther@suse.de, tobias@grosser.es, Sebastian Pop Subject: [PATCH 3/3] Avoid use of lang_hooks.types.type_for_size. Date: Sun, 24 Jul 2011 02:25:33 -0500 Message-Id: <1311492333-30309-4-git-send-email-sebpop@gmail.com> In-Reply-To: <1311492333-30309-1-git-send-email-sebpop@gmail.com> References: <1311492333-30309-1-git-send-email-sebpop@gmail.com> X-IsSubscribed: yes 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 2011-07-23 Sebastian Pop * tree-data-ref.c (max_stmt_executions_tree): Do not call lang_hooks.types.type_for_size. --- gcc/ChangeLog | 5 +++++ gcc/tree-data-ref.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e32034f..0d3905f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2011-07-23 Sebastian Pop + * tree-data-ref.c (max_stmt_executions_tree): Do not call + lang_hooks.types.type_for_size. + +2011-07-23 Sebastian Pop + * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Build an unsigned iv only when the largest type is unsigned. Do not call lang_hooks.types.type_for_size. diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c index 3e18e8d..800bd27 100644 --- a/gcc/tree-data-ref.c +++ b/gcc/tree-data-ref.c @@ -1613,13 +1613,16 @@ analyze_ziv_subscript (tree chrec_a, static tree max_stmt_executions_tree (struct loop *loop) { + enum machine_mode mode; double_int nit; tree type; if (!max_stmt_executions (loop, true, &nit)) return chrec_dont_know; - type = lang_hooks.types.type_for_size (INT_TYPE_SIZE, true); + mode = smallest_mode_for_size (INT_TYPE_SIZE, MODE_INT); + type = build_nonstandard_integer_type (GET_MODE_PRECISION (mode), true); + if (!double_int_fits_to_tree_p (type, nit)) return chrec_dont_know;