From 1e094109e9f5db43e68a7a5613f0fc014bf3b380 Mon Sep 17 00:00:00 2001 From: dnovillo Date: Tue, 20 Nov 2012 21:21:30 +0000 Subject: 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 Jakub Jelinek ChangeLog * vec.h (struct vnull): Declare. (vNULL): Declare. * vec.c (vNULL): Define. * bb-reorder.c: Replace all vec() 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() initializers with vNULL. cp/ChangeLog * name-lookup.c: Replace all vec() initializers with vNULL. * semantics.c: Likewise. fortran/ChangeLog * trans-openmp.c: Replace all vec() initializers with vNULL. lto/ChangeLog * lto.c: Replace all vec() initializers with vNULL. objc/ChangeLog * objc-act.c: Replace all vec() initializers with vNULL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193677 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/dominance.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gcc/dominance.c') diff --git a/gcc/dominance.c b/gcc/dominance.c index 4168fdea4a5..0f1e265ff1c 100644 --- a/gcc/dominance.c +++ b/gcc/dominance.c @@ -745,12 +745,12 @@ get_dominated_by (enum cdi_direction dir, basic_block bb) { unsigned int dir_index = dom_convert_dir_to_idx (dir); struct et_node *node = bb->dom[dir_index], *son = node->son, *ason; - vec bbs = vec(); + vec bbs = vNULL; gcc_checking_assert (dom_computed[dir_index]); if (!son) - return vec(); + return vNULL; bbs.safe_push ((basic_block) son->data); for (ason = son->right; ason != son; ason = ason->right) @@ -769,7 +769,7 @@ get_dominated_by_region (enum cdi_direction dir, basic_block *region, { unsigned i; basic_block dom; - vec doms = vec(); + vec doms = vNULL; for (i = 0; i < n_region; i++) region[i]->flags |= BB_DUPLICATED; @@ -793,7 +793,7 @@ get_dominated_by_region (enum cdi_direction dir, basic_block *region, vec get_dominated_to_depth (enum cdi_direction dir, basic_block bb, int depth) { - vec bbs = vec(); + vec bbs = vNULL; unsigned i; unsigned next_level_start; -- cgit v1.2.1