From patchwork Mon Aug 15 07:12:49 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Pop X-Patchwork-Id: 109999 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 3C60FB6F6F for ; Mon, 15 Aug 2011 17:15:19 +1000 (EST) Received: (qmail 13682 invoked by alias); 15 Aug 2011 07:14:24 -0000 Received: (qmail 13447 invoked by uid 22791); 15 Aug 2011 07:14:19 -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; Mon, 15 Aug 2011 07:13:53 +0000 Received: by yia28 with SMTP id 28so3145449yia.20 for ; Mon, 15 Aug 2011 00:13:52 -0700 (PDT) Received: by 10.236.189.4 with SMTP id b4mr6443103yhn.81.1313392432881; Mon, 15 Aug 2011 00:13:52 -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 w1sm4529111yhi.51.2011.08.15.00.13.51 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 15 Aug 2011 00:13:52 -0700 (PDT) Received: by napoca (sSMTP sendmail emulation); Mon, 15 Aug 2011 02:13:50 -0500 From: Sebastian Pop To: skimo@kotnet.org, tobias@grosser.es Cc: gcc-patches@gcc.gnu.org, Sebastian Pop Subject: [PATCH 10/20] use cloog_isl_state_malloc Date: Mon, 15 Aug 2011 02:12:49 -0500 Message-Id: <1313392379-1525-10-git-send-email-sebpop@gmail.com> In-Reply-To: <1313392379-1525-1-git-send-email-sebpop@gmail.com> References: <1313392379-1525-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 --- 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))