Re: [BUILDROBOT] xtensa fallout (was: Turn DECL_SECTION_NAME into string)

2014-07-10 Thread augustine.sterl...@gmail.com
On Fri, Jul 4, 2014 at 2:11 PM, Jan-Benedict Glaw  wrote:
> On Wed, 2014-06-25 08:55:57 -0700, augustine.sterl...@gmail.com 
>  wrote:
>> On Tue, Jun 24, 2014 at 10:20 PM, Jan Hubicka  wrote:
>> > > This is the xtensa fallout, see 
>> > > http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=272418
>> > >
>> > > g++ -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -fno-exceptions 
>> > > -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing 
>> > > -Wwrite-strings -Wcast-qual -Wmissing-format-attribute 
>> > > -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros 
>> > > -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -I. -I. 
>> > > -I/home/jbglaw/repos/gcc/gcc -I/home/jbglaw/repos/gcc/gcc/. 
>> > > -I/home/jbglaw/repos/gcc/gcc/../include 
>> > > -I/home/jbglaw/repos/gcc/gcc/../libcpp/include  
>> > > -I/home/jbglaw/repos/gcc/gcc/../libdecnumber 
>> > > -I/home/jbglaw/repos/gcc/gcc/../libdecnumber/dpd -I../libdecnumber 
>> > > -I/home/jbglaw/repos/gcc/gcc/../libbacktrace-o insn-preds.o -MT 
>> > > insn-preds.o -MMD -MP -MF ./.deps/insn-preds.TPo insn-preds.c
>> > > /home/jbglaw/repos/gcc/gcc/config/xtensa/predicates.md: In function ‘int 
>> > > call_insn_operand_1(rtx, machine_mode)’:
>> > > /home/jbglaw/repos/gcc/gcc/config/xtensa/predicates.md:113:57: error: 
>> > > cannot convert ‘const char*’ to ‘tree’ in assignment
>> > > /home/jbglaw/repos/gcc/gcc/config/xtensa/predicates.md:119:46: error: 
>> > > cannot convert ‘const char*’ to ‘tree’ in assignment
>> > > make[1]: *** [insn-preds.o] Error 1
>> > Should be fixed by this (and I see in my prevoius mail I wanted 
>> > TREE_STRING_POINTER)
>>
>> [resend due to gmail's stupid html-by-default]
>>
>> This patch looks correct to me, but I haven't watched quite enough of
>> the underlying change to know that replacing the strcmp with pointer
>> equality is really the right thing.
>>
>> If it is, approved for Xtensa.
>
> *ping*
>
> As Jan wrote it, I *guess* it probably is (haven't checked.)

Approved.


Re: [BUILDROBOT] xtensa fallout (was: Turn DECL_SECTION_NAME into string)

2014-07-04 Thread Jan-Benedict Glaw
On Wed, 2014-06-25 08:55:57 -0700, augustine.sterl...@gmail.com 
 wrote:
> On Tue, Jun 24, 2014 at 10:20 PM, Jan Hubicka  wrote:
> > > This is the xtensa fallout, see 
> > > http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=272418
> > >
> > > g++ -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -fno-exceptions 
> > > -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing 
> > > -Wwrite-strings -Wcast-qual -Wmissing-format-attribute 
> > > -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros 
> > > -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -I. -I. 
> > > -I/home/jbglaw/repos/gcc/gcc -I/home/jbglaw/repos/gcc/gcc/. 
> > > -I/home/jbglaw/repos/gcc/gcc/../include 
> > > -I/home/jbglaw/repos/gcc/gcc/../libcpp/include  
> > > -I/home/jbglaw/repos/gcc/gcc/../libdecnumber 
> > > -I/home/jbglaw/repos/gcc/gcc/../libdecnumber/dpd -I../libdecnumber 
> > > -I/home/jbglaw/repos/gcc/gcc/../libbacktrace-o insn-preds.o -MT 
> > > insn-preds.o -MMD -MP -MF ./.deps/insn-preds.TPo insn-preds.c
> > > /home/jbglaw/repos/gcc/gcc/config/xtensa/predicates.md: In function ‘int 
> > > call_insn_operand_1(rtx, machine_mode)’:
> > > /home/jbglaw/repos/gcc/gcc/config/xtensa/predicates.md:113:57: error: 
> > > cannot convert ‘const char*’ to ‘tree’ in assignment
> > > /home/jbglaw/repos/gcc/gcc/config/xtensa/predicates.md:119:46: error: 
> > > cannot convert ‘const char*’ to ‘tree’ in assignment
> > > make[1]: *** [insn-preds.o] Error 1
> > Should be fixed by this (and I see in my prevoius mail I wanted 
> > TREE_STRING_POINTER)
> 
> [resend due to gmail's stupid html-by-default]
> 
> This patch looks correct to me, but I haven't watched quite enough of
> the underlying change to know that replacing the strcmp with pointer
> equality is really the right thing.
> 
> If it is, approved for Xtensa.

*ping*

As Jan wrote it, I *guess* it probably is (haven't checked.)

MfG, JBG

-- 
  Jan-Benedict Glaw  jbg...@lug-owl.de  +49-172-7608481
Signature of:   http://www.eyrie.org/~eagle/faqs/questions.html
the second  :


signature.asc
Description: Digital signature


Re: [BUILDROBOT] xtensa fallout (was: Turn DECL_SECTION_NAME into string)

2014-06-25 Thread augustine.sterl...@gmail.com
On Tue, Jun 24, 2014 at 10:20 PM, Jan Hubicka  wrote:
>> Hi!
>>
>> This is the xtensa fallout, see 
>> http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=272418
>>
>> g++ -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -fno-exceptions 
>> -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing 
>> -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual 
>> -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings 
>> -fno-common  -DHAVE_CONFIG_H -I. -I. -I/home/jbglaw/repos/gcc/gcc 
>> -I/home/jbglaw/repos/gcc/gcc/. -I/home/jbglaw/repos/gcc/gcc/../include 
>> -I/home/jbglaw/repos/gcc/gcc/../libcpp/include  
>> -I/home/jbglaw/repos/gcc/gcc/../libdecnumber 
>> -I/home/jbglaw/repos/gcc/gcc/../libdecnumber/dpd -I../libdecnumber 
>> -I/home/jbglaw/repos/gcc/gcc/../libbacktrace-o insn-preds.o -MT 
>> insn-preds.o -MMD -MP -MF ./.deps/insn-preds.TPo insn-preds.c
>> /home/jbglaw/repos/gcc/gcc/config/xtensa/predicates.md: In function ‘int 
>> call_insn_operand_1(rtx, machine_mode)’:
>> /home/jbglaw/repos/gcc/gcc/config/xtensa/predicates.md:113:57: error: cannot 
>> convert ‘const char*’ to ‘tree’ in assignment
>> /home/jbglaw/repos/gcc/gcc/config/xtensa/predicates.md:119:46: error: cannot 
>> convert ‘const char*’ to ‘tree’ in assignment
>> make[1]: *** [insn-preds.o] Error 1
> Should be fixed by this (and I see in my prevoius mail I wanted 
> TREE_STRING_POINTER)

[resend due to gmail's stupid html-by-default]

This patch looks correct to me, but I haven't watched quite enough of
the underlying change to know that replacing the strcmp with pointer
equality is really the right thing.

If it is, approved for Xtensa.

>
> Index: gcc/config/xtensa/predicates.md
> ===
> --- gcc/config/xtensa/predicates.md (revision 211693)
> +++ gcc/config/xtensa/predicates.md (working copy)
> @@ -97,7 +97,8 @@
>/* Direct calls only allowed to static functions with PIC.  */
>if (flag_pic)
> {
> - tree callee, callee_sec, caller_sec;
> + tree callee;
> + const char * callee_sec, caller_sec;
>
>   if (GET_CODE (op) != SYMBOL_REF
>   || !SYMBOL_REF_LOCAL_P (op) || SYMBOL_REF_EXTERNAL_P (op))
> @@ -117,10 +118,9 @@
>   if (DECL_ONE_ONLY (callee))
> return false;
>   callee_sec = DECL_SECTION_NAME (callee);
> - if (((caller_sec == NULL_TREE) ^ (callee_sec == NULL_TREE))
> - || (caller_sec != NULL_TREE
> - && strcmp (TREE_STRING_POINTER (caller_sec),
> -TREE_STRING_POINTER (callee_sec)) != 0))
> + if (((caller_sec == NULL) ^ (callee_sec == NULL))
> + || (caller_sec != NULL
> + && caller_sec != callee_sec))
> return false;
> }
>   else if (caller_sec != NULL_TREE)
>>
>> MfG, JBG
>>
>> --
>>   Jan-Benedict Glaw  jbg...@lug-owl.de  +49-172-7608481
>> Signature of:   Ich hatte in letzter Zeit ein bißchen viel 
>> Realitycheck.
>> the second  :   Langsam möchte ich mal wieder weiterträumen 
>> können.
>>  -- Maximilian Wilhelm (18. Mai 2005, 
>> #lug-owl.de)
>
>


Re: [BUILDROBOT] frv fallout (was: Turn DECL_SECTION_NAME into string)

2014-06-24 Thread Jan Hubicka
> Hi!
> 
> Fallout for frv, see eg. 
> http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=272377
> 
> g++ -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -fno-exceptions 
> -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wwrite-strings -Wcast-qual 
> -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long 
> -Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -I. 
> -I. -I/home/jbglaw/repos/gcc/gcc -I/home/jbglaw/repos/gcc/gcc/. 
> -I/home/jbglaw/repos/gcc/gcc/../include 
> -I/home/jbglaw/repos/gcc/gcc/../libcpp/include  
> -I/home/jbglaw/repos/gcc/gcc/../libdecnumber 
> -I/home/jbglaw/repos/gcc/gcc/../libdecnumber/dpd -I../libdecnumber 
> -I/home/jbglaw/repos/gcc/gcc/../libbacktrace-o frv.o -MT frv.o -MMD -MP 
> -MF ./.deps/frv.TPo /home/jbglaw/repos/gcc/gcc/config/frv/frv.c
> /home/jbglaw/repos/gcc/gcc/config/frv/frv.c: In function ‘rtx_def* 
> frv_expand_builtin(tree_node*, rtx_def*, rtx_def*, machine_mode, int)’:
> /home/jbglaw/repos/gcc/gcc/config/frv/frv.c:9420: warning: comparison between 
> signed and unsigned integer expressions
> /home/jbglaw/repos/gcc/gcc/config/frv/frv.c:9424: warning: comparison between 
> signed and unsigned integer expressions
> /home/jbglaw/repos/gcc/gcc/config/frv/frv.c:9428: warning: comparison between 
> signed and unsigned integer expressions
> /home/jbglaw/repos/gcc/gcc/config/frv/frv.c:9432: warning: comparison between 
> signed and unsigned integer expressions
> /home/jbglaw/repos/gcc/gcc/config/frv/frv.c:9436: warning: comparison between 
> signed and unsigned integer expressions
> /home/jbglaw/repos/gcc/gcc/config/frv/frv.c:9440: warning: comparison between 
> signed and unsigned integer expressions
> /home/jbglaw/repos/gcc/gcc/config/frv/frv.c:9444: warning: comparison between 
> signed and unsigned integer expressions
> /home/jbglaw/repos/gcc/gcc/config/frv/frv.c:9448: warning: comparison between 
> signed and unsigned integer expressions
> /home/jbglaw/repos/gcc/gcc/config/frv/frv.c:9453: warning: comparison between 
> signed and unsigned integer expressions
> /home/jbglaw/repos/gcc/gcc/config/frv/frv.c:9458: warning: comparison between 
> signed and unsigned integer expressions
> /home/jbglaw/repos/gcc/gcc/config/frv/frv.c:9462: warning: comparison between 
> signed and unsigned integer expressions
> /home/jbglaw/repos/gcc/gcc/config/frv/frv.c:9467: warning: comparison between 
> signed and unsigned integer expressions
> /home/jbglaw/repos/gcc/gcc/config/frv/frv.c: In function ‘bool 
> frv_in_small_data_p(const tree_node*)’:
> /home/jbglaw/repos/gcc/gcc/config/frv/frv.c:9491: error: request for member 
> ‘base’ in ‘* section_name’, which is of non-class type ‘const char’
> make[1]: *** [frv.o] Error 1

And this one is missed sanity check.
I will grep md files for apperances of DECL_SECTION_NAME, those I missed when 
updating the tree first time.

Index: gcc/config/frv/frv.c
===
--- gcc/config/frv/frv.c(revision 211693)
+++ gcc/config/frv/frv.c(working copy)
@@ -9488,7 +9488,6 @@
   section_name = DECL_SECTION_NAME (decl);
   if (section_name)
 {
-  gcc_assert (TREE_CODE (section_name) == STRING_CST);
   if (frv_string_begins_with (section_name, ".sdata"))
return true;
   if (frv_string_begins_with (section_name, ".sbss"))


Re: [BUILDROBOT] xtensa fallout (was: Turn DECL_SECTION_NAME into string)

2014-06-24 Thread Jan Hubicka
> Hi!
> 
> This is the xtensa fallout, see 
> http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=272418
> 
> g++ -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -fno-exceptions 
> -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing 
> -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual 
> -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings 
> -fno-common  -DHAVE_CONFIG_H -I. -I. -I/home/jbglaw/repos/gcc/gcc 
> -I/home/jbglaw/repos/gcc/gcc/. -I/home/jbglaw/repos/gcc/gcc/../include 
> -I/home/jbglaw/repos/gcc/gcc/../libcpp/include  
> -I/home/jbglaw/repos/gcc/gcc/../libdecnumber 
> -I/home/jbglaw/repos/gcc/gcc/../libdecnumber/dpd -I../libdecnumber 
> -I/home/jbglaw/repos/gcc/gcc/../libbacktrace-o insn-preds.o -MT 
> insn-preds.o -MMD -MP -MF ./.deps/insn-preds.TPo insn-preds.c
> /home/jbglaw/repos/gcc/gcc/config/xtensa/predicates.md: In function ‘int 
> call_insn_operand_1(rtx, machine_mode)’:
> /home/jbglaw/repos/gcc/gcc/config/xtensa/predicates.md:113:57: error: cannot 
> convert ‘const char*’ to ‘tree’ in assignment
> /home/jbglaw/repos/gcc/gcc/config/xtensa/predicates.md:119:46: error: cannot 
> convert ‘const char*’ to ‘tree’ in assignment
> make[1]: *** [insn-preds.o] Error 1
Should be fixed by this (and I see in my prevoius mail I wanted 
TREE_STRING_POINTER)

Index: gcc/config/xtensa/predicates.md
===
--- gcc/config/xtensa/predicates.md (revision 211693)
+++ gcc/config/xtensa/predicates.md (working copy)
@@ -97,7 +97,8 @@
   /* Direct calls only allowed to static functions with PIC.  */
   if (flag_pic)
{
- tree callee, callee_sec, caller_sec;
+ tree callee;
+ const char * callee_sec, caller_sec;
 
  if (GET_CODE (op) != SYMBOL_REF
  || !SYMBOL_REF_LOCAL_P (op) || SYMBOL_REF_EXTERNAL_P (op))
@@ -117,10 +118,9 @@
  if (DECL_ONE_ONLY (callee))
return false;
  callee_sec = DECL_SECTION_NAME (callee);
- if (((caller_sec == NULL_TREE) ^ (callee_sec == NULL_TREE))
- || (caller_sec != NULL_TREE
- && strcmp (TREE_STRING_POINTER (caller_sec),
-TREE_STRING_POINTER (callee_sec)) != 0))
+ if (((caller_sec == NULL) ^ (callee_sec == NULL))
+ || (caller_sec != NULL
+ && caller_sec != callee_sec))
return false;
}
  else if (caller_sec != NULL_TREE)
> 
> MfG, JBG
> 
> -- 
>   Jan-Benedict Glaw  jbg...@lug-owl.de  +49-172-7608481
> Signature of:   Ich hatte in letzter Zeit ein bißchen viel 
> Realitycheck.
> the second  :   Langsam möchte ich mal wieder weiterträumen 
> können.
>  -- Maximilian Wilhelm (18. Mai 2005, #lug-owl.de)




Re: [BUILDROBOT] v850 fallout (was: Turn DECL_SECTION_NAME into string)

2014-06-24 Thread Jan Hubicka
> Hi!
> 
> I've been away for holidays and other stuff, so this is a bit late,
> but nevermind... The stringification of DECL_SECTION_NAME had some
> fallout, see eg. 
> http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=272454
> 
> g++ -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -fno-exceptions 
> -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wwrite-strings -Wcast-qual 
> -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long 
> -Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -I. 
> -I. -I/home/jbglaw/repos/gcc/gcc -I/home/jbglaw/repos/gcc/gcc/. 
> -I/home/jbglaw/repos/gcc/gcc/../include 
> -I/home/jbglaw/repos/gcc/gcc/../libcpp/include  
> -I/home/jbglaw/repos/gcc/gcc/../libdecnumber 
> -I/home/jbglaw/repos/gcc/gcc/../libdecnumber/dpd -I../libdecnumber 
> -I/home/jbglaw/repos/gcc/gcc/../libbacktrace-o v850.o -MT v850.o -MMD -MP 
> -MF ./.deps/v850.TPo /home/jbglaw/repos/gcc/gcc/config/v850/v850.c
> /home/jbglaw/repos/gcc/gcc/config/v850/v850.c: In function ‘tree_node* 
> v850_handle_interrupt_attribute(tree_node**, tree_node*, tree_node*, int, 
> bool*)’:
> /home/jbglaw/repos/gcc/gcc/config/v850/v850.c:2088: warning: unknown 
> conversion type character ‘E’ in format
> /home/jbglaw/repos/gcc/gcc/config/v850/v850.c:2088: warning: too many 
> arguments for format
> /home/jbglaw/repos/gcc/gcc/config/v850/v850.c: In function ‘void 
> v850_insert_attributes(tree_node*, tree_node**)’:
> /home/jbglaw/repos/gcc/gcc/config/v850/v850.c:2647: error: cannot convert 
> ‘tree_node*’ to ‘const char*’ for argument ‘2’ to ‘void 
> set_decl_section_name(tree_node*, const char*)’
> make[1]: *** [v850.o] Error 1
The following patch should cure this:
Index: gcc/config/v850/v850.c
===
--- gcc/config/v850/v850.c  (revision 211693)
+++ gcc/config/v850/v850.c  (working copy)
@@ -2644,7 +2644,7 @@
  /* Only set the section name if specified by a pragma, because
 otherwise it will force those variables to get allocated storage
 in this module, rather than by the linker.  */
- set_decl_section_name (decl, chosen_section);
+ set_decl_section_name (decl, DECL_IDENTIFIER_POINTER 
(chosen_section));
}
 }
 }

but perhaps
tree GHS_default_section_names [(int) COUNT_OF_GHS_SECTION_KINDS];
tree GHS_current_section_names [(int) COUNT_OF_GHS_SECTION_KINDS];
Should be turned into strings.  I do not see who is initializing these?

Honza
> 
> MfG, JBG
> 
> -- 
>   Jan-Benedict Glaw  jbg...@lug-owl.de  +49-172-7608481
> Signature of:  Alles sollte so einfach wie möglich gemacht sein.
> the second  :  Aber nicht einfacher.  (Einstein)




[BUILDROBOT] frv fallout (was: Turn DECL_SECTION_NAME into string)

2014-06-24 Thread Jan-Benedict Glaw
Hi!

Fallout for frv, see eg. 
http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=272377

g++ -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -fno-exceptions 
-fno-rtti -fasynchronous-unwind-tables -W -Wall -Wwrite-strings -Wcast-qual 
-Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long 
-Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -I. 
-I. -I/home/jbglaw/repos/gcc/gcc -I/home/jbglaw/repos/gcc/gcc/. 
-I/home/jbglaw/repos/gcc/gcc/../include 
-I/home/jbglaw/repos/gcc/gcc/../libcpp/include  
-I/home/jbglaw/repos/gcc/gcc/../libdecnumber 
-I/home/jbglaw/repos/gcc/gcc/../libdecnumber/dpd -I../libdecnumber 
-I/home/jbglaw/repos/gcc/gcc/../libbacktrace-o frv.o -MT frv.o -MMD -MP -MF 
./.deps/frv.TPo /home/jbglaw/repos/gcc/gcc/config/frv/frv.c
/home/jbglaw/repos/gcc/gcc/config/frv/frv.c: In function ‘rtx_def* 
frv_expand_builtin(tree_node*, rtx_def*, rtx_def*, machine_mode, int)’:
/home/jbglaw/repos/gcc/gcc/config/frv/frv.c:9420: warning: comparison between 
signed and unsigned integer expressions
/home/jbglaw/repos/gcc/gcc/config/frv/frv.c:9424: warning: comparison between 
signed and unsigned integer expressions
/home/jbglaw/repos/gcc/gcc/config/frv/frv.c:9428: warning: comparison between 
signed and unsigned integer expressions
/home/jbglaw/repos/gcc/gcc/config/frv/frv.c:9432: warning: comparison between 
signed and unsigned integer expressions
/home/jbglaw/repos/gcc/gcc/config/frv/frv.c:9436: warning: comparison between 
signed and unsigned integer expressions
/home/jbglaw/repos/gcc/gcc/config/frv/frv.c:9440: warning: comparison between 
signed and unsigned integer expressions
/home/jbglaw/repos/gcc/gcc/config/frv/frv.c:9444: warning: comparison between 
signed and unsigned integer expressions
/home/jbglaw/repos/gcc/gcc/config/frv/frv.c:9448: warning: comparison between 
signed and unsigned integer expressions
/home/jbglaw/repos/gcc/gcc/config/frv/frv.c:9453: warning: comparison between 
signed and unsigned integer expressions
/home/jbglaw/repos/gcc/gcc/config/frv/frv.c:9458: warning: comparison between 
signed and unsigned integer expressions
/home/jbglaw/repos/gcc/gcc/config/frv/frv.c:9462: warning: comparison between 
signed and unsigned integer expressions
/home/jbglaw/repos/gcc/gcc/config/frv/frv.c:9467: warning: comparison between 
signed and unsigned integer expressions
/home/jbglaw/repos/gcc/gcc/config/frv/frv.c: In function ‘bool 
frv_in_small_data_p(const tree_node*)’:
/home/jbglaw/repos/gcc/gcc/config/frv/frv.c:9491: error: request for member 
‘base’ in ‘* section_name’, which is of non-class type ‘const char’
make[1]: *** [frv.o] Error 1

MfG, JBG

-- 
  Jan-Benedict Glaw  jbg...@lug-owl.de  +49-172-7608481
Signature of:http://www.chiark.greenend.org.uk/~sgtatham/bugs.html
the second  :


signature.asc
Description: Digital signature


[BUILDROBOT] xtensa fallout (was: Turn DECL_SECTION_NAME into string)

2014-06-24 Thread Jan-Benedict Glaw
Hi!

This is the xtensa fallout, see 
http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=272418

g++ -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -fno-exceptions 
-fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings 
-Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic 
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common  
-DHAVE_CONFIG_H -I. -I. -I/home/jbglaw/repos/gcc/gcc 
-I/home/jbglaw/repos/gcc/gcc/. -I/home/jbglaw/repos/gcc/gcc/../include 
-I/home/jbglaw/repos/gcc/gcc/../libcpp/include  
-I/home/jbglaw/repos/gcc/gcc/../libdecnumber 
-I/home/jbglaw/repos/gcc/gcc/../libdecnumber/dpd -I../libdecnumber 
-I/home/jbglaw/repos/gcc/gcc/../libbacktrace-o insn-preds.o -MT 
insn-preds.o -MMD -MP -MF ./.deps/insn-preds.TPo insn-preds.c
/home/jbglaw/repos/gcc/gcc/config/xtensa/predicates.md: In function ‘int 
call_insn_operand_1(rtx, machine_mode)’:
/home/jbglaw/repos/gcc/gcc/config/xtensa/predicates.md:113:57: error: cannot 
convert ‘const char*’ to ‘tree’ in assignment
/home/jbglaw/repos/gcc/gcc/config/xtensa/predicates.md:119:46: error: cannot 
convert ‘const char*’ to ‘tree’ in assignment
make[1]: *** [insn-preds.o] Error 1

MfG, JBG

-- 
  Jan-Benedict Glaw  jbg...@lug-owl.de  +49-172-7608481
Signature of:   Ich hatte in letzter Zeit ein bißchen viel Realitycheck.
the second  :   Langsam möchte ich mal wieder weiterträumen können.
 -- Maximilian Wilhelm (18. Mai 2005, #lug-owl.de)


signature.asc
Description: Digital signature


[BUILDROBOT] v850 fallout (was: Turn DECL_SECTION_NAME into string)

2014-06-24 Thread Jan-Benedict Glaw
Hi!

I've been away for holidays and other stuff, so this is a bit late,
but nevermind... The stringification of DECL_SECTION_NAME had some
fallout, see eg. 
http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=272454

g++ -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -fno-exceptions 
-fno-rtti -fasynchronous-unwind-tables -W -Wall -Wwrite-strings -Wcast-qual 
-Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long 
-Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -I. 
-I. -I/home/jbglaw/repos/gcc/gcc -I/home/jbglaw/repos/gcc/gcc/. 
-I/home/jbglaw/repos/gcc/gcc/../include 
-I/home/jbglaw/repos/gcc/gcc/../libcpp/include  
-I/home/jbglaw/repos/gcc/gcc/../libdecnumber 
-I/home/jbglaw/repos/gcc/gcc/../libdecnumber/dpd -I../libdecnumber 
-I/home/jbglaw/repos/gcc/gcc/../libbacktrace-o v850.o -MT v850.o -MMD -MP 
-MF ./.deps/v850.TPo /home/jbglaw/repos/gcc/gcc/config/v850/v850.c
/home/jbglaw/repos/gcc/gcc/config/v850/v850.c: In function ‘tree_node* 
v850_handle_interrupt_attribute(tree_node**, tree_node*, tree_node*, int, 
bool*)’:
/home/jbglaw/repos/gcc/gcc/config/v850/v850.c:2088: warning: unknown conversion 
type character ‘E’ in format
/home/jbglaw/repos/gcc/gcc/config/v850/v850.c:2088: warning: too many arguments 
for format
/home/jbglaw/repos/gcc/gcc/config/v850/v850.c: In function ‘void 
v850_insert_attributes(tree_node*, tree_node**)’:
/home/jbglaw/repos/gcc/gcc/config/v850/v850.c:2647: error: cannot convert 
‘tree_node*’ to ‘const char*’ for argument ‘2’ to ‘void 
set_decl_section_name(tree_node*, const char*)’
make[1]: *** [v850.o] Error 1

MfG, JBG

-- 
  Jan-Benedict Glaw  jbg...@lug-owl.de  +49-172-7608481
Signature of:  Alles sollte so einfach wie möglich gemacht sein.
the second  :  Aber nicht einfacher.  (Einstein)


signature.asc
Description: Digital signature


Re: Turn DECL_SECTION_NAME into string

2014-06-17 Thread Richard Biener
On Tue, Jun 17, 2014 at 8:40 AM, Thomas Schwinge
 wrote:
> Hi!
>
> On Thu, 12 Jun 2014 06:33:25 +0200, Jan Hubicka  wrote:
>> this lenghtly patch makes the legwork to put section names out of tree 
>> representation.
>> Originally they were STRING_CST. I ended up implementing on-side reference 
>> counted
>> string voclabulary that is done in bit baroque way to be GGC and PCH safe 
>> (uff).
>
> As reported in , this causes a build failure
> with --enable-checking=fold:
>
> /home/dimhen/src/gcc_current/gcc/fold-const.c: In function 'void 
> fold_checksum_tree(const_tree, md5_ctx*, hash_table)':
> /home/dimhen/src/gcc_current/gcc/fold-const.c:14863:55: error: cannot 
> convert 'const char*' to 'const_tree {aka const tree_node*}' for argument '1' 
> to 'void fold_checksum_tree(const_tree, md5_ctx*, 
> hash_table >)'
>   fold_checksum_tree (DECL_SECTION_NAME (expr), ctx, ht);
>
> From light testing the following seems to get around this -- is it the
> appropriate fix?

Yes.  This is ok.

Thanks,
Richard.

> diff --git gcc/fold-const.c gcc/fold-const.c
> index 24daaa3..978b854 100644
> --- gcc/fold-const.c
> +++ gcc/fold-const.c
> @@ -14859,8 +14859,6 @@ fold_checksum_tree (const_tree expr, struct md5_ctx 
> *ctx,
>   fold_checksum_tree (DECL_ABSTRACT_ORIGIN (expr), ctx, ht);
>   fold_checksum_tree (DECL_ATTRIBUTES (expr), ctx, ht);
> }
> -  if (CODE_CONTAINS_STRUCT (TREE_CODE (expr), TS_DECL_WITH_VIS))
> -   fold_checksum_tree (DECL_SECTION_NAME (expr), ctx, ht);
>
>if (CODE_CONTAINS_STRUCT (TREE_CODE (expr), TS_DECL_NON_COMMON))
> {
>
>
> Grüße,
>  Thomas


Re: Turn DECL_SECTION_NAME into string

2014-06-16 Thread Thomas Schwinge
Hi!

On Thu, 12 Jun 2014 06:33:25 +0200, Jan Hubicka  wrote:
> this lenghtly patch makes the legwork to put section names out of tree 
> representation.
> Originally they were STRING_CST. I ended up implementing on-side reference 
> counted
> string voclabulary that is done in bit baroque way to be GGC and PCH safe 
> (uff).

As reported in , this causes a build failure
with --enable-checking=fold:

/home/dimhen/src/gcc_current/gcc/fold-const.c: In function 'void 
fold_checksum_tree(const_tree, md5_ctx*, hash_table)':
/home/dimhen/src/gcc_current/gcc/fold-const.c:14863:55: error: cannot 
convert 'const char*' to 'const_tree {aka const tree_node*}' for argument '1' 
to 'void fold_checksum_tree(const_tree, md5_ctx*, 
hash_table >)'
  fold_checksum_tree (DECL_SECTION_NAME (expr), ctx, ht);

From light testing the following seems to get around this -- is it the
appropriate fix?

diff --git gcc/fold-const.c gcc/fold-const.c
index 24daaa3..978b854 100644
--- gcc/fold-const.c
+++ gcc/fold-const.c
@@ -14859,8 +14859,6 @@ fold_checksum_tree (const_tree expr, struct md5_ctx 
*ctx,
  fold_checksum_tree (DECL_ABSTRACT_ORIGIN (expr), ctx, ht);
  fold_checksum_tree (DECL_ATTRIBUTES (expr), ctx, ht);
}
-  if (CODE_CONTAINS_STRUCT (TREE_CODE (expr), TS_DECL_WITH_VIS))
-   fold_checksum_tree (DECL_SECTION_NAME (expr), ctx, ht);
 
   if (CODE_CONTAINS_STRUCT (TREE_CODE (expr), TS_DECL_NON_COMMON))
{


Grüße,
 Thomas


pgpPJBK1qw1Im.pgp
Description: PGP signature


Re: Turn DECL_SECTION_NAME into string

2014-06-12 Thread Jan Hubicka
> On Thu, Jun 12, 2014 at 6:33 AM, Jan Hubicka  wrote:
> > Hi,
> > this lenghtly patch makes the legwork to put section names out of tree 
> > representation.
> > Originally they were STRING_CST. I ended up implementing on-side reference 
> > counted
> > string voclabulary that is done in bit baroque way to be GGC and PCH safe 
> > (uff).
> > The memory savings on Firefox are about 60MB, becuase while reading symbol 
> > table we
> > now unify the many duplicated comdat group strings and also we free them 
> > after we bring
> > those local.
> >
> > The old representation probably made sense when most of string came via 
> > __section__
> > attribute where they was readily parsed as string constants.
> 
> I wonder why you didn't use IDENTIFIER_NODEs?  (ok, still trees ...)
> At least those are already GGC and PCH safe.

To be able to discard it effectively during LTO by ref counting.
IDENTIFIER_NODEs makes sense for assembler names (sorta) since they may match
identifier and thus also to COMDAT_GROUPS that are taken from assembler names.
Section names do not match those, so having a separate pool for them seemed to 
work
best.

What happens is at LTO is that we read all the sections for comdat groups and 
then
ipa-visibility dismantles them.

Anyway, it is now hidden by the API, so we can change it easily.

Honza
> 
> Richard.
> 
> > Bootstrapped/regtested x86_64-linux, comitted.
> >
> > Honza
> >
> > * symtab.c (section_hash): New hash.
> > (symtab_unregister_node): Clear section before freeing.
> > (hash_section_hash_entry): New haser.
> > (eq_sections): New function.
> > (symtab_node::set_section_for_node): New method.
> > (set_section_1): Update.
> > (symtab_node::set_section): Take string instead of tree as 
> > parameter.
> > (symtab_resolve_alias): Update.
> > * cgraph.h (section_hash_entry_d): New structure.
> > (section_hash_entry): New typedef.
> > (cgraph_node): Change comdat_group_ to x_comdat_group,
> > change section_ to x_section and turn into section_hash_entry;
> > update accestors; put set_section_for_node offline.
> > * tree.c (decl_section_name): Turn into string.
> > (set_decl_section_name): Change parameter to be string.
> > * tree.h (decl_section_name, set_decl_section_name): Update 
> > prototypes.
> > * sdbout.c (sdbout_one_type): Update.
> > * tree-vect-data-refs.c (vect_can_force_dr_alignment_p): Update.
> > * varasm.c (IN_NAMED_SECTION, get_named_section, 
> > resolve_unique_section,
> > hot_function_section, get_named_text_section, 
> > USE_SELECT_SECTION_FOR_FUNCTIONS,
> > default_function_rodata_section, make_decl_rtl, 
> > default_unique_section):
> > Update.
> > * config/c6x/c6x.c (c6x_in_small_data_p): Update.
> > (c6x_elf_unique_section): Update.
> > * config/nios2/nios2.c (nios2_in_small_data_p): Update.
> > * config/pa/pa.c (pa_function_section): Update.
> > * config/pa/pa.h (IN_NAMED_SECTION_P): Update.
> > * config/ia64/ia64.c (ia64_in_small_data_p): Update.
> > * config/arc/arc.c (arc_in_small_data_p): Update.
> > * config/arm/unknown-elf.h (IN_NAMED_SECTION_P): Update.
> > * config/mcore/mcore.c (mcore_unique_section): Update.
> > * config/mips/mips.c (mips16_build_function_stub): Update.
> > (mips16_build_call_stub): Update.
> > (mips_function_rodata_section): Update.
> > (mips_in_small_data_p): Update.
> > * config/score/score.c (score_in_small_data_p): Update.
> > * config/rx/rx.c (rx_in_small_data): Update.
> > * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Update.
> > (rs6000_xcoff_asm_named_section): Update.
> > (rs6000_xcoff_unique_section): Update.
> > * config/frv/frv.c (frv_string_begins_with): Update.
> > (frv_in_small_data_p): Update.
> > * config/v850/v850.c (v850_encode_data_area): Update.
> > * config/bfin/bfin.c (DECL_SECTION_NAME): Update.
> > (bfin_handle_l1_data_attribute): Update.
> > (bfin_handle_l2_attribute): Update.
> > * config/mep/mep.c (mep_unique_section): Update.
> > * config/microblaze/microblaze.c (microblaze_elf_in_small_data_p): 
> > Update.
> > * config/h8300/h8300.c (h8300_handle_eightbit_data_attribute): 
> > Update.
> > (h8300_handle_tiny_data_attribute): Update.
> > * config/m32r/m32r.c (m32r_in_small_data_p): Update.
> > (m32r_in_small_data_p): Update.
> > * config/alpha/alpha.c (alpha_in_small_data_p): Update.
> > * config/i386/i386.c (ix86_in_large_data_p): Update.
> > * config/i386/winnt.c (i386_pe_unique_section): Update.
> > * config/darwin.c (darwin_function_section): Update.
> > * config/lm32/lm32.c (lm32_in_small_data_p): Update.
> > * tree-emutls.c (get_em

Re: Turn DECL_SECTION_NAME into string

2014-06-12 Thread Richard Biener
On Thu, Jun 12, 2014 at 6:33 AM, Jan Hubicka  wrote:
> Hi,
> this lenghtly patch makes the legwork to put section names out of tree 
> representation.
> Originally they were STRING_CST. I ended up implementing on-side reference 
> counted
> string voclabulary that is done in bit baroque way to be GGC and PCH safe 
> (uff).
> The memory savings on Firefox are about 60MB, becuase while reading symbol 
> table we
> now unify the many duplicated comdat group strings and also we free them 
> after we bring
> those local.
>
> The old representation probably made sense when most of string came via 
> __section__
> attribute where they was readily parsed as string constants.

I wonder why you didn't use IDENTIFIER_NODEs?  (ok, still trees ...)
At least those are already GGC and PCH safe.

Richard.

> Bootstrapped/regtested x86_64-linux, comitted.
>
> Honza
>
> * symtab.c (section_hash): New hash.
> (symtab_unregister_node): Clear section before freeing.
> (hash_section_hash_entry): New haser.
> (eq_sections): New function.
> (symtab_node::set_section_for_node): New method.
> (set_section_1): Update.
> (symtab_node::set_section): Take string instead of tree as parameter.
> (symtab_resolve_alias): Update.
> * cgraph.h (section_hash_entry_d): New structure.
> (section_hash_entry): New typedef.
> (cgraph_node): Change comdat_group_ to x_comdat_group,
> change section_ to x_section and turn into section_hash_entry;
> update accestors; put set_section_for_node offline.
> * tree.c (decl_section_name): Turn into string.
> (set_decl_section_name): Change parameter to be string.
> * tree.h (decl_section_name, set_decl_section_name): Update 
> prototypes.
> * sdbout.c (sdbout_one_type): Update.
> * tree-vect-data-refs.c (vect_can_force_dr_alignment_p): Update.
> * varasm.c (IN_NAMED_SECTION, get_named_section, 
> resolve_unique_section,
> hot_function_section, get_named_text_section, 
> USE_SELECT_SECTION_FOR_FUNCTIONS,
> default_function_rodata_section, make_decl_rtl, 
> default_unique_section):
> Update.
> * config/c6x/c6x.c (c6x_in_small_data_p): Update.
> (c6x_elf_unique_section): Update.
> * config/nios2/nios2.c (nios2_in_small_data_p): Update.
> * config/pa/pa.c (pa_function_section): Update.
> * config/pa/pa.h (IN_NAMED_SECTION_P): Update.
> * config/ia64/ia64.c (ia64_in_small_data_p): Update.
> * config/arc/arc.c (arc_in_small_data_p): Update.
> * config/arm/unknown-elf.h (IN_NAMED_SECTION_P): Update.
> * config/mcore/mcore.c (mcore_unique_section): Update.
> * config/mips/mips.c (mips16_build_function_stub): Update.
> (mips16_build_call_stub): Update.
> (mips_function_rodata_section): Update.
> (mips_in_small_data_p): Update.
> * config/score/score.c (score_in_small_data_p): Update.
> * config/rx/rx.c (rx_in_small_data): Update.
> * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Update.
> (rs6000_xcoff_asm_named_section): Update.
> (rs6000_xcoff_unique_section): Update.
> * config/frv/frv.c (frv_string_begins_with): Update.
> (frv_in_small_data_p): Update.
> * config/v850/v850.c (v850_encode_data_area): Update.
> * config/bfin/bfin.c (DECL_SECTION_NAME): Update.
> (bfin_handle_l1_data_attribute): Update.
> (bfin_handle_l2_attribute): Update.
> * config/mep/mep.c (mep_unique_section): Update.
> * config/microblaze/microblaze.c (microblaze_elf_in_small_data_p): 
> Update.
> * config/h8300/h8300.c (h8300_handle_eightbit_data_attribute): Update.
> (h8300_handle_tiny_data_attribute): Update.
> * config/m32r/m32r.c (m32r_in_small_data_p): Update.
> (m32r_in_small_data_p): Update.
> * config/alpha/alpha.c (alpha_in_small_data_p): Update.
> * config/i386/i386.c (ix86_in_large_data_p): Update.
> * config/i386/winnt.c (i386_pe_unique_section): Update.
> * config/darwin.c (darwin_function_section): Update.
> * config/lm32/lm32.c (lm32_in_small_data_p): Update.
> * tree-emutls.c (get_emutls_init_templ_addr): Update.
> (new_emutls_decl): Update.
> * lto-cgraph.c (lto_output_node, input_node, input_varpool_node,
> input_varpool_node): Update.
> (ead_string_cst): Turn to ...
> (read_string): ... this one.
> * dwarf2out.c (secname_for_decl): Update.
> * asan.c (asan_protect_global): Update.
>
> * c-family/c-common.c (handle_section_attribute): Update handling for
> section names that are no longer trees.
>
> * java/class.c (build_utf8_ref): Update handling for section names
> that are no longer trees.
> (emit_register_classes_in_jcr_section): Update.
>
> * vtable-class

Turn DECL_SECTION_NAME into string

2014-06-11 Thread Jan Hubicka
Hi,
this lenghtly patch makes the legwork to put section names out of tree 
representation.
Originally they were STRING_CST. I ended up implementing on-side reference 
counted
string voclabulary that is done in bit baroque way to be GGC and PCH safe (uff).
The memory savings on Firefox are about 60MB, becuase while reading symbol 
table we
now unify the many duplicated comdat group strings and also we free them after 
we bring
those local.

The old representation probably made sense when most of string came via 
__section__
attribute where they was readily parsed as string constants.

Bootstrapped/regtested x86_64-linux, comitted.

Honza

* symtab.c (section_hash): New hash.
(symtab_unregister_node): Clear section before freeing.
(hash_section_hash_entry): New haser.
(eq_sections): New function.
(symtab_node::set_section_for_node): New method.
(set_section_1): Update.
(symtab_node::set_section): Take string instead of tree as parameter.
(symtab_resolve_alias): Update.
* cgraph.h (section_hash_entry_d): New structure.
(section_hash_entry): New typedef.
(cgraph_node): Change comdat_group_ to x_comdat_group,
change section_ to x_section and turn into section_hash_entry;
update accestors; put set_section_for_node offline.
* tree.c (decl_section_name): Turn into string.
(set_decl_section_name): Change parameter to be string.
* tree.h (decl_section_name, set_decl_section_name): Update prototypes.
* sdbout.c (sdbout_one_type): Update.
* tree-vect-data-refs.c (vect_can_force_dr_alignment_p): Update.
* varasm.c (IN_NAMED_SECTION, get_named_section, resolve_unique_section,
hot_function_section, get_named_text_section, 
USE_SELECT_SECTION_FOR_FUNCTIONS,
default_function_rodata_section, make_decl_rtl, default_unique_section):
Update.
* config/c6x/c6x.c (c6x_in_small_data_p): Update.
(c6x_elf_unique_section): Update.
* config/nios2/nios2.c (nios2_in_small_data_p): Update.
* config/pa/pa.c (pa_function_section): Update.
* config/pa/pa.h (IN_NAMED_SECTION_P): Update.
* config/ia64/ia64.c (ia64_in_small_data_p): Update.
* config/arc/arc.c (arc_in_small_data_p): Update.
* config/arm/unknown-elf.h (IN_NAMED_SECTION_P): Update.
* config/mcore/mcore.c (mcore_unique_section): Update.
* config/mips/mips.c (mips16_build_function_stub): Update.
(mips16_build_call_stub): Update.
(mips_function_rodata_section): Update.
(mips_in_small_data_p): Update.
* config/score/score.c (score_in_small_data_p): Update.
* config/rx/rx.c (rx_in_small_data): Update.
* config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Update.
(rs6000_xcoff_asm_named_section): Update.
(rs6000_xcoff_unique_section): Update.
* config/frv/frv.c (frv_string_begins_with): Update.
(frv_in_small_data_p): Update.
* config/v850/v850.c (v850_encode_data_area): Update.
* config/bfin/bfin.c (DECL_SECTION_NAME): Update.
(bfin_handle_l1_data_attribute): Update.
(bfin_handle_l2_attribute): Update.
* config/mep/mep.c (mep_unique_section): Update.
* config/microblaze/microblaze.c (microblaze_elf_in_small_data_p): 
Update.
* config/h8300/h8300.c (h8300_handle_eightbit_data_attribute): Update.
(h8300_handle_tiny_data_attribute): Update.
* config/m32r/m32r.c (m32r_in_small_data_p): Update.
(m32r_in_small_data_p): Update.
* config/alpha/alpha.c (alpha_in_small_data_p): Update.
* config/i386/i386.c (ix86_in_large_data_p): Update.
* config/i386/winnt.c (i386_pe_unique_section): Update.
* config/darwin.c (darwin_function_section): Update.
* config/lm32/lm32.c (lm32_in_small_data_p): Update.
* tree-emutls.c (get_emutls_init_templ_addr): Update.
(new_emutls_decl): Update.
* lto-cgraph.c (lto_output_node, input_node, input_varpool_node,
input_varpool_node): Update.
(ead_string_cst): Turn to ...
(read_string): ... this one.
* dwarf2out.c (secname_for_decl): Update.
* asan.c (asan_protect_global): Update.

* c-family/c-common.c (handle_section_attribute): Update handling for
section names that are no longer trees.

* java/class.c (build_utf8_ref): Update handling for section names
that are no longer trees.
(emit_register_classes_in_jcr_section): Update.

* vtable-class-hierarchy.c: Update handling for section names
that are no longer trees.
* decl.c (duplicate_decls): Likewise.

* gcc-interface/utils.c:  Update handling for section names
that are no longer trees.
Index: sdbout.c
===
--- sdbout.c(revision 211433)
+++ sdbout.c(working