From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26139 invoked by alias); 5 Nov 2012 11:15:58 -0000 Received: (qmail 26131 invoked by uid 22791); 5 Nov 2012 11:15:57 -0000 X-SWARE-Spam-Status: No, hits=-4.0 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from nikam.ms.mff.cuni.cz (HELO nikam.ms.mff.cuni.cz) (195.113.20.16) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 05 Nov 2012 11:15:53 +0000 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id 0D5A3543BAB; Mon, 5 Nov 2012 12:15:50 +0100 (CET) Date: Mon, 05 Nov 2012 11:15:00 -0000 From: Jan Hubicka To: GCC Patches , Jan Hubicka Subject: Re: [PATCH] Stream cgraph_node.ipa_transforms_to_apply Message-ID: <20121105111550.GA11052@kam.mff.cuni.cz> References: <20121104224353.GD5617@virgil.arch.suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20121104224353.GD5617@virgil.arch.suse.de> User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2012-11/txt/msg00367.txt.bz2 > Hi, > > the following patch adds streaming ofcgraph_node.ipa_transforms_to_apply > so that transformation phases of IPA passes are run in LTO too. It is > done by simple streaming of pass.static_pass_number and then looking > it up among all_regular_ipa_passes. > > Bootstrapped and tested on x86_64-linux, required to make aggregate > IPA-CP work in LTO. > > OK for trunk? > > Thanks, > > Martin > > > 2012-11-03 Martin Jambor > > * lto-cgraph.c: Include tree-pass.h. > (lto_output_node): Stream node->ipa_transforms_to_apply. > (input_node): Likewise. > * Makefile.in (lto-cgraph.o): Add TREE_PASS_H to dependencies. > + count = streamer_read_hwi (ib); > + node->ipa_transforms_to_apply = NULL; > + for (i = 0; i < count; i++) > + { > + struct opt_pass *pass; > + int pi = streamer_read_hwi (ib); > + > + for (pass = all_regular_ipa_passes; pass; pass = pass->next) > + if (pass->static_pass_number == pi) passes.c compute vector translating IDs to pass structures, please export it and use it here; OK with this change. Honza > + { > + VEC_safe_push (ipa_opt_pass, heap, node->ipa_transforms_to_apply, > + (struct ipa_opt_pass_d *) pass); > + break; > + } > + gcc_assert (pass); > + } > + > if (tag == LTO_symtab_analyzed_node) > ref = streamer_read_hwi (ib); > > Index: src/gcc/Makefile.in > =================================================================== > --- src.orig/gcc/Makefile.in > +++ src/gcc/Makefile.in > @@ -2146,7 +2146,7 @@ lto-cgraph.o: lto-cgraph.c $(CONFIG_H) $ > $(HASHTAB_H) langhooks.h $(BASIC_BLOCK_H) \ > $(TREE_FLOW_H) $(CGRAPH_H) $(FUNCTION_H) $(GGC_H) $(DIAGNOSTIC_CORE_H) \ > $(EXCEPT_H) $(TIMEVAR_H) pointer-set.h $(LTO_STREAMER_H) \ > - $(GCOV_IO_H) $(DATA_STREAMER_H) $(TREE_STREAMER_H) > + $(GCOV_IO_H) $(DATA_STREAMER_H) $(TREE_STREAMER_H) $(TREE_PASS_H) > lto-streamer-in.o: lto-streamer-in.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ > $(TM_H) toplev.h $(DIAGNOSTIC_CORE_H) $(EXPR_H) $(FLAGS_H) $(PARAMS_H) \ > input.h $(HASHTAB_H) $(BASIC_BLOCK_H) $(TREE_FLOW_H) $(TREE_PASS_H) \