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  <mjam...@suse.cz>
> 
>       * 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 <rguent...@suse.de>
SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 
21284 (AG Nuernberg)

Reply via email to