diff options
author | dnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-11-20 21:21:30 +0000 |
---|---|---|
committer | dnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-11-20 21:21:30 +0000 |
commit | 1e094109e9f5db43e68a7a5613f0fc014bf3b380 (patch) | |
tree | df5dd32febb0dc65ea6ce7f725aab90791a1dbc4 /gcc/tree-vect-slp.c | |
parent | b0fda11bb09ebce641e82463e705916893c72b8d (diff) | |
download | gcc-1e094109e9f5db43e68a7a5613f0fc014bf3b380.tar.gz |
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/tree-vect-slp.c')
-rw-r--r-- | gcc/tree-vect-slp.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c index e6f3da9bdfb..a4f537a8412 100644 --- a/gcc/tree-vect-slp.c +++ b/gcc/tree-vect-slp.c @@ -960,7 +960,7 @@ vect_build_slp_tree (loop_vec_info loop_vinfo, bb_vec_info bb_vinfo, prologue_cost_vec, body_cost_vec)) { if (child) - oprnd_info->def_stmts = vec<gimple>(); + oprnd_info->def_stmts = vNULL; vect_free_slp_tree (child); vect_free_oprnd_info (oprnds_info); return false; @@ -1058,7 +1058,7 @@ vect_supported_slp_permutation_p (slp_instance instance) slp_tree node = SLP_INSTANCE_LOADS (instance)[0]; gimple stmt = SLP_TREE_SCALAR_STMTS (node)[0]; gimple first_load = GROUP_FIRST_ELEMENT (vinfo_for_stmt (stmt)); - vec<slp_tree> sorted_loads = vec<slp_tree>(); + vec<slp_tree> sorted_loads = vNULL; int index; slp_tree *tmp_loads = NULL; int group_size = SLP_INSTANCE_GROUP_SIZE (instance), i, j; @@ -1102,7 +1102,7 @@ vect_supported_slp_permutation_p (slp_instance instance) SLP_INSTANCE_LOADS (instance) = sorted_loads; free (tmp_loads); - if (!vect_transform_slp_perm_load (stmt, vec<tree>(), NULL, + if (!vect_transform_slp_perm_load (stmt, vNULL, NULL, SLP_INSTANCE_UNROLLING_FACTOR (instance), instance, true)) return false; @@ -1705,8 +1705,8 @@ vect_analyze_slp (loop_vec_info loop_vinfo, bb_vec_info bb_vinfo) { unsigned int i; vec<gimple> grouped_stores; - vec<gimple> reductions = vec<gimple>(); - vec<gimple> reduc_chains = vec<gimple>(); + vec<gimple> reductions = vNULL; + vec<gimple> reduc_chains = vNULL; gimple first_element; bool ok = false; |