Re: [ptx] debug info

2016-03-21 Thread Thomas Schwinge
Hi!

On Thu, 10 Mar 2016 16:14:34 +0300 (MSK), Alexander Monakov 
 wrote:
> On Thu, 10 Mar 2016, Nathan Sidwell wrote:
> > Hm, something must have changed since  I found that sorry neccessary.
> 
> As I already said in my opening sentence (not quoted in your response), you
> removed the unnecessary override.  This is exactly what lets toplevel code see
> requested debug format now, and react accordingly.

Correct.

For a while already, I had been carrying such patches in one of my
development trees; in r234370 now committed the remaining cleanup, as
obvious:

commit 5f3838e1bfb0803366287aeccb75331d83d3edb7
Author: tschwinge 
Date:   Mon Mar 21 15:31:50 2016 +

[nvptx] Don't emit sorry for the stabs debug format

* config/nvptx/nvptx.c (nvptx_option_override): Don't emit sorry
for the stabs debug format.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234370 
138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/ChangeLog|6 ++
 gcc/config/nvptx/nvptx.c |4 
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git gcc/ChangeLog gcc/ChangeLog
index fc480c7..b45acc5 100644
--- gcc/ChangeLog
+++ gcc/ChangeLog
@@ -1,3 +1,9 @@
+2016-03-21  Thomas Schwinge  
+   Alexander Monakov  
+
+   * config/nvptx/nvptx.c (nvptx_option_override): Don't emit sorry
+   for the stabs debug format.
+
 2016-03-21  Richard Biener  
 
PR tree-optimization/70310
diff --git gcc/config/nvptx/nvptx.c gcc/config/nvptx/nvptx.c
index 1672426..b088cf8 100644
--- gcc/config/nvptx/nvptx.c
+++ gcc/config/nvptx/nvptx.c
@@ -160,10 +160,6 @@ nvptx_option_override (void)
   /* Assumes that it will see only hard registers.  */
   flag_var_tracking = 0;
 
-  if (write_symbols == DBX_DEBUG)
-/* The stabs testcases want to know stabs isn't supported.  */
-sorry ("stabs debug format not supported");
-
   if (nvptx_optimize < 0)
 nvptx_optimize = optimize > 0;
 


Grüße
 Thomas


signature.asc
Description: PGP signature


Re: [ptx] debug info

2016-03-10 Thread Alexander Monakov
On Thu, 10 Mar 2016, Nathan Sidwell wrote:
> Hm, something must have changed since  I found that sorry neccessary.

As I already said in my opening sentence (not quoted in your response), you
removed the unnecessary override.  This is exactly what lets toplevel code see
requested debug format now, and react accordingly.

Alexander


Re: [ptx] debug info

2016-03-10 Thread Nathan Sidwell

On 03/10/16 07:52, Alexander Monakov wrote:

On Wed, 9 Mar 2016, Nathan Sidwell wrote:

Furthermore, this is not useful without support in libgomp/plugin-nvptx.c
and nvptx-none-run.c (PTX JIT does not propagate lineinfo by default).
Would you like me to submit patches for those?


please.


Here's the pull request for nvptx-run.c changes:
https://github.com/MentorEmbedded/nvptx-tools/pull/11


merged, thanks



Re: [ptx] debug info

2016-03-10 Thread Nathan Sidwell

On 03/09/16 11:41, Alexander Monakov wrote:


:|x86_64-pc-linux-gnu-accel-nvptx-none-gcc -xc - -S -o- -gstabs
:1:0: sorry, unimplemented: stabs debug format not supported

cc1: error: target system does not support the ‘stabs’ debug format

:|x86_64-pc-linux-gnu-accel-nvptx-none-gcc -xc - -S -o- -gcoff
cc1: error: target system does not support the ‘coff’ debug format

So nvptx can the generic mechanism that produces such errors for all targets
and all debug formats, rather than ad-hoc target-specific handling.


Hm, something must have changed since  I found that sorry neccessary.

nathan


Re: [ptx] debug info

2016-03-10 Thread Alexander Monakov
On Wed, 9 Mar 2016, Nathan Sidwell wrote:
> > Furthermore, this is not useful without support in libgomp/plugin-nvptx.c
> > and nvptx-none-run.c (PTX JIT does not propagate lineinfo by default).
> > Would you like me to submit patches for those?
> 
> please.

Here's the pull request for nvptx-run.c changes:
https://github.com/MentorEmbedded/nvptx-tools/pull/11

Alexander


Re: [ptx] debug info

2016-03-09 Thread Alexander Monakov
On Wed, 9 Mar 2016, Nathan Sidwell wrote:
> On 03/09/16 09:55, Alexander Monakov wrote:
> > The preceding code special-casing response to -gstabs can also be removed
> > after this patch.  Should I submit the (trivial) removal patch?
> 
> No.   I found that necessary to stop the testsuite testing stabs -- it expects
> an error, but we don't get one without that check.

Since you removed the unnecessary override, the specific check is no longer
necessary: toplevel code is capable of issuing the error for unsupported debug
info format like this:

:|x86_64-pc-linux-gnu-accel-nvptx-none-gcc -xc - -S -o- -gstabs
:1:0: sorry, unimplemented: stabs debug format not supported

cc1: error: target system does not support the ‘stabs’ debug format

:|x86_64-pc-linux-gnu-accel-nvptx-none-gcc -xc - -S -o- -gcoff
cc1: error: target system does not support the ‘coff’ debug format

So nvptx can the generic mechanism that produces such errors for all targets
and all debug formats, rather than ad-hoc target-specific handling.

Alexander

Re: [ptx] debug info

2016-03-09 Thread Nathan Sidwell

On 03/09/16 09:55, Alexander Monakov wrote:

Hello Nathan,

On Wed, 9 Mar 2016, Nathan Sidwell wrote:

I've committed this to trunk, to remove the squashing of debug information.
It appears to function correctly.

I'd had this patch for a while, but forgot to commit it.


The preceding code special-casing response to -gstabs can also be removed
after this patch.  Should I submit the (trivial) removal patch?


No.   I found that necessary to stop the testsuite testing stabs -- it expects 
an error, but we don't get one without that check.



Furthermore, this is not useful without support in libgomp/plugin-nvptx.c
and nvptx-none-run.c (PTX JIT does not propagate lineinfo by default).  Would
you like me to submit patches for those?


please.

nathan



Re: [ptx] debug info

2016-03-09 Thread Alexander Monakov
Hello Nathan,

On Wed, 9 Mar 2016, Nathan Sidwell wrote:
> I've committed this to trunk, to remove the squashing of debug information.
> It appears to function correctly.
> 
> I'd had this patch for a while, but forgot to commit it.

The preceding code special-casing response to -gstabs can also be removed
after this patch.  Should I submit the (trivial) removal patch?

Furthermore, this is not useful without support in libgomp/plugin-nvptx.c
and nvptx-none-run.c (PTX JIT does not propagate lineinfo by default).  Would
you like me to submit patches for those?

Thanks.
Alexander