diff options
author | Diego Novillo <dnovillo@google.com> | 2012-11-20 16:21:30 -0500 |
---|---|---|
committer | Diego Novillo <dnovillo@gcc.gnu.org> | 2012-11-20 16:21:30 -0500 |
commit | 6e1aa84836e166fbfb4b53ac004d1d63e03d9f05 (patch) | |
tree | df5dd32febb0dc65ea6ce7f725aab90791a1dbc4 /gcc/trans-mem.c | |
parent | b014e124e46edd418d02316ce4c65563d0568ad8 (diff) | |
download | gcc-6e1aa84836e166fbfb4b53ac004d1d63e03d9f05.zip gcc-6e1aa84836e166fbfb4b53ac004d1d63e03d9f05.tar.gz gcc-6e1aa84836e166fbfb4b53ac004d1d63e03d9f05.tar.bz2 |
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.
Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
From-SVN: r193677
Diffstat (limited to 'gcc/trans-mem.c')
-rw-r--r-- | gcc/trans-mem.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/gcc/trans-mem.c b/gcc/trans-mem.c index 79be8b9..0a428fe 100644 --- a/gcc/trans-mem.c +++ b/gcc/trans-mem.c @@ -1841,10 +1841,10 @@ tm_region_init (struct tm_region *region) edge_iterator ei; edge e; basic_block bb; - vec<basic_block> queue = vec<basic_block>(); + vec<basic_block> queue = vNULL; bitmap visited_blocks = BITMAP_ALLOC (NULL); struct tm_region *old_region; - vec<tm_region_p> bb_regions = vec<tm_region_p>(); + vec<tm_region_p> bb_regions = vNULL; all_tm_regions = region; bb = single_succ (ENTRY_BLOCK_PTR); @@ -2403,7 +2403,7 @@ get_tm_region_blocks (basic_block entry_block, bitmap all_region_blocks, bool stop_at_irrevocable_p) { - vec<basic_block> bbs = vec<basic_block>(); + vec<basic_block> bbs = vNULL; unsigned i; edge e; edge_iterator ei; @@ -4689,9 +4689,7 @@ ipa_tm_create_version (struct cgraph_node *old_node) if (DECL_ONE_ONLY (new_decl)) DECL_COMDAT_GROUP (new_decl) = tm_mangle (DECL_COMDAT_GROUP (old_decl)); - new_node = cgraph_copy_node_for_versioning (old_node, new_decl, - vec<cgraph_edge_p>(), - NULL); + new_node = cgraph_copy_node_for_versioning (old_node, new_decl, vNULL, NULL); new_node->symbol.externally_visible = old_node->symbol.externally_visible; new_node->lowered = true; new_node->tm_clone = 1; @@ -4980,7 +4978,7 @@ ipa_tm_transform_calls (struct cgraph_node *node, struct tm_region *region, bool need_ssa_rename = false; edge e; edge_iterator ei; - vec<basic_block> queue = vec<basic_block>(); + vec<basic_block> queue = vNULL; bitmap visited_blocks = BITMAP_ALLOC (NULL); queue.safe_push (bb); |