aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-outof-ssa.c
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2018-11-13 20:05:03 +0000
committerDavid Malcolm <dmalcolm@gcc.gnu.org>2018-11-13 20:05:03 +0000
commit620e594be58d2f933902a6619fd20aa618070b4b (patch)
tree18b833ac960291d05524d5994ae4292048632226 /gcc/tree-outof-ssa.c
parentf9731de3db4c59ff0a241ce2c3d6f80aca5b5c28 (diff)
downloadgcc-620e594be58d2f933902a6619fd20aa618070b4b.zip
gcc-620e594be58d2f933902a6619fd20aa618070b4b.tar.gz
gcc-620e594be58d2f933902a6619fd20aa618070b4b.tar.bz2
Eliminate source_location in favor of location_t
Historically GCC used location_t, while libcpp used source_location. This inconsistency has been annoying me for a while, so this patch removes source_location in favor of location_t throughout (as the latter is shorter). gcc/ChangeLog: * builtins.c: Replace "source_location" with "location_t". * diagnostic-show-locus.c: Likewise. * diagnostic.c: Likewise. * dumpfile.c: Likewise. * gcc-rich-location.h: Likewise. * genmatch.c: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * input.c: Likewise. * input.h: Likewise. Eliminate the typedef. * omp-expand.c: Likewise. * selftest.h: Likewise. * substring-locations.h (get_source_location_for_substring): Rename to.. (get_location_within_string): ...this. * tree-cfg.c: Replace "source_location" with "location_t". * tree-cfgcleanup.c: Likewise. * tree-diagnostic.c: Likewise. * tree-into-ssa.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-phinodes.c: Likewise. * tree-phinodes.h: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa.c: Likewise. * tree-ssa.h: Likewise. * tree-vect-loop-manip.c: Likewise. gcc/c-family/ChangeLog: * c-common.c (c_get_substring_location): Update for renaming of get_source_location_for_substring to get_location_within_string. * c-lex.c: Replace "source_location" with "location_t". * c-opts.c: Likewise. * c-ppoutput.c: Likewise. gcc/c/ChangeLog: * c-decl.c: Replace "source_location" with "location_t". * c-tree.h: Likewise. * c-typeck.c: Likewise. * gimple-parser.c: Likewise. gcc/cp/ChangeLog: * call.c: Replace "source_location" with "location_t". * cp-tree.h: Likewise. * cvt.c: Likewise. * name-lookup.c: Likewise. * parser.c: Likewise. * typeck.c: Likewise. gcc/fortran/ChangeLog: * cpp.c: Replace "source_location" with "location_t". * gfortran.h: Likewise. gcc/go/ChangeLog: * go-gcc-diagnostics.cc: Replace "source_location" with "location_t". * go-gcc.cc: Likewise. * go-linemap.cc: Likewise. * go-location.h: Likewise. * gofrontend/README: Likewise. gcc/jit/ChangeLog: * jit-playback.c: Replace "source_location" with "location_t". gcc/testsuite/ChangeLog: * g++.dg/plugin/comment_plugin.c: Replace "source_location" with "location_t". * gcc.dg/plugin/diagnostic_plugin_test_show_locus.c: Likewise. libcc1/ChangeLog: * libcc1plugin.cc: Replace "source_location" with "location_t". (plugin_context::get_source_location): Rename to... (plugin_context::get_location_t): ...this. * libcp1plugin.cc: Likewise. libcpp/ChangeLog: * charset.c: Replace "source_location" with "location_t". * directives-only.c: Likewise. * directives.c: Likewise. * errors.c: Likewise. * expr.c: Likewise. * files.c: Likewise. * include/cpplib.h: Likewise. Rename MAX_SOURCE_LOCATION to MAX_LOCATION_T. * include/line-map.h: Likewise. * init.c: Likewise. * internal.h: Likewise. * lex.c: Likewise. * line-map.c: Likewise. * location-example.txt: Likewise. * macro.c: Likewise. * pch.c: Likewise. * traditional.c: Likewise. From-SVN: r266085
Diffstat (limited to 'gcc/tree-outof-ssa.c')
-rw-r--r--gcc/tree-outof-ssa.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/gcc/tree-outof-ssa.c b/gcc/tree-outof-ssa.c
index 60f3c40..5d8f9a1 100644
--- a/gcc/tree-outof-ssa.c
+++ b/gcc/tree-outof-ssa.c
@@ -143,7 +143,7 @@ struct elim_graph
auto_vec<int> edge_list;
/* Source locus on each edge */
- auto_vec<source_location> edge_locus;
+ auto_vec<location_t> edge_locus;
/* Visited vector. */
auto_sbitmap visited;
@@ -162,7 +162,7 @@ struct elim_graph
auto_vec<tree> const_copies;
/* Source locations for any constant copies. */
- auto_vec<source_location> copy_locus;
+ auto_vec<location_t> copy_locus;
};
@@ -238,7 +238,7 @@ emit_partition_copy (rtx dest, rtx src, int unsignedsrcp, tree sizeexp)
/* Insert a copy instruction from partition SRC to DEST onto edge E. */
static void
-insert_partition_copy_on_edge (edge e, int dest, int src, source_location locus)
+insert_partition_copy_on_edge (edge e, int dest, int src, location_t locus)
{
tree var;
if (dump_file && (dump_flags & TDF_DETAILS))
@@ -272,7 +272,7 @@ insert_partition_copy_on_edge (edge e, int dest, int src, source_location locus)
onto edge E. */
static void
-insert_value_copy_on_edge (edge e, int dest, tree src, source_location locus)
+insert_value_copy_on_edge (edge e, int dest, tree src, location_t locus)
{
rtx dest_rtx, seq, x;
machine_mode dest_mode, src_mode;
@@ -333,7 +333,7 @@ insert_value_copy_on_edge (edge e, int dest, tree src, source_location locus)
static void
insert_rtx_to_part_on_edge (edge e, int dest, rtx src, int unsignedsrcp,
- source_location locus)
+ location_t locus)
{
if (dump_file && (dump_flags & TDF_DETAILS))
{
@@ -367,7 +367,7 @@ insert_rtx_to_part_on_edge (edge e, int dest, rtx src, int unsignedsrcp,
onto edge E. */
static void
-insert_part_to_rtx_on_edge (edge e, rtx dest, int src, source_location locus)
+insert_part_to_rtx_on_edge (edge e, rtx dest, int src, location_t locus)
{
tree var;
if (dump_file && (dump_flags & TDF_DETAILS))
@@ -444,7 +444,7 @@ elim_graph_add_node (elim_graph *g, int node)
/* Add the edge PRED->SUCC to graph G. */
static inline void
-elim_graph_add_edge (elim_graph *g, int pred, int succ, source_location locus)
+elim_graph_add_edge (elim_graph *g, int pred, int succ, location_t locus)
{
g->edge_list.safe_push (pred);
g->edge_list.safe_push (succ);
@@ -456,7 +456,7 @@ elim_graph_add_edge (elim_graph *g, int pred, int succ, source_location locus)
return the successor node. -1 is returned if there is no such edge. */
static inline int
-elim_graph_remove_succ_edge (elim_graph *g, int node, source_location *locus)
+elim_graph_remove_succ_edge (elim_graph *g, int node, location_t *locus)
{
int y;
unsigned x;
@@ -556,7 +556,7 @@ eliminate_build (elim_graph *g)
for (gsi = gsi_start_phis (g->e->dest); !gsi_end_p (gsi); gsi_next (&gsi))
{
gphi *phi = gsi.phi ();
- source_location locus;
+ location_t locus;
p0 = var_to_partition (g->map, gimple_phi_result (phi));
/* Ignore results which are not in partitions. */
@@ -597,7 +597,7 @@ static void
elim_forward (elim_graph *g, int T)
{
int S;
- source_location locus;
+ location_t locus;
bitmap_set_bit (g->visited, T);
FOR_EACH_ELIM_GRAPH_SUCC (g, T, S, locus,
@@ -615,7 +615,7 @@ static int
elim_unvisited_predecessor (elim_graph *g, int T)
{
int P;
- source_location locus;
+ location_t locus;
FOR_EACH_ELIM_GRAPH_PRED (g, T, P, locus,
{
@@ -631,7 +631,7 @@ static void
elim_backward (elim_graph *g, int T)
{
int P;
- source_location locus;
+ location_t locus;
bitmap_set_bit (g->visited, T);
FOR_EACH_ELIM_GRAPH_PRED (g, T, P, locus,
@@ -666,7 +666,7 @@ static void
elim_create (elim_graph *g, int T)
{
int P, S;
- source_location locus;
+ location_t locus;
if (elim_unvisited_predecessor (g, T))
{
@@ -741,7 +741,7 @@ eliminate_phi (edge e, elim_graph *g)
{
int dest;
tree src;
- source_location locus;
+ location_t locus;
src = g->const_copies.pop ();
dest = g->const_dests.pop ();