aboutsummaryrefslogtreecommitdiff
path: root/gcc/cfgloop.h
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2019-11-21 13:46:18 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2019-11-21 13:46:18 +0000
commitd78b70959f334699bf556e9b8d4e0a8c12a64b46 (patch)
treebbeb4dbda1117ae17d50415a6053d914cf30f236 /gcc/cfgloop.h
parente2a05fdfd4798192493c582ec6528c975bfa9b0c (diff)
downloadgcc-d78b70959f334699bf556e9b8d4e0a8c12a64b46.zip
gcc-d78b70959f334699bf556e9b8d4e0a8c12a64b46.tar.gz
gcc-d78b70959f334699bf556e9b8d4e0a8c12a64b46.tar.bz2
cfgloop.h (loop_iterator::~loop_iterator): Remove.
2019-11-21 Richard Biener <rguenther@suse.de> * cfgloop.h (loop_iterator::~loop_iterator): Remove. (loop_iterator::to_visit): Use an auto_vec with internal storage. (loop_iterator::loop_iterator): Adjust. * cfganal.c (compute_dominance_frontiers_1): Fold into... (compute_dominance_frontiers): ... this. Hoist invariant get_immediate_dominator call. (compute_idf): Use a work-set instead of a work-list for more optimal iteration order and duplicate avoidance. * tree-into-ssa.c (mark_phi_for_rewrite): Avoid re-allocating the vector all the time, instead pre-allocate the vector only once. (delete_update_ssa): Simplify. * vec.h (va_heap::release): Disable -Wfree-nonheap-object around it. From-SVN: r278550
Diffstat (limited to 'gcc/cfgloop.h')
-rw-r--r--gcc/cfgloop.h12
1 files changed, 2 insertions, 10 deletions
diff --git a/gcc/cfgloop.h b/gcc/cfgloop.h
index 6256cc0..e3590d7 100644
--- a/gcc/cfgloop.h
+++ b/gcc/cfgloop.h
@@ -661,7 +661,6 @@ class loop_iterator
{
public:
loop_iterator (function *fn, loop_p *loop, unsigned flags);
- ~loop_iterator ();
inline loop_p next ();
@@ -669,7 +668,7 @@ public:
function *fn;
/* The list of loops to visit. */
- vec<int> to_visit;
+ auto_vec<int, 16> to_visit;
/* The index of the actual loop. */
unsigned idx;
@@ -702,12 +701,11 @@ loop_iterator::loop_iterator (function *fn, loop_p *loop, unsigned flags)
this->fn = fn;
if (!loops_for_fn (fn))
{
- this->to_visit.create (0);
*loop = NULL;
return;
}
- this->to_visit.create (number_of_loops (fn));
+ this->to_visit.reserve_exact (number_of_loops (fn));
mn = (flags & LI_INCLUDE_ROOT) ? 0 : 1;
if (flags & LI_ONLY_INNERMOST)
@@ -769,12 +767,6 @@ loop_iterator::loop_iterator (function *fn, loop_p *loop, unsigned flags)
*loop = this->next ();
}
-inline
-loop_iterator::~loop_iterator ()
-{
- this->to_visit.release ();
-}
-
#define FOR_EACH_LOOP(LOOP, FLAGS) \
for (loop_iterator li(cfun, &(LOOP), FLAGS); \
(LOOP); \