This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [hsa merge 07/10] IPA-HSA pass
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Martin Jambor <mjambor at suse dot cz>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Jan Hubicka <hubicka at ucw dot cz>, Martin Liska <mliska at suse dot cz>
- Date: Thu, 14 Jan 2016 13:58:58 +0100
- Subject: Re: [hsa merge 07/10] IPA-HSA pass
- Authentication-results: sourceware.org; auth=none
- References: <20160113173925 dot 220029649 at virgil dot suse dot cz> <20160113173925 dot 776317025 at virgil dot suse dot cz>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Jan 13, 2016 at 06:39:32PM +0100, Martin Jambor wrote:
> + cgraph_node *clone = node->create_virtual_clone
> + (vec <cgraph_edge *> (), NULL, NULL, "hsa");
Nicer formatting would be
cgraph_node *clone
= node->create_virtual_clone (vec <cgraph_edge *> (),
NULL, NULL, "hsa");
> + cgraph_node *clone = node->create_virtual_clone
> + (vec <cgraph_edge *> (), NULL, NULL, "hsa");
Ditto.
> + const struct lto_function_header *header =
> + (const struct lto_function_header *) data;
= goes on the next line.
> + const int cfg_offset = sizeof (struct lto_function_header);
> + const int main_offset = cfg_offset + header->cfg_size;
> + const int string_offset = main_offset + header->main_size;
> + struct data_in *data_in;
> + unsigned int i;
> + unsigned int count;
> +
> + lto_input_block ib_main ((const char *) data + main_offset,
> + header->main_size, file_data->mode_table);
> +
> + data_in =
Ditto.
> +bool
> +pass_ipa_hsa::gate (function *)
> +{
> + return hsa_gen_requested_p () || in_lto_p;
Does it really need to be enabled whenever in_lto_p?
I mean, if HSA is not configured in, I think the gate should be false too.
Otherwise LGTM.
Jakub