alok marked 2 inline comments as done.
alok added inline comments.

================
Comment at: clang/lib/Frontend/CompilerInvocation.cpp:1648
 
-  if (Opts.OptimizationLevel > 0 && Opts.hasReducedDebugInfo() &&
+  if (Opts.hasReducedDebugInfo() &&
       llvm::is_contained(DebugEntryValueArchs, T.getArch()))
----------------
dblaikie wrote:
> probinson wrote:
> > I think we don't want this enabled by default at -O0.  It doesn't run any 
> > optimizations that should eliminate parameters, so this is going to 
> > increase debug info size for no real benefit to the debugging experience.
> +1 to @probinson here. That's generally been the thinking behind why this was 
> only enabled when optimizations are enabled. (there's some minor tradeoff 
> here: call site descriptions in unoptimized code can still be useful if they 
> call into optimized code, so this is a bit heuristical - assuming that all 
> code will be compiled with the same optimization level)
> 
> If flang is in a different situation and enables some optimizations at -O0 
> that make call site parameter descriptions beneficial even there, then maybe 
> we'll need some different way to differentiate optimizations V no 
> optimizations for the purpose of this feature.
Thanks Paul for the comment. I shall probably add an option to enable in such 
cases which should remain off by default, Flang driver can pass that to 
compiler to turn it on.


================
Comment at: clang/lib/Frontend/CompilerInvocation.cpp:1648
 
-  if (Opts.OptimizationLevel > 0 && Opts.hasReducedDebugInfo() &&
+  if (Opts.hasReducedDebugInfo() &&
       llvm::is_contained(DebugEntryValueArchs, T.getArch()))
----------------
alok wrote:
> dblaikie wrote:
> > probinson wrote:
> > > I think we don't want this enabled by default at -O0.  It doesn't run any 
> > > optimizations that should eliminate parameters, so this is going to 
> > > increase debug info size for no real benefit to the debugging experience.
> > +1 to @probinson here. That's generally been the thinking behind why this 
> > was only enabled when optimizations are enabled. (there's some minor 
> > tradeoff here: call site descriptions in unoptimized code can still be 
> > useful if they call into optimized code, so this is a bit heuristical - 
> > assuming that all code will be compiled with the same optimization level)
> > 
> > If flang is in a different situation and enables some optimizations at -O0 
> > that make call site parameter descriptions beneficial even there, then 
> > maybe we'll need some different way to differentiate optimizations V no 
> > optimizations for the purpose of this feature.
> Thanks Paul for the comment. I shall probably add an option to enable in such 
> cases which should remain off by default, Flang driver can pass that to 
> compiler to turn it on.
Thanks David for your explanation and thoughts. Please also look at trigger to 
this https://reviews.llvm.org/D99160

It is needed in a Fortran case. I shall probably drop to enable it by default 
and add an option which by default is disabled and Fortran driver can pass that 
to make use of it.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99238/new/

https://reviews.llvm.org/D99238

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to