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