diff options
author | Trevor Saunders <tbsaunde+gcc@tbsaunde.org> | 2015-02-08 09:22:28 -0500 |
---|---|---|
committer | Trevor Saunders <tbsaunde+gcc@tbsaunde.org> | 2015-04-09 19:57:14 -0400 |
commit | 4f8953b6684459714538e47696797e3b02dfe428 (patch) | |
tree | ebb4c8dbf1bdaa10be85e4042cd782b936f52a62 /gcc/tree-ssa-loop-manip.c | |
parent | 4aed2663603411f5bb768f5c84d1a872a5bb281c (diff) | |
download | gcc-tbsaunde/bitvec.tar.gz |
add bitvec and use sometbsaunde/bitvec
gcc/
2015-04-08 Trevor Saunders <tbsaunde@tbsaunde.org>
* bitvec.h: New file.
* bitvec.c: New file.
* Makefile.in (OBJS-libcommon): Add bitvec.o.
* alias.c, cfganal.c, cfgbuild.c, cfgbuild.h, cfgexpand.c, cfghooks.c,
cfghooks.h, cfgloop.c, cfgloopmanip.c, cfgloopmanip.h, cfgrtl.c,
config/spu/spu.c, cp/vtable-class-hierarchy.c, cse.c, dce.c,
df-core.c, dse.c, except.c, except.h, function.c, graph.c,
graphite-sese-to-poly.c, ira-lives.c, loop-unroll.c, lower-subreg.c,
lra-lives.c, lra.c, modulo-sched.c, recog.c, regcprop.c, reload1.c,
sched-int.h, sched-rgn.c, sel-sched-ir.c, sel-sched.c,
store-motion.c, tree-eh.c, tree-into-ssa.c, tree-outof-ssa.c,
tree-ssa-dce.c, tree-ssa-live.c, tree-ssa-loop-im.c,
tree-ssa-loop-ivcanon.c, tree-ssa-loop-manip.c,
tree-ssa-loop-manip.h, tree-ssa-pre.c, tree-ssa-propagate.c,
tree-ssa-reassoc.c, tree-ssa-structalias.c, tree-stdarg.c,
tree-vect-slp.c, tree-vrp.c, var-tracking.c: Use bitvec instead
of sbitmap.
Diffstat (limited to 'gcc/tree-ssa-loop-manip.c')
-rw-r--r-- | gcc/tree-ssa-loop-manip.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/tree-ssa-loop-manip.c b/gcc/tree-ssa-loop-manip.c index 228fac665d6..1b84d2efdf4 100644 --- a/gcc/tree-ssa-loop-manip.c +++ b/gcc/tree-ssa-loop-manip.c @@ -20,6 +20,7 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #include "system.h" #include "coretypes.h" +#include "bitvec.h" #include "tm.h" #include "hash-set.h" #include "machmode.h" @@ -769,7 +770,8 @@ copy_phi_node_args (unsigned first_new_block) bool gimple_duplicate_loop_to_header_edge (struct loop *loop, edge e, - unsigned int ndupl, sbitmap wont_exit, + unsigned int ndupl, + const bitvec &wont_exit, edge orig, vec<edge> *to_remove, int flags) { @@ -1055,7 +1057,6 @@ tree_transform_and_unroll_loop (struct loop *loop, unsigned factor, unsigned est_niter, prob_entry, scale_unrolled, scale_rest, freq_e, freq_h; unsigned new_est_niter, i, prob; unsigned irr = loop_preheader_edge (loop)->flags & EDGE_IRREDUCIBLE_LOOP; - sbitmap wont_exit; auto_vec<edge> to_remove; est_niter = expected_loop_iterations (loop); @@ -1189,14 +1190,13 @@ tree_transform_and_unroll_loop (struct loop *loop, unsigned factor, /* Unroll the loop and remove the exits in all iterations except for the last one. */ - wont_exit = sbitmap_alloc (factor); - bitmap_ones (wont_exit); - bitmap_clear_bit (wont_exit, factor - 1); + stack_bitvec wont_exit (factor); + wont_exit.set (); + wont_exit[factor - 1] = false; ok = gimple_duplicate_loop_to_header_edge (loop, loop_latch_edge (loop), factor - 1, wont_exit, new_exit, &to_remove, DLTHE_FLAG_UPDATE_FREQ); - free (wont_exit); gcc_assert (ok); FOR_EACH_VEC_ELT (to_remove, i, e) |