* remove unused argument in duplicate_thread_path()
@ 2017-09-05 12:40 Aldy Hernandez
2017-09-05 14:56 ` Jeff Law
0 siblings, 1 reply; 2+ messages in thread
From: Aldy Hernandez @ 2017-09-05 12:40 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 117 bytes --]
It looks like all remaining uses of duplicate_thread_path (ahem, one),
pass a NULL to the REGION_COPY argument.
OK?
[-- Attachment #2: curr --]
[-- Type: application/octet-stream, Size: 2211 bytes --]
gcc/
* tree-ssa-threadupdate.c (duplicate_thread_path): Remove unused
REGION_COPY argument.
(thread_through_all_blocks): Remove unused argument to
duplicate_thread_path.
diff --git a/gcc/tree-ssa-threadupdate.c b/gcc/tree-ssa-threadupdate.c
index d5d534fde04..28c81a6ec57 100644
--- a/gcc/tree-ssa-threadupdate.c
+++ b/gcc/tree-ssa-threadupdate.c
@@ -2205,18 +2205,13 @@ bb_in_bbs (basic_block bb, basic_block *bbs, int n)
and create a single fallthru edge pointing to the same destination as the
EXIT edge.
- The new basic blocks are stored to REGION_COPY in the same order as they had
- in REGION, provided that REGION_COPY is not NULL.
-
Returns false if it is unable to copy the region, true otherwise. */
static bool
-duplicate_thread_path (edge entry, edge exit,
- basic_block *region, unsigned n_region,
- basic_block *region_copy)
+duplicate_thread_path (edge entry, edge exit, basic_block *region,
+ unsigned n_region)
{
unsigned i;
- bool free_region_copy = false;
struct loop *loop = entry->dest->loop_father;
edge exit_copy;
edge redirected;
@@ -2242,12 +2237,7 @@ duplicate_thread_path (edge entry, edge exit,
set_loop_copy (loop, loop);
- if (!region_copy)
- {
- region_copy = XNEWVEC (basic_block, n_region);
- free_region_copy = true;
- }
-
+ basic_block *region_copy = XNEWVEC (basic_block, n_region);
copy_bbs (region, n_region, region_copy, &exit, 1, &exit_copy, loop,
split_edge_bb_loc (entry), false);
@@ -2376,8 +2366,7 @@ duplicate_thread_path (edge entry, edge exit,
/* Add the other PHI node arguments. */
add_phi_args_after_copy (region_copy, n_region, NULL);
- if (free_region_copy)
- free (region_copy);
+ free (region_copy);
free_original_copy_tables ();
return true;
@@ -2502,7 +2491,7 @@ thread_through_all_blocks (bool may_peel_loop_headers)
for (unsigned int j = 0; j < len - 1; j++)
region[j] = (*path)[j]->e->dest;
- if (duplicate_thread_path (entry, exit, region, len - 1, NULL))
+ if (duplicate_thread_path (entry, exit, region, len - 1))
{
/* We do not update dominance info. */
free_dominance_info (CDI_DOMINATORS);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: remove unused argument in duplicate_thread_path()
2017-09-05 12:40 remove unused argument in duplicate_thread_path() Aldy Hernandez
@ 2017-09-05 14:56 ` Jeff Law
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2017-09-05 14:56 UTC (permalink / raw)
To: Aldy Hernandez, gcc-patches
On 09/05/2017 06:39 AM, Aldy Hernandez wrote:
> It looks like all remaining uses of duplicate_thread_path (ahem, one),
> pass a NULL to the REGION_COPY argument.
>
> OK?
>
OK.
jeff
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-09-05 14:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-05 12:40 remove unused argument in duplicate_thread_path() Aldy Hernandez
2017-09-05 14:56 ` Jeff Law
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).