From patchwork Fri Jul 18 10:34:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roman Gareev X-Patchwork-Id: 371442 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 744871400B9 for ; Fri, 18 Jul 2014 20:34:47 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; q=dns; s=default; b=liZCMQecrUR0I8+evM j/llnT3vHlXQOABXH8IwuQel845JbL4axX/h6OLHDoOEp6ORCnGxFbBNdHJLk7jd qk3d4JEyNKga8P6I/889w60ChgIAsdMEdFz34uN/ItCD/S/J4dtWwoGx7Zn+rvbk OAkV0ouBUbAAgLD3PZMicqlfo= 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 :mime-version:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; s=default; bh=2aC5ssK1pJIKTUFDvVxewWM5 7u8=; b=AmOe1yCZaAm2qZa5ueOcdSx+EVLaccG7Cn664wP4/64N8SAn2aKiaVTV d3qFhvnoQLT8N3JZp8FqeoI6J24eXaYTBZefoH8g/lAuanrkmcUTJJeRZly+S34B X5EZjGTclvXTYmu4vM565ozgoe45dkuBb4AgpIat20rz7zV6eCs= Received: (qmail 23595 invoked by alias); 18 Jul 2014 10:34:40 -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 23575 invoked by uid 89); 18 Jul 2014 10:34:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-yh0-f50.google.com Received: from mail-yh0-f50.google.com (HELO mail-yh0-f50.google.com) (209.85.213.50) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 18 Jul 2014 10:34:38 +0000 Received: by mail-yh0-f50.google.com with SMTP id v1so2133190yhn.9 for ; Fri, 18 Jul 2014 03:34:36 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.236.3.10 with SMTP id 10mr6173727yhg.126.1405679676673; Fri, 18 Jul 2014 03:34:36 -0700 (PDT) Received: by 10.170.91.134 with HTTP; Fri, 18 Jul 2014 03:34:36 -0700 (PDT) In-Reply-To: <53C7DB6F.1050707@grosser.es> References: <20140712101339.BF8C3105@mailhost.lps.ens.fr> <53C29C5A.1070808@grosser.es> <53C54C7E.5050102@grosser.es> <53C7DB6F.1050707@grosser.es> Date: Fri, 18 Jul 2014 16:34:36 +0600 Message-ID: Subject: Re: [GSoC] generation of Gimple loops with empty bodies From: Roman Gareev To: Richard Biener , Tobias Grosser Cc: Mircea Namolaru , gcc-patches@gcc.gnu.org > I suggest you use the largest available integer mode via > mode = mode_for_size (MAX_FIXED_MODE_SIZE, MODE_INT, 0); > type = build_nonstandard_integer_type (GET_MODE_PRECISION (mode), [01]); Thank you for the suggestion! > Roman, can you give this a shot? Maybe, we could use the following code: static int max_mode_int_precision = GET_MODE_PRECISION (mode_for_size (MAX_FIXED_MODE_SIZE, MODE_INT, 0)); static int graphite_expression_type_precision = 128 <= max_mode_int_precision ? 128 : max_mode_int_precision; This allows us to change the size during debugging and avoid using unacceptable mode size. Tobias, what do you think about this? --- Cheers, Roman Gareev 2014-07-08 Roman Gareev gcc/ * graphite-isl-ast-to-gimple.c: Add using of build_nonstandard_integer_type instead of int128_integer_type_node. Index: gcc/graphite-isl-ast-to-gimple.c =================================================================== --- gcc/graphite-isl-ast-to-gimple.c (revision 212804) +++ gcc/graphite-isl-ast-to-gimple.c (working copy) @@ -62,10 +62,13 @@ static bool graphite_regenerate_error; -/* We always use signed 128, until isl is able to give information about -types */ +/* We always use signed 128, until it is not accpeted or isl is able to give + information about types. */ -static tree *graphite_expression_size_type = &int128_integer_type_node; +static int max_mode_int_precision = + GET_MODE_PRECISION (mode_for_size (MAX_FIXED_MODE_SIZE, MODE_INT, 0)); +static int graphite_expression_type_precision = 128 <= max_mode_int_precision ? + 128 : max_mode_int_precision; /* Converts a GMP constant VAL to a tree and returns it. */ @@ -494,7 +497,8 @@ tree cond_expr; edge exit_edge; - *type = *graphite_expression_size_type; + *type = + build_nonstandard_integer_type (graphite_expression_type_precision, 0); isl_ast_expr *for_init = isl_ast_node_for_get_init (node_for); *lb = gcc_expression_from_isl_expression (*type, for_init, ip); isl_ast_expr *upper_bound = get_upper_bound (node_for);