Commit b3bb6456 by Andreas Jaeger

unix.h (ASM_OUTPUT_MI_THUNK): Fix output format for x86-64 pic support.

        * 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.

From-SVN: r44062
parent b8d0bbf7
2001-07-17 Andreas Jaeger <aj@suse.de>
* 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.
2001-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca> 2001-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
* inclhack.def (ultrix_atexit_param): New hack to fix ultrix 4.3 * inclhack.def (ultrix_atexit_param): New hack to fix ultrix 4.3
...@@ -68,14 +78,14 @@ Mon Jul 16 18:07:07 2001 J"orn Rennecke <amylaar@redhat.com> ...@@ -68,14 +78,14 @@ Mon Jul 16 18:07:07 2001 J"orn Rennecke <amylaar@redhat.com>
2001-07-16 Daniel Berlin <dan@cgsoftware.com> 2001-07-16 Daniel Berlin <dan@cgsoftware.com>
* gcse.c: Update comment at top. * gcse.c: Update comment at top.
Update comment on mem handling. Update comment on mem handling.
mem_last_set, mem_first_set, mem_set_in_block: gone. mem_last_set, mem_first_set, mem_set_in_block: gone.
Declaration of reg_set_info: gone. Declaration of reg_set_info: gone.
(oprs_unchanged_p): Don't use mem_*set_* anymore. They are (oprs_unchanged_p): Don't use mem_*set_* anymore. They are
pointless with load_killed_in_block_p (they are *more* pointless with load_killed_in_block_p (they are *more*
conservative then it, not less, and less accurate). conservative then it, not less, and less accurate).
(oprs_not_set_p): Ditto. (oprs_not_set_p): Ditto.
(alloc_gcse_mem): Don't allocate mem_set_in_block (alloc_gcse_mem): Don't allocate mem_set_in_block
(free_gcse_mem): Don't free it, either. (free_gcse_mem): Don't free it, either.
(record_last_mem_set_info): Update comment in front, remove (record_last_mem_set_info): Update comment in front, remove
...@@ -85,13 +95,13 @@ Mon Jul 16 18:07:07 2001 J"orn Rennecke <amylaar@redhat.com> ...@@ -85,13 +95,13 @@ Mon Jul 16 18:07:07 2001 J"orn Rennecke <amylaar@redhat.com>
mem_*set_* references. mem_*set_* references.
(reset_opr_set_tables): Remove mem_*set_* references. (reset_opr_set_tables): Remove mem_*set_* references.
(mark_call): Ditto. (mark_call): Ditto.
(mark_set): Ditto. Also remove double sets of bitmaps for REG's. (mark_set): Ditto. Also remove double sets of bitmaps for REG's.
(mark_clobber): Ditto (on both parts, we double set here too). (mark_clobber): Ditto (on both parts, we double set here too).
(expr_killed_p): Remove mem_set_in_block test. (expr_killed_p): Remove mem_set_in_block test.
(compute_transp): Remove mem_set_in_block test. (compute_transp): Remove mem_set_in_block test.
* ssa-ccp.c: (optimize_unexecutable_edges): Add note about removal * ssa-ccp.c: (optimize_unexecutable_edges): Add note about removal
of edge, and removal of phi alternative to dump file. of edge, and removal of phi alternative to dump file.
(ssa_ccp_substitute_constants): Add note about register now being (ssa_ccp_substitute_constants): Add note about register now being
constant, and which uses were replaced in what insns to dump file. constant, and which uses were replaced in what insns to dump file.
......
...@@ -128,7 +128,7 @@ do { \ ...@@ -128,7 +128,7 @@ do { \
{ \ { \
fprintf (FILE, "\tjmp *"); \ fprintf (FILE, "\tjmp *"); \
assemble_name (FILE, XSTR (XEXP (DECL_RTL (FUNCTION), 0), 0)); \ assemble_name (FILE, XSTR (XEXP (DECL_RTL (FUNCTION), 0), 0)); \
fprintf (FILE, "@GOTPCREL(%RIP)\n"); \ fprintf (FILE, "@GOTPCREL(%%RIP)\n"); \
} \ } \
else \ else \
{ \ { \
......
...@@ -3452,7 +3452,6 @@ try_crossjump_to_edge (mode, e1, e2) ...@@ -3452,7 +3452,6 @@ try_crossjump_to_edge (mode, e1, e2)
rtx newpos1, newpos2; rtx newpos1, newpos2;
rtx first, last; rtx first, last;
edge s; edge s;
rtx note;
rtx label; rtx label;
rtx barrier; rtx barrier;
......
...@@ -19,7 +19,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, ...@@ -19,7 +19,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
/* These routines are meant to be used by various optimization /* 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: Including, but not limited to:
* Traditional partial redundancy elimination. * Traditional partial redundancy elimination.
...@@ -95,8 +95,8 @@ static void compute_rev_insert_delete PARAMS ((struct edge_list *edge_list, ...@@ -95,8 +95,8 @@ static void compute_rev_insert_delete PARAMS ((struct edge_list *edge_list,
/* Edge based lcm routines. */ /* Edge based lcm routines. */
/* Compute expression anticipatability at entrance and exit of each block. /* 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. 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. */ Other than that, its pretty much identical to compute_antinout. */
static void static void
...@@ -128,7 +128,7 @@ compute_antinout_edge (antloc, transp, antin, antout) ...@@ -128,7 +128,7 @@ compute_antinout_edge (antloc, transp, antin, antout)
*qin++ = BASIC_BLOCK (bb); *qin++ = BASIC_BLOCK (bb);
BASIC_BLOCK (bb)->aux = BASIC_BLOCK (bb); BASIC_BLOCK (bb)->aux = BASIC_BLOCK (bb);
} }
qin = worklist; qin = worklist;
qend = &worklist[n_basic_blocks]; qend = &worklist[n_basic_blocks];
qlen = n_basic_blocks; qlen = n_basic_blocks;
...@@ -189,7 +189,7 @@ compute_earliest (edge_list, n_exprs, antin, antout, avout, kill, earliest) ...@@ -189,7 +189,7 @@ compute_earliest (edge_list, n_exprs, antin, antout, avout, kill, earliest)
sbitmap *antin, *antout, *avout, *kill, *earliest; sbitmap *antin, *antout, *avout, *kill, *earliest;
{ {
sbitmap difference, temp_bitmap; sbitmap difference, temp_bitmap;
int x, num_edges; int x, num_edges;
basic_block pred, succ; basic_block pred, succ;
num_edges = NUM_EDGES (edge_list); num_edges = NUM_EDGES (edge_list);
...@@ -213,8 +213,8 @@ compute_earliest (edge_list, n_exprs, antin, antout, avout, kill, earliest) ...@@ -213,8 +213,8 @@ compute_earliest (edge_list, n_exprs, antin, antout, avout, kill, earliest)
sbitmap_zero (earliest[x]); sbitmap_zero (earliest[x]);
else else
{ {
sbitmap_difference (difference, antin[succ->index], sbitmap_difference (difference, antin[succ->index],
avout[pred->index]); avout[pred->index]);
sbitmap_not (temp_bitmap, antout[pred->index]); sbitmap_not (temp_bitmap, antout[pred->index]);
sbitmap_a_and_b_or_c (earliest[x], difference, sbitmap_a_and_b_or_c (earliest[x], difference,
kill[pred->index], temp_bitmap); kill[pred->index], temp_bitmap);
...@@ -254,7 +254,7 @@ compute_earliest (edge_list, n_exprs, antin, antout, avout, kill, earliest) ...@@ -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, EXIT block are handled in the normal fashion inside the loop. However,
the insertion/deletion computation needs LATERIN(EXIT), so we have the insertion/deletion computation needs LATERIN(EXIT), so we have
to compute it. */ to compute it. */
static void static void
compute_laterin (edge_list, earliest, antloc, later, laterin) compute_laterin (edge_list, earliest, antloc, later, laterin)
struct edge_list *edge_list; struct edge_list *edge_list;
...@@ -369,7 +369,7 @@ compute_insert_delete (edge_list, antloc, later, laterin, ...@@ -369,7 +369,7 @@ compute_insert_delete (edge_list, antloc, later, laterin,
for (x = 0; x < n_basic_blocks; x++) for (x = 0; x < n_basic_blocks; x++)
sbitmap_difference (delete[x], antloc[x], laterin[x]); sbitmap_difference (delete[x], antloc[x], laterin[x]);
for (x = 0; x < NUM_EDGES (edge_list); x++) for (x = 0; x < NUM_EDGES (edge_list); x++)
{ {
basic_block b = INDEX_EDGE_SUCC_BB (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) ...@@ -490,7 +490,7 @@ pre_edge_lcm (file, n_exprs, transp, avloc, antloc, kill, insert, delete)
void void
compute_available (avloc, kill, avout, avin) compute_available (avloc, kill, avout, avin)
sbitmap *avloc, *kill, *avout, *avin; sbitmap *avloc, *kill, *avout, *avin;
{ {
int bb; int bb;
edge e; edge e;
...@@ -513,7 +513,7 @@ compute_available (avloc, kill, avout, avin) ...@@ -513,7 +513,7 @@ compute_available (avloc, kill, avout, avin)
*qin++ = BASIC_BLOCK (bb); *qin++ = BASIC_BLOCK (bb);
BASIC_BLOCK (bb)->aux = BASIC_BLOCK (bb); BASIC_BLOCK (bb)->aux = BASIC_BLOCK (bb);
} }
qin = worklist; qin = worklist;
qend = &worklist[n_basic_blocks]; qend = &worklist[n_basic_blocks];
qlen = n_basic_blocks; qlen = n_basic_blocks;
...@@ -571,14 +571,14 @@ compute_available (avloc, kill, avout, avin) ...@@ -571,14 +571,14 @@ compute_available (avloc, kill, avout, avin)
/* Compute the farthest vector for edge based lcm. */ /* Compute the farthest vector for edge based lcm. */
static void 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) kill, farthest)
struct edge_list *edge_list; struct edge_list *edge_list;
int n_exprs; int n_exprs;
sbitmap *st_avout, *st_avin, *st_antin, *kill, *farthest; sbitmap *st_avout, *st_avin, *st_antin, *kill, *farthest;
{ {
sbitmap difference, temp_bitmap; sbitmap difference, temp_bitmap;
int x, num_edges; int x, num_edges;
basic_block pred, succ; basic_block pred, succ;
num_edges = NUM_EDGES (edge_list); num_edges = NUM_EDGES (edge_list);
...@@ -598,10 +598,10 @@ compute_farthest (edge_list, n_exprs, st_avout, st_avin, st_antin, ...@@ -598,10 +598,10 @@ compute_farthest (edge_list, n_exprs, st_avout, st_avin, st_antin,
sbitmap_zero (farthest[x]); sbitmap_zero (farthest[x]);
else else
{ {
sbitmap_difference (difference, st_avout[pred->index], sbitmap_difference (difference, st_avout[pred->index],
st_antin[succ->index]); st_antin[succ->index]);
sbitmap_not (temp_bitmap, st_avin[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); kill[succ->index], temp_bitmap);
} }
} }
...@@ -656,7 +656,7 @@ compute_nearerout (edge_list, farthest, st_avloc, nearer, nearerout) ...@@ -656,7 +656,7 @@ compute_nearerout (edge_list, farthest, st_avloc, nearer, nearerout)
*tos++ = b; *tos++ = b;
b->aux = b; b->aux = b;
} }
/* Iterate until the worklist is empty. */ /* Iterate until the worklist is empty. */
while (tos != worklist) while (tos != worklist)
{ {
...@@ -710,7 +710,7 @@ compute_rev_insert_delete (edge_list, st_avloc, nearer, nearerout, ...@@ -710,7 +710,7 @@ compute_rev_insert_delete (edge_list, st_avloc, nearer, nearerout,
for (x = 0; x < n_basic_blocks; x++) for (x = 0; x < n_basic_blocks; x++)
sbitmap_difference (delete[x], st_avloc[x], nearerout[x]); sbitmap_difference (delete[x], st_avloc[x], nearerout[x]);
for (x = 0; x < NUM_EDGES (edge_list); x++) for (x = 0; x < NUM_EDGES (edge_list); x++)
{ {
basic_block b = INDEX_EDGE_PRED_BB (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, ...@@ -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 insert and delete vectors for edge based reverse LCM. Returns an
edgelist which is used to map the insert vector to what edge edgelist which is used to map the insert vector to what edge
an expression should be inserted on. */ an expression should be inserted on. */
struct edge_list * 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) insert, delete)
FILE *file ATTRIBUTE_UNUSED; FILE *file ATTRIBUTE_UNUSED;
int n_exprs; int n_exprs;
...@@ -783,7 +783,7 @@ pre_edge_rev_lcm (file, n_exprs, transp, st_avloc, st_antloc, kill, ...@@ -783,7 +783,7 @@ pre_edge_rev_lcm (file, n_exprs, transp, st_avloc, st_antloc, kill,
/* Compute farthestness. */ /* Compute farthestness. */
farthest = sbitmap_vector_alloc (num_edges, n_exprs); 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); kill, farthest);
#ifdef LCM_DEBUG_INFO #ifdef LCM_DEBUG_INFO
...@@ -806,7 +806,7 @@ pre_edge_rev_lcm (file, n_exprs, transp, st_avloc, st_antloc, kill, ...@@ -806,7 +806,7 @@ pre_edge_rev_lcm (file, n_exprs, transp, st_avloc, st_antloc, kill,
#ifdef LCM_DEBUG_INFO #ifdef LCM_DEBUG_INFO
if (file) if (file)
{ {
dump_sbitmap_vector (file, "nearerout", "", nearerout, dump_sbitmap_vector (file, "nearerout", "", nearerout,
n_basic_blocks + 1); n_basic_blocks + 1);
dump_sbitmap_vector (file, "nearer", "", nearer, num_edges); 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, ...@@ -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(). */ More details are located in the code for optimize_mode_switching(). */
/* This structure contains the information for each insn which requires /* 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. 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 INSN_PTR is the insn to be executed (may be the note that marks the
beginning of a basic block). beginning of a basic block).
BBNUM is the flow graph basic block this insn occurs in. BBNUM is the flow graph basic block this insn occurs in.
NEXT is the next insn in the same basic block. */ NEXT is the next insn in the same basic block. */
struct seginfo struct seginfo
{ {
int mode; int mode;
rtx insn_ptr; rtx insn_ptr;
...@@ -914,7 +914,7 @@ new_seginfo (mode, insn, bb, regs_live) ...@@ -914,7 +914,7 @@ new_seginfo (mode, insn, bb, regs_live)
return ptr; 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. HEAD is a pointer to the list beginning.
INFO is the structure to be linked in. */ INFO is the structure to be linked in. */
...@@ -1013,7 +1013,6 @@ optimize_mode_switching (file) ...@@ -1013,7 +1013,6 @@ optimize_mode_switching (file)
{ {
rtx insn; rtx insn;
int bb, e; int bb, e;
edge eg;
int need_commit = 0; int need_commit = 0;
sbitmap *kill; sbitmap *kill;
struct edge_list *edge_list; struct edge_list *edge_list;
...@@ -1087,7 +1086,7 @@ optimize_mode_switching (file) ...@@ -1087,7 +1086,7 @@ optimize_mode_switching (file)
REG_SET_TO_HARD_REG_SET (live_now, REG_SET_TO_HARD_REG_SET (live_now,
BASIC_BLOCK (bb)->global_live_at_start); 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 != NULL && insn != NEXT_INSN (BLOCK_END (bb));
insn = NEXT_INSN (insn)) insn = NEXT_INSN (insn))
{ {
...@@ -1130,6 +1129,8 @@ optimize_mode_switching (file) ...@@ -1130,6 +1129,8 @@ optimize_mode_switching (file)
if (mode != no_mode) if (mode != no_mode)
{ {
edge eg;
for (eg = ENTRY_BLOCK_PTR->succ; eg; eg = eg->succ_next) for (eg = ENTRY_BLOCK_PTR->succ; eg; eg = eg->succ_next)
{ {
bb = eg->dest->index; bb = eg->dest->index;
...@@ -1175,7 +1176,7 @@ optimize_mode_switching (file) ...@@ -1175,7 +1176,7 @@ optimize_mode_switching (file)
{ {
int m = current_mode[j] = MODE_PRIORITY_TO_MODE (entity_map[j], i); int m = current_mode[j] = MODE_PRIORITY_TO_MODE (entity_map[j], i);
struct bb_info *info = bb_info[j]; struct bb_info *info = bb_info[j];
for (bb = 0 ; bb < n_basic_blocks; bb++) for (bb = 0 ; bb < n_basic_blocks; bb++)
{ {
if (info[bb].seginfo->mode == m) if (info[bb].seginfo->mode == m)
...@@ -1281,7 +1282,7 @@ optimize_mode_switching (file) ...@@ -1281,7 +1282,7 @@ optimize_mode_switching (file)
VARRAY_POP (basic_block_info); VARRAY_POP (basic_block_info);
EXIT_BLOCK_PTR->index = EXIT_BLOCK; EXIT_BLOCK_PTR->index = EXIT_BLOCK;
#endif #endif
/* Now output the remaining mode sets in all the segments. */ /* Now output the remaining mode sets in all the segments. */
for (j = n_entities - 1; j >= 0; j--) for (j = n_entities - 1; j >= 0; j--)
{ {
...@@ -1322,7 +1323,7 @@ optimize_mode_switching (file) ...@@ -1322,7 +1323,7 @@ optimize_mode_switching (file)
insert_insn_on_edge (mode_set, eg); insert_insn_on_edge (mode_set, eg);
} }
} }
} }
#endif #endif
...@@ -1345,7 +1346,7 @@ optimize_mode_switching (file) ...@@ -1345,7 +1346,7 @@ optimize_mode_switching (file)
&& (NOTE_LINE_NUMBER (ptr->insn_ptr) && (NOTE_LINE_NUMBER (ptr->insn_ptr)
== NOTE_INSN_BASIC_BLOCK)) == NOTE_INSN_BASIC_BLOCK))
emit_block_insn_after (mode_set, ptr->insn_ptr, emit_block_insn_after (mode_set, ptr->insn_ptr,
BASIC_BLOCK (ptr->bbnum)); BASIC_BLOCK (ptr->bbnum));
else else
emit_block_insn_before (mode_set, ptr->insn_ptr, emit_block_insn_before (mode_set, ptr->insn_ptr,
BASIC_BLOCK (ptr->bbnum)); BASIC_BLOCK (ptr->bbnum));
...@@ -1359,7 +1360,7 @@ optimize_mode_switching (file) ...@@ -1359,7 +1360,7 @@ optimize_mode_switching (file)
} }
/* Finished. Free up all the things we've allocated. */ /* Finished. Free up all the things we've allocated. */
sbitmap_vector_free (kill); sbitmap_vector_free (kill);
sbitmap_vector_free (antic); sbitmap_vector_free (antic);
sbitmap_vector_free (transp); sbitmap_vector_free (transp);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment