public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Roman Gareev <gareevroman@gmail.com>
To: Richard Biener <richard.guenther@gmail.com>,
	Tobias Grosser <tobias@grosser.es>
Cc: Mircea Namolaru <mircea.namolaru@inria.fr>, gcc-patches@gcc.gnu.org
Subject: Re: [GSoC] generation of Gimple loops with empty bodies
Date: Fri, 18 Jul 2014 10:52:00 -0000	[thread overview]
Message-ID: <CABGF_geXexjQXdFNPOOmY5ebSHmxQ1f_Q=OKc0WHzmN8zskUdg@mail.gmail.com> (raw)
In-Reply-To: <53C7DB6F.1050707@grosser.es>

[-- Attachment #1: Type: text/plain, Size: 712 bytes --]

> 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

[-- Attachment #2: ChangeLog_entry.txt --]
[-- Type: text/plain, Size: 173 bytes --]

2014-07-08  Roman Gareev  <gareevroman@gmail.com>

	gcc/
	* graphite-isl-ast-to-gimple.c:
	Add using of build_nonstandard_integer_type instead of
	int128_integer_type_node.

[-- Attachment #3: patch.txt --]
[-- Type: text/plain, Size: 1228 bytes --]

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);

  parent reply	other threads:[~2014-07-18 10:34 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-12 10:13 Dominique Dhumieres
2014-07-13 10:34 ` Roman Gareev
2014-07-13 12:35   ` Dominique Dhumieres
2014-07-13 13:14   ` Dominique Dhumieres
2014-07-13 14:49   ` Tobias Grosser
2014-07-15 15:19     ` Roman Gareev
     [not found]       ` <53C54C7E.5050102@grosser.es>
     [not found]         ` <CAFiYyc1LoP1VDX57CmV_mdULBAObGzvmwtJ1zQxOA78HDbHSKA@mail.gmail.com>
     [not found]           ` <53C7DB6F.1050707@grosser.es>
2014-07-18 10:52             ` Roman Gareev [this message]
2014-07-18 11:28               ` Tobias Grosser
  -- strict thread matches above, loose matches on Subject: below --
2014-07-05  7:06 Roman Gareev
2014-07-07 11:11 ` Tobias Grosser
2014-07-08 12:47   ` Roman Gareev
2014-07-08 13:18     ` Tobias Grosser
2014-07-11  9:01       ` Roman Gareev
2014-07-11  9:18         ` Tobias Grosser
2014-07-11 11:11           ` Roman Gareev
2014-07-11 11:15             ` Tobias Grosser
2014-07-11 13:42               ` Roman Gareev
2014-07-11 13:44                 ` Tobias Grosser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CABGF_geXexjQXdFNPOOmY5ebSHmxQ1f_Q=OKc0WHzmN8zskUdg@mail.gmail.com' \
    --to=gareevroman@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=mircea.namolaru@inria.fr \
    --cc=richard.guenther@gmail.com \
    --cc=tobias@grosser.es \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).