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: Martin Jambor <mjambor at suse dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 15 Jan 2016 15:53:23 +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> <20160114125858 dot GE3017 at tucnak dot redhat dot com>
On Thu, Jan 14, 2016 at 01:58:58PM +0100, Jakub Jelinek wrote:
> Otherwise LGTM.
>
> Jakub
Thanks Jakub, I have committed the following patch from Martin Liska
that addresses your comments.
Martin
2016-01-15 Martin Liska <mliska@suse.cz>
* ipa-hsa.c (process_hsa_functions): Fixed coding style.
(ipa_hsa_read_section): Likewise.
(ipa_hsa_read_section): Likewise.
(pass_ipa_hsa::gate): Removed in_lto_p from the condition.
---
gcc/ipa-hsa.c | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/gcc/ipa-hsa.c b/gcc/ipa-hsa.c
index dd47995..769657f 100644
--- a/gcc/ipa-hsa.c
+++ b/gcc/ipa-hsa.c
@@ -86,8 +86,9 @@ process_hsa_functions (void)
{
if (!check_warn_node_versionable (node))
continue;
- 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");
TREE_PUBLIC (clone->decl) = TREE_PUBLIC (node->decl);
clone->force_output = true;
@@ -102,8 +103,9 @@ process_hsa_functions (void)
{
if (!check_warn_node_versionable (node))
continue;
- 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");
TREE_PUBLIC (clone->decl) = TREE_PUBLIC (node->decl);
if (!cgraph_local_p (node))
@@ -209,8 +211,8 @@ static void
ipa_hsa_read_section (struct lto_file_decl_data *file_data, const char *data,
size_t len)
{
- const struct lto_function_header *header =
- (const struct lto_function_header *) data;
+ const struct lto_function_header *header
+ = (const struct lto_function_header *) data;
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;
@@ -221,9 +223,9 @@ ipa_hsa_read_section (struct lto_file_decl_data *file_data, const char *data,
lto_input_block ib_main ((const char *) data + main_offset,
header->main_size, file_data->mode_table);
- data_in =
- lto_data_in_create (file_data, (const char *) data + string_offset,
- header->string_size, vNULL);
+ data_in
+ = lto_data_in_create (file_data, (const char *) data + string_offset,
+ header->string_size, vNULL);
count = streamer_read_uhwi (&ib_main);
for (i = 0; i < count; i++)
@@ -317,7 +319,7 @@ public:
bool
pass_ipa_hsa::gate (function *)
{
- return hsa_gen_requested_p () || in_lto_p;
+ return hsa_gen_requested_p ();
}
} // anon namespace
--
2.6.4