summaryrefslogtreecommitdiff
path: root/gcc/lcm.c
diff options
context:
space:
mode:
authoraj <aj@138bc75d-0d04-0410-961f-82ee72b054a4>2001-07-17 04:55:25 +0000
committeraj <aj@138bc75d-0d04-0410-961f-82ee72b054a4>2001-07-17 04:55:25 +0000
commit5ab08585daa4f6d571049baee701833f0760fc05 (patch)
treef456ad6c679005d9c61bd3b40403502f19d75172 /gcc/lcm.c
parenta0d38f0be40ac803ca2809f85ab98fce8137df5c (diff)
downloadgcc-5ab08585daa4f6d571049baee701833f0760fc05.tar.gz
* config/i386/unix.h (ASM_OUTPUT_MI_THUNK): Fix output format for
x86-64 pic support. * lcm.c (optimize_mode_switching): Avoid warning for unused variable if !NORMAL_MODE * flow.c (try_crossjump_to_edge): Remove unused variable. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44062 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lcm.c')
-rw-r--r--gcc/lcm.c63
1 files changed, 32 insertions, 31 deletions
diff --git a/gcc/lcm.c b/gcc/lcm.c
index 661e5b5153b..d90fd4f9680 100644
--- a/gcc/lcm.c
+++ b/gcc/lcm.c
@@ -19,7 +19,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* These routines are meant to be used by various optimization
- passes which can be modeled as lazy code motion problems.
+ passes which can be modeled as lazy code motion problems.
Including, but not limited to:
* Traditional partial redundancy elimination.
@@ -95,8 +95,8 @@ static void compute_rev_insert_delete PARAMS ((struct edge_list *edge_list,
/* Edge based lcm routines. */
-/* Compute expression anticipatability at entrance and exit of each block.
- This is done based on the flow graph, and not on the pred-succ lists.
+/* Compute expression anticipatability at entrance and exit of each block.
+ This is done based on the flow graph, and not on the pred-succ lists.
Other than that, its pretty much identical to compute_antinout. */
static void
@@ -128,7 +128,7 @@ compute_antinout_edge (antloc, transp, antin, antout)
*qin++ = BASIC_BLOCK (bb);
BASIC_BLOCK (bb)->aux = BASIC_BLOCK (bb);
}
-
+
qin = worklist;
qend = &worklist[n_basic_blocks];
qlen = n_basic_blocks;
@@ -189,7 +189,7 @@ compute_earliest (edge_list, n_exprs, antin, antout, avout, kill, earliest)
sbitmap *antin, *antout, *avout, *kill, *earliest;
{
sbitmap difference, temp_bitmap;
- int x, num_edges;
+ int x, num_edges;
basic_block pred, succ;
num_edges = NUM_EDGES (edge_list);
@@ -213,8 +213,8 @@ compute_earliest (edge_list, n_exprs, antin, antout, avout, kill, earliest)
sbitmap_zero (earliest[x]);
else
{
- sbitmap_difference (difference, antin[succ->index],
- avout[pred->index]);
+ sbitmap_difference (difference, antin[succ->index],
+ avout[pred->index]);
sbitmap_not (temp_bitmap, antout[pred->index]);
sbitmap_a_and_b_or_c (earliest[x], difference,
kill[pred->index], temp_bitmap);
@@ -254,7 +254,7 @@ compute_earliest (edge_list, n_exprs, antin, antout, avout, kill, earliest)
EXIT block are handled in the normal fashion inside the loop. However,
the insertion/deletion computation needs LATERIN(EXIT), so we have
to compute it. */
-
+
static void
compute_laterin (edge_list, earliest, antloc, later, laterin)
struct edge_list *edge_list;
@@ -369,7 +369,7 @@ compute_insert_delete (edge_list, antloc, later, laterin,
for (x = 0; x < n_basic_blocks; x++)
sbitmap_difference (delete[x], antloc[x], laterin[x]);
-
+
for (x = 0; x < NUM_EDGES (edge_list); x++)
{
basic_block b = INDEX_EDGE_SUCC_BB (edge_list, x);
@@ -490,7 +490,7 @@ pre_edge_lcm (file, n_exprs, transp, avloc, antloc, kill, insert, delete)
void
compute_available (avloc, kill, avout, avin)
- sbitmap *avloc, *kill, *avout, *avin;
+ sbitmap *avloc, *kill, *avout, *avin;
{
int bb;
edge e;
@@ -513,7 +513,7 @@ compute_available (avloc, kill, avout, avin)
*qin++ = BASIC_BLOCK (bb);
BASIC_BLOCK (bb)->aux = BASIC_BLOCK (bb);
}
-
+
qin = worklist;
qend = &worklist[n_basic_blocks];
qlen = n_basic_blocks;
@@ -571,14 +571,14 @@ compute_available (avloc, kill, avout, avin)
/* Compute the farthest vector for edge based lcm. */
static void
-compute_farthest (edge_list, n_exprs, st_avout, st_avin, st_antin,
+compute_farthest (edge_list, n_exprs, st_avout, st_avin, st_antin,
kill, farthest)
struct edge_list *edge_list;
int n_exprs;
sbitmap *st_avout, *st_avin, *st_antin, *kill, *farthest;
{
sbitmap difference, temp_bitmap;
- int x, num_edges;
+ int x, num_edges;
basic_block pred, succ;
num_edges = NUM_EDGES (edge_list);
@@ -598,10 +598,10 @@ compute_farthest (edge_list, n_exprs, st_avout, st_avin, st_antin,
sbitmap_zero (farthest[x]);
else
{
- sbitmap_difference (difference, st_avout[pred->index],
+ sbitmap_difference (difference, st_avout[pred->index],
st_antin[succ->index]);
sbitmap_not (temp_bitmap, st_avin[succ->index]);
- sbitmap_a_and_b_or_c (farthest[x], difference,
+ sbitmap_a_and_b_or_c (farthest[x], difference,
kill[succ->index], temp_bitmap);
}
}
@@ -656,7 +656,7 @@ compute_nearerout (edge_list, farthest, st_avloc, nearer, nearerout)
*tos++ = b;
b->aux = b;
}
-
+
/* Iterate until the worklist is empty. */
while (tos != worklist)
{
@@ -710,7 +710,7 @@ compute_rev_insert_delete (edge_list, st_avloc, nearer, nearerout,
for (x = 0; x < n_basic_blocks; x++)
sbitmap_difference (delete[x], st_avloc[x], nearerout[x]);
-
+
for (x = 0; x < NUM_EDGES (edge_list); x++)
{
basic_block b = INDEX_EDGE_PRED_BB (edge_list, x);
@@ -721,13 +721,13 @@ compute_rev_insert_delete (edge_list, st_avloc, nearer, nearerout,
}
}
-/* Given local properties TRANSP, ST_AVLOC, ST_ANTLOC, KILL return the
+/* Given local properties TRANSP, ST_AVLOC, ST_ANTLOC, KILL return the
insert and delete vectors for edge based reverse LCM. Returns an
edgelist which is used to map the insert vector to what edge
an expression should be inserted on. */
struct edge_list *
-pre_edge_rev_lcm (file, n_exprs, transp, st_avloc, st_antloc, kill,
+pre_edge_rev_lcm (file, n_exprs, transp, st_avloc, st_antloc, kill,
insert, delete)
FILE *file ATTRIBUTE_UNUSED;
int n_exprs;
@@ -783,7 +783,7 @@ pre_edge_rev_lcm (file, n_exprs, transp, st_avloc, st_antloc, kill,
/* Compute farthestness. */
farthest = sbitmap_vector_alloc (num_edges, n_exprs);
- compute_farthest (edge_list, n_exprs, st_avout, st_avin, st_antin,
+ compute_farthest (edge_list, n_exprs, st_avout, st_avin, st_antin,
kill, farthest);
#ifdef LCM_DEBUG_INFO
@@ -806,7 +806,7 @@ pre_edge_rev_lcm (file, n_exprs, transp, st_avloc, st_antloc, kill,
#ifdef LCM_DEBUG_INFO
if (file)
{
- dump_sbitmap_vector (file, "nearerout", "", nearerout,
+ dump_sbitmap_vector (file, "nearerout", "", nearerout,
n_basic_blocks + 1);
dump_sbitmap_vector (file, "nearer", "", nearer, num_edges);
}
@@ -855,13 +855,13 @@ pre_edge_rev_lcm (file, n_exprs, transp, st_avloc, st_antloc, kill,
More details are located in the code for optimize_mode_switching(). */
/* This structure contains the information for each insn which requires
- either single or double mode to be set.
+ either single or double mode to be set.
MODE is the mode this insn must be executed in.
INSN_PTR is the insn to be executed (may be the note that marks the
beginning of a basic block).
BBNUM is the flow graph basic block this insn occurs in.
NEXT is the next insn in the same basic block. */
-struct seginfo
+struct seginfo
{
int mode;
rtx insn_ptr;
@@ -914,7 +914,7 @@ new_seginfo (mode, insn, bb, regs_live)
return ptr;
}
-/* Add a seginfo element to the end of a list.
+/* Add a seginfo element to the end of a list.
HEAD is a pointer to the list beginning.
INFO is the structure to be linked in. */
@@ -1013,7 +1013,6 @@ optimize_mode_switching (file)
{
rtx insn;
int bb, e;
- edge eg;
int need_commit = 0;
sbitmap *kill;
struct edge_list *edge_list;
@@ -1087,7 +1086,7 @@ optimize_mode_switching (file)
REG_SET_TO_HARD_REG_SET (live_now,
BASIC_BLOCK (bb)->global_live_at_start);
- for (insn = BLOCK_HEAD (bb);
+ for (insn = BLOCK_HEAD (bb);
insn != NULL && insn != NEXT_INSN (BLOCK_END (bb));
insn = NEXT_INSN (insn))
{
@@ -1130,6 +1129,8 @@ optimize_mode_switching (file)
if (mode != no_mode)
{
+ edge eg;
+
for (eg = ENTRY_BLOCK_PTR->succ; eg; eg = eg->succ_next)
{
bb = eg->dest->index;
@@ -1175,7 +1176,7 @@ optimize_mode_switching (file)
{
int m = current_mode[j] = MODE_PRIORITY_TO_MODE (entity_map[j], i);
struct bb_info *info = bb_info[j];
-
+
for (bb = 0 ; bb < n_basic_blocks; bb++)
{
if (info[bb].seginfo->mode == m)
@@ -1281,7 +1282,7 @@ optimize_mode_switching (file)
VARRAY_POP (basic_block_info);
EXIT_BLOCK_PTR->index = EXIT_BLOCK;
#endif
-
+
/* Now output the remaining mode sets in all the segments. */
for (j = n_entities - 1; j >= 0; j--)
{
@@ -1322,7 +1323,7 @@ optimize_mode_switching (file)
insert_insn_on_edge (mode_set, eg);
}
}
-
+
}
#endif
@@ -1345,7 +1346,7 @@ optimize_mode_switching (file)
&& (NOTE_LINE_NUMBER (ptr->insn_ptr)
== NOTE_INSN_BASIC_BLOCK))
emit_block_insn_after (mode_set, ptr->insn_ptr,
- BASIC_BLOCK (ptr->bbnum));
+ BASIC_BLOCK (ptr->bbnum));
else
emit_block_insn_before (mode_set, ptr->insn_ptr,
BASIC_BLOCK (ptr->bbnum));
@@ -1359,7 +1360,7 @@ optimize_mode_switching (file)
}
/* Finished. Free up all the things we've allocated. */
-
+
sbitmap_vector_free (kill);
sbitmap_vector_free (antic);
sbitmap_vector_free (transp);