From b3bb64567494f669b77919d1be9c0e5034703083 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 17 Jul 2001 06:55:25 +0200 Subject: [PATCH] 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 --- gcc/ChangeLog | 18 +++++++++--- gcc/config/i386/unix.h | 2 +- gcc/flow.c | 1 - gcc/lcm.c | 63 +++++++++++++++++++++--------------------- 4 files changed, 47 insertions(+), 37 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ae9789bd0b4..47b29c5b889 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2001-07-17 Andreas Jaeger + + * 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 * 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 2001-07-16 Daniel Berlin - * gcse.c: Update comment at top. + * gcse.c: Update comment at top. Update comment on mem handling. mem_last_set, mem_first_set, mem_set_in_block: gone. Declaration of reg_set_info: gone. (oprs_unchanged_p): Don't use mem_*set_* anymore. They are pointless with load_killed_in_block_p (they are *more* 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 (free_gcse_mem): Don't free it, either. (record_last_mem_set_info): Update comment in front, remove @@ -85,13 +95,13 @@ Mon Jul 16 18:07:07 2001 J"orn Rennecke mem_*set_* references. (reset_opr_set_tables): Remove mem_*set_* references. (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). (expr_killed_p): Remove mem_set_in_block test. (compute_transp): Remove mem_set_in_block test. * 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 constant, and which uses were replaced in what insns to dump file. diff --git a/gcc/config/i386/unix.h b/gcc/config/i386/unix.h index 25dec9ab358..63c68cb4e42 100644 --- a/gcc/config/i386/unix.h +++ b/gcc/config/i386/unix.h @@ -128,7 +128,7 @@ do { \ { \ fprintf (FILE, "\tjmp *"); \ assemble_name (FILE, XSTR (XEXP (DECL_RTL (FUNCTION), 0), 0)); \ - fprintf (FILE, "@GOTPCREL(%RIP)\n"); \ + fprintf (FILE, "@GOTPCREL(%%RIP)\n"); \ } \ else \ { \ diff --git a/gcc/flow.c b/gcc/flow.c index a771ab4c3d1..6e6c2b61d0b 100644 --- a/gcc/flow.c +++ b/gcc/flow.c @@ -3452,7 +3452,6 @@ try_crossjump_to_edge (mode, e1, e2) rtx newpos1, newpos2; rtx first, last; edge s; - rtx note; rtx label; rtx barrier; 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); -- 2.30.2