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/ipa-cp.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/ipa-cp.c')
-rw-r--r-- | gcc/ipa-cp.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c index a0f5f5f085c..c22f63bf652 100644 --- a/gcc/ipa-cp.c +++ b/gcc/ipa-cp.c @@ -1575,7 +1575,7 @@ devirtualization_time_bonus (struct cgraph_node *node, tree target; target = ipa_get_indirect_edge_target (ie, known_csts, known_binfos, - vec<ipa_agg_jump_function_p>()); + vNULL); if (!target) continue; @@ -2248,9 +2248,7 @@ ipcp_discover_new_direct_edges (struct cgraph_node *node, tree target; next_ie = ie->next_callee; - target = ipa_get_indirect_edge_target (ie, known_vals, - vec<tree>(), - vec<ipa_agg_jump_function_p>()); + target = ipa_get_indirect_edge_target (ie, known_vals, vNULL, vNULL); if (target) { ipa_make_edge_direct_to_target (ie, target); @@ -2731,10 +2729,10 @@ find_more_scalar_values_for_callers_subset (struct cgraph_node *node, static vec<ipa_agg_jf_item_t> copy_plats_to_inter (struct ipcp_param_lattices *plats, HOST_WIDE_INT offset) { - vec<ipa_agg_jf_item_t> res = vec<ipa_agg_jf_item_t>(); + vec<ipa_agg_jf_item_t> res = vNULL; if (!plats->aggs || plats->aggs_contain_variable || plats->aggs_bottom) - return vec<ipa_agg_jf_item>(); + return vNULL; for (struct ipcp_agg_lattice *aglat = plats->aggs; aglat; aglat = aglat->next) if (ipa_lat_is_single_const (aglat)) @@ -2796,7 +2794,7 @@ static vec<ipa_agg_jf_item_t> agg_replacements_to_vector (struct cgraph_node *node, HOST_WIDE_INT offset) { struct ipa_agg_replacement_value *av; - vec<ipa_agg_jf_item_t> res = vec<ipa_agg_jf_item_t>(); + vec<ipa_agg_jf_item_t> res = vNULL; for (av = ipa_get_agg_replacements_for_node (node); av; av = av->next) { @@ -2874,7 +2872,7 @@ find_aggregate_values_for_callers_subset (struct cgraph_node *node, for (i = 0; i < count ; i++) { struct cgraph_edge *cs; - vec<ipa_agg_jf_item_t> inter = vec<ipa_agg_jf_item_t>(); + vec<ipa_agg_jf_item_t> inter = vNULL; struct ipa_agg_jf_item *item; int j; @@ -3283,7 +3281,7 @@ decide_whether_version_node (struct cgraph_node *node) struct ipa_node_params *info = IPA_NODE_REF (node); int i, count = ipa_get_param_count (info); vec<tree> known_csts, known_binfos; - vec<ipa_agg_jump_function_t> known_aggs = vec<ipa_agg_jump_function_t>(); + vec<ipa_agg_jump_function_t> known_aggs = vNULL; bool ret = false; if (count == 0) |