Rerog streaming of OPTIMIZATION_NODE

Jan-Benedict Glaw jbglaw@lug-owl.de
Sat Nov 15 23:03:00 GMT 2014


On Sat, 2014-11-15 17:57:20 +0100, Jan Hubicka <hubicka@ucw.cz> wrote:
> Hi,
> this patch implements OPTIMIZATION_NODE streaming same was as previous patch
> did for TARGET_OPTION_NODE. Since the code turned out to be completely
> analogous to the previous one I will go ahead and commit it as obvious.
> It will help to make followup changes easier to follow.
> 
> I also tested this with forcing default optimization node on every function
> with LTO.  It seems to just work, modulo inliner ignoring most of the flags and
> happily dragging code from one set of optimization options to another.
> 
> Bootstrapped/regtested ppc64-linux and x86_64-linux, tested with Firefox, Comitted.
> 
> Honza
> 
> 	* lto-streamer-out.c (hash_tree): Use cl_optimization_hash.
> 	* lto-streamer.h (cl_optimization_stream_out, cl_optimization_stream_in): Declare.
> 	* optc-save-gen.awk: Generate cl_optimization LTO streaming and hashing routines.
> 	* opth-gen.awk: Add prototype of cl_optimization_hash.
> 	* tree-streamer-in.c (unpack_ts_optimization): Remove.
> 	(streamer_unpack_tree_bitfields): Use cl_optimization_stream_in.
> 	* tree-streamer-out.c (pack_ts_optimization): Remove.
> 	(streamer_pack_tree_bitfields): Use cl_optimization_stream_out.

The recent work, I'm not exactly sure if it's actually /this/ commit,
broke nios2-rtems, see eg. build
http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=376303

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 optabs.o -MT optabs.o -MMD -MP -MF ./.deps/optabs.TPo /home/jbglaw/repos/gcc/gcc/optabs.c
gawk -f /home/jbglaw/repos/gcc/gcc/opt-functions.awk -f /home/jbglaw/repos/gcc/gcc/opt-read.awk \
       -f /home/jbglaw/repos/gcc/gcc/optc-save-gen.awk \
       -v header_name="config.h system.h coretypes.h tm.h" < optionlist > options-save.c
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 options-save.o -MT options-save.o -MMD -MP -MF ./.deps/options-save.TPo options-save.c
options-save.c: In function ‘void cl_target_option_stream_in(data_in*, bitpack_d*, cl_target_option*)’:
options-save.c:1901:41: error: expected primary-expression before ‘enum’
   ptr->saved_custom_code_status[256] = (enum nios2_ccs_code saved_custom_code_status[256]) bp_unpack_value (bp, 64);
                                         ^
options-save.c:1901:41: error: expected ‘)’ before ‘enum’
options-save.c:1902:40: error: expected primary-expression before ‘int’
   ptr->saved_custom_code_index[256] = (int saved_custom_code_index[256]) bp_unpack_value (bp, 64);
                                        ^
options-save.c:1902:40: error: expected ‘)’ before ‘int’
options-save.c:1903:49: error: expected primary-expression before ‘int’
   ptr->saved_fpu_custom_code[n2fpu_code_num] = (int saved_fpu_custom_code[n2fpu_code_num]) bp_unpack_value (bp, 64);
                                                 ^
options-save.c:1903:49: error: expected ‘)’ before ‘int’
make[1]: *** [options-save.o] Error 1


(I just bisected it just now, it's this commit:

2014-11-14  Jan Hubicka  <hubicka@ucw.cz>

	* optc-save-gen.awk: Output cl_target_option_eq,
	cl_target_option_hash, cl_target_option_stream_out,
	cl_target_option_stream_in functions.
	* opth-gen.awk: Output prototypes for
	cl_target_option_eq and cl_target_option_hash.
	* lto-streamer.h (cl_target_option_stream_out,
	cl_target_option_stream_in): Declare.
	* tree.c (cl_option_hash_hash): Use cl_target_option_hash.
	(cl_option_hash_eq): Use cl_target_option_eq.
	* tree-streamer-in.c (unpack_value_fields): Stream in
	TREE_TARGET_OPTION.
	* lto-streamer-out.c (DFS::DFS_write_tree_body): Follow
	DECL_FUNCTION_SPECIFIC_TARGET.
	(hash_tree): Hash TREE_TARGET_OPTION; visit
	DECL_FUNCTION_SPECIFIC_TARGET.
	* tree-streamer-out.c (streamer_pack_tree_bitfields): Skip
	TS_TARGET_OPTION.
	(streamer_write_tree_body): Output TS_TARGET_OPTION.
)

MfG, JBG

-- 
      Jan-Benedict Glaw      jbglaw@lug-owl.de              +49-172-7608481
 Signature of:                      http://perl.plover.com/Questions.html
 the second  :
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20141115/314e67c4/attachment.sig>


More information about the Gcc-patches mailing list