From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 102925 invoked by alias); 6 Nov 2015 08:42:30 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 102915 invoked by uid 89); 6 Nov 2015 08:42:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Fri, 06 Nov 2015 08:42:29 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id BBE71AAD1 for ; Fri, 6 Nov 2015 08:42:05 +0000 (UTC) Date: Fri, 06 Nov 2015 08:42:00 -0000 From: Richard Biener To: Martin Jambor cc: GCC Patches Subject: Re: [hsa 5/12] New HSA-related GCC options In-Reply-To: <20151105215831.GH9264@virgil.suse.cz> Message-ID: References: <20151105215108.GC9264@virgil.suse.cz> <20151105215831.GH9264@virgil.suse.cz> User-Agent: Alpine 2.11 (LSU 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2015-11/txt/msg00563.txt.bz2 On Thu, 5 Nov 2015, Martin Jambor wrote: > Hi, > > the following small part of the merge deals with new options. It adds > four independent things: > > 1) flag_disable_hsa is used by code in opts.c (in the first patch) to > remember whether HSA has been explicitely disabled on the compiler > command line. But I don't see any way to disable it on the command line? (no switch?) > 2) -Whsa is a new warning we emit whenever we fail to produce HSAIL > for some source code. It is on by default but of course only > emitted by HSAIL generating code so should never affect anybody who > does not use HSA-enabled compiler and OpenMP 4 device constructs. > > We have found the following two additions very useful for debugging on > the branch but will understand if they are not deemed suitable for > trunk and will gladly remove them: > > 3) -fdisable-hsa-gridification disables the gridification process to > ease experimenting with dynamic parallelism. With this option, > HSAIL is always generated from the CPU-intended gimple. So this sounds like sth a user should never do which means it shouln't be a switch (but a parameter or removed). > 4) Parameter hsa-gen-debug-stores will be obsolete once HSA run-time > supports debugging traps. Before that, we have to do with > debugging stores to memory at defined places, which however can > cost speed in benchmarks. So they are only enabled with this > parameter. We decided to make it a parameter rather than a switch > to emphasize the fact it will go away and to possibly allow us > select different levels of verbosity of the stores in the future). You miss documentation in invoke.texi for new switches and parameters. > Thanks, > > Martin > > > 2015-11-05 Martin Jambor > > * common.opt (disable_hsa): New variable. > (-Whsa): New warning. > (-fdisable-hsa-gridification): New option. > * params.def (PARAM_HSA_GEN_DEBUG_STORES): New parameter. > > diff --git a/gcc/common.opt b/gcc/common.opt > index 961a1b6..9cb52db 100644 > --- a/gcc/common.opt > +++ b/gcc/common.opt > @@ -223,6 +223,10 @@ unsigned int flag_sanitize_recover = SANITIZE_UNDEFINED | SANITIZE_NONDEFAULT | > Variable > bool dump_base_name_prefixed = false > > +; Flag whether HSA generation has been explicitely disabled > +Variable > +bool flag_disable_hsa = false > + > ### > Driver > > @@ -577,6 +581,10 @@ Wfree-nonheap-object > Common Var(warn_free_nonheap_object) Init(1) Warning > Warn when attempting to free a non-heap object. > > +Whsa > +Common Var(warn_hsa) Init(1) Warning > +Warn when a function cannot be expanded to HSAIL. > + > Winline > Common Var(warn_inline) Warning > Warn when an inlined function cannot be inlined. > @@ -1107,6 +1115,10 @@ fdiagnostics-show-location= > Common Joined RejectNegative Enum(diagnostic_prefixing_rule) > -fdiagnostics-show-location=[once|every-line] How often to emit source location at the beginning of line-wrapped diagnostics. > > +fdisable-hsa-gridification > +Common Report Var(flag_disable_hsa_gridification) > +Disable HSA gridification for OMP pragmas > + > ; Required for these enum values. > SourceInclude > pretty-print.h > diff --git a/gcc/params.def b/gcc/params.def > index c5d96e7..86911e2 100644 > --- a/gcc/params.def > +++ b/gcc/params.def > @@ -1177,6 +1177,11 @@ DEFPARAM (PARAM_MAX_SSA_NAME_QUERY_DEPTH, > "Maximum recursion depth allowed when querying a property of an" > " SSA name.", > 2, 1, 0) > + > +DEFPARAM (PARAM_HSA_GEN_DEBUG_STORES, > + "hsa-gen-debug-stores", > + "Level of hsa debug stores verbosity", > + 0, 0, 1) > /* > > Local variables: > > -- Richard Biener SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg)