From patchwork Fri Aug 12 15:16:04 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Pop X-Patchwork-Id: 109853 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 E21BAB6F00 for ; Sat, 13 Aug 2011 01:17:18 +1000 (EST) Received: (qmail 21064 invoked by alias); 12 Aug 2011 15:17:15 -0000 Received: (qmail 21054 invoked by uid 22791); 12 Aug 2011 15:17:14 -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, TW_CF, T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-yi0-f47.google.com (HELO mail-yi0-f47.google.com) (209.85.218.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 12 Aug 2011 15:16:47 +0000 Received: by yia28 with SMTP id 28so2120321yia.20 for ; Fri, 12 Aug 2011 08:16:46 -0700 (PDT) Received: by 10.90.14.25 with SMTP id 25mr1097831agn.16.1313162206417; Fri, 12 Aug 2011 08:16: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 l14sm2507030anl.8.2011.08.12.08.16.44 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 12 Aug 2011 08:16:46 -0700 (PDT) Received: by napoca (sSMTP sendmail emulation); Fri, 12 Aug 2011 10:16:10 -0500 From: Sebastian Pop To: skimo@kotnet.org, tobias@grosser.es Cc: gcc-patches@gcc.gnu.org, Sebastian Pop Subject: [PATCH 1/2] use cloog_isl_state_malloc Date: Fri, 12 Aug 2011 10:16:04 -0500 Message-Id: <1313162165-12071-1-git-send-email-sebpop@gmail.com> In-Reply-To: <20110812072225.GP14955MdfPADPa@purples> References: <20110812072225.GP14955MdfPADPa@purples> 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 --- gcc/graphite.c | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/gcc/graphite.c b/gcc/graphite.c index b2cf7c6..7d124c7 100644 --- a/gcc/graphite.c +++ b/gcc/graphite.c @@ -41,6 +41,7 @@ along with GCC; see the file COPYING3. If not see #include #include #include +#include #endif #include "system.h" @@ -196,7 +197,7 @@ print_graphite_statistics (FILE* file, VEC (scop_p, heap) *scops) /* Initialize graphite: when there are no loops returns false. */ static bool -graphite_initialize (void) +graphite_initialize (isl_ctx *ctx) { int ppl_initialized; @@ -208,6 +209,7 @@ graphite_initialize (void) if (dump_file && (dump_flags & TDF_DETAILS)) print_global_statistics (dump_file); + isl_ctx_free (ctx); return false; } @@ -218,7 +220,7 @@ graphite_initialize (void) ppl_initialized = ppl_initialize (); gcc_assert (ppl_initialized == 0); - cloog_state = cloog_state_malloc (); + cloog_state = cloog_isl_state_malloc (ctx); if (dump_file && dump_flags) dump_function_to_file (current_function_decl, dump_file, dump_flags); @@ -260,12 +262,11 @@ graphite_transform_loops (void) bool need_cfg_cleanup_p = false; VEC (scop_p, heap) *scops = NULL; htab_t bb_pbb_mapping; - isl_ctx *ctx; + isl_ctx *ctx = isl_ctx_alloc (); - if (!graphite_initialize ()) + if (!graphite_initialize (ctx)) return; - ctx = isl_ctx_alloc (); build_scops (&scops); if (dump_file && (dump_flags & TDF_DETAILS))