aboutsummaryrefslogtreecommitdiff
path: root/gcc/sel-sched-ir.c
diff options
context:
space:
mode:
authordnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>2012-11-20 21:21:30 +0000
committerdnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>2012-11-20 21:21:30 +0000
commit1e094109e9f5db43e68a7a5613f0fc014bf3b380 (patch)
treedf5dd32febb0dc65ea6ce7f725aab90791a1dbc4 /gcc/sel-sched-ir.c
parentb0fda11bb09ebce641e82463e705916893c72b8d (diff)
Introduce vNULL to use as a nil initializer for vec<>.
This patch implements Jakub's idea of adding an empty struct with a typecast operator that returns nil vectors. This is useful to shorten all the initializers when declaring vec instances or passing nil vectors as function arguments. 2012-11-20 Diego Novillo <dnovillo@google.com> Jakub Jelinek <jakub@redhat.com> ChangeLog * vec.h (struct vnull): Declare. (vNULL): Declare. * vec.c (vNULL): Define. * bb-reorder.c: Replace all vec<T, A>() initializers with vNULL. * cfgexpand.c: Likewise. * cfgloop.c: Likewise. * cfgloopanal.c: Likewise. * cfgloopmanip.c: Likewise. * cgraph.c: Likewise. * config/c6x/c6x.c: Likewise. * config/i386/i386.c: Likewise. * df-core.c: Likewise. * dominance.c: Likewise. * dwarf2out.c: Likewise. * except.c: Likewise. * function.c: Likewise. * gcse.c: Likewise. * genautomata.c: Likewise. * graphds.c: Likewise. * graphite-scop-detection.c: Likewise. * graphite.c: Likewise. * haifa-sched.c: Likewise. * ifcvt.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline-analysis.c: Likewise. * ipa-inline-transform.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-split.c: Likewise. * ipa-utils.c: Likewise. * ira-build.c: Likewise. * lto-cgraph.c: Likewise. * lto-streamer-in.c: Likewise. * lto-symtab.c: Likewise. * opts-global.c: Likewise. * passes.c: Likewise. * ree.c: Likewise. * sched-deps.c: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * stor-layout.c: Likewise. * trans-mem.c: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-data-ref.c: Likewise. * tree-diagnostic.c: Likewise. * tree-eh.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-predcom.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-uninit.c: Likewise. * tree-stdarg.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * value-prof.c: Likewise. * varasm.c: Likewise. ada/ChangeLog * gcc-interface/decl.c: Replace all vec<T,A>() initializers with vNULL. cp/ChangeLog * name-lookup.c: Replace all vec<T, A>() initializers with vNULL. * semantics.c: Likewise. fortran/ChangeLog * trans-openmp.c: Replace all vec<T, A>() initializers with vNULL. lto/ChangeLog * lto.c: Replace all vec<T, A>() initializers with vNULL. objc/ChangeLog * objc-act.c: Replace all vec<T, A>() initializers with vNULL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193677 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/sel-sched-ir.c')
-rw-r--r--gcc/sel-sched-ir.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/gcc/sel-sched-ir.c b/gcc/sel-sched-ir.c
index e5929299c11..2c0403cae47 100644
--- a/gcc/sel-sched-ir.c
+++ b/gcc/sel-sched-ir.c
@@ -50,11 +50,11 @@ along with GCC; see the file COPYING3. If not see
/* A vector holding bb info for whole scheduling pass. */
vec<sel_global_bb_info_def>
- sel_global_bb_info = vec<sel_global_bb_info_def>();
+ sel_global_bb_info = vNULL;
/* A vector holding bb info. */
vec<sel_region_bb_info_def>
- sel_region_bb_info = vec<sel_region_bb_info_def>();
+ sel_region_bb_info = vNULL;
/* A pool for allocating all lists. */
alloc_pool sched_lists_pool;
@@ -70,7 +70,7 @@ struct loop *current_loop_nest;
/* LOOP_NESTS is a vector containing the corresponding loop nest for
each region. */
-static vec<loop_p> loop_nests = vec<loop_p>();
+static vec<loop_p> loop_nests = vNULL;
/* Saves blocks already in loop regions, indexed by bb->index. */
static sbitmap bbs_in_loop_rgns = NULL;
@@ -1652,7 +1652,7 @@ init_expr (expr_t expr, vinsn_t vi, int spec, int use, int priority,
void
copy_expr (expr_t to, expr_t from)
{
- vec<expr_history_def> temp = vec<expr_history_def>();
+ vec<expr_history_def> temp = vNULL;
if (EXPR_HISTORY_OF_CHANGES (from).exists ())
{
@@ -1687,7 +1687,7 @@ copy_expr_onside (expr_t to, expr_t from)
init_expr (to, EXPR_VINSN (from), EXPR_SPEC (from), EXPR_USEFULNESS (from),
EXPR_PRIORITY (from), EXPR_SCHED_TIMES (from), 0,
EXPR_SPEC_DONE_DS (from), EXPR_SPEC_TO_CHECK_DS (from), 0,
- vec<expr_history_def>(),
+ vNULL,
EXPR_TARGET_AVAILABLE (from), EXPR_WAS_SUBSTITUTED (from),
EXPR_WAS_RENAMED (from), EXPR_NEEDS_SPEC_CHECK_P (from),
EXPR_CANT_MOVE (from));
@@ -3004,7 +3004,7 @@ init_global_and_expr_for_insn (insn_t insn)
/* Initialize INSN's expr. */
init_expr (INSN_EXPR (insn), vinsn_create (insn, force_unique_p), 0,
REG_BR_PROB_BASE, INSN_PRIORITY (insn), 0, BLOCK_NUM (insn),
- spec_done_ds, 0, 0, vec<expr_history_def>(), true,
+ spec_done_ds, 0, 0, vNULL, true,
false, false, false, CANT_MOVE (insn));
}
@@ -4135,7 +4135,7 @@ finish_region_bb_info (void)
/* Data for each insn in current region. */
-vec<sel_insn_data_def> s_i_d = vec<sel_insn_data_def>();
+vec<sel_insn_data_def> s_i_d = vNULL;
/* Extend data structures for insns from current region. */
static void
@@ -4253,7 +4253,7 @@ init_simplejump_data (insn_t insn)
{
init_expr (INSN_EXPR (insn), vinsn_create (insn, false), 0,
REG_BR_PROB_BASE, 0, 0, 0, 0, 0, 0,
- vec<expr_history_def>(), true, false, false,
+ vNULL, true, false, false,
false, true);
INSN_SEQNO (insn) = get_seqno_for_a_jump (insn);
init_first_time_insn_data (insn);
@@ -4504,7 +4504,7 @@ get_av_level (insn_t insn)
/* The basic block that already has been processed by the sched_data_update (),
but hasn't been in sel_add_bb () yet. */
static vec<basic_block>
- last_added_blocks = vec<basic_block>();
+ last_added_blocks = vNULL;
/* A pool for allocating successor infos. */
static struct