Commit 495333a6 by Jan Hubicka Committed by Jan Hubicka

i386.md (shift patterns): Use (TARGET_SHIFT1 || optimize_size) to decide whether…

i386.md (shift patterns): Use (TARGET_SHIFT1 || optimize_size) to decide whether emit the short opcode.


	* i386.md (shift patterns): Use (TARGET_SHIFT1 || optimize_size) to
	decide whether emit the short opcode.
	* i386.h (x86_shift1): Declare.
	(TARGET_SHIFT1): New macro.
	* i386.c (x86_shift1): New global variable.

	* toplev.c (rest_of_compilation): Call find_basic_block pre-loop unconditionally;
	make loop to rebuild CFG; kill unnecesary find_basic_block calls;
	kill compute_bb_for_insn call.
	* cfgbuild.c (find_basic_blocks): Kill compute_bb_for_insn call.
	* haifa-sched.c (sched_init): Likewise.
	* ssa-ccp.c (ssa_const_prop): Likewise.
	* ssa-dce.c (ssa_eliminate_dead_code): Likewise.

From-SVN: r54552
parent 8ddfd7e5
Wed Jun 12 16:45:13 CEST 2002 Jan Hubicka <jh@suse.cz>
* i386.md (shift patterns): Use (TARGET_SHIFT1 || optimize_size) to
decide whether emit the short opcode.
* i386.h (x86_shift1): Declare.
(TARGET_SHIFT1): New macro.
* i386.c (x86_shift1): New global variable.
* toplev.c (rest_of_compilation): Call find_basic_block pre-loop unconditionally;
make loop to rebuild CFG; kill unnecesary find_basic_block calls;
kill compute_bb_for_insn call.
* cfgbuild.c (find_basic_blocks): Kill compute_bb_for_insn call.
* haifa-sched.c (sched_init): Likewise.
* ssa-ccp.c (ssa_const_prop): Likewise.
* ssa-dce.c (ssa_eliminate_dead_code): Likewise.
2002-06-11 David S. Miller <davem@redhat.com>
* emit-rtl.c (emit_*_scope): Only access INSN_SCOPE if
......
......@@ -647,13 +647,6 @@ find_basic_blocks (f, nregs, file)
find_basic_blocks_1 (f);
/* Record the block to which an insn belongs. */
/* ??? This should be done another way, by which (perhaps) a label is
tagged directly with the basic block that it starts. It is used for
more than that currently, but IMO that is the only valid use. */
compute_bb_for_insn ();
/* Discover the edges of our cfg. */
make_edges (label_value_list, ENTRY_BLOCK_PTR->next_bb, EXIT_BLOCK_PTR->prev_bb, 0);
......
......@@ -394,6 +394,7 @@ const int x86_accumulate_outgoing_args = m_ATHLON | m_PENT4 | m_PPRO;
const int x86_prologue_using_move = m_ATHLON | m_PENT4 | m_PPRO;
const int x86_epilogue_using_move = m_ATHLON | m_PENT4 | m_PPRO;
const int x86_decompose_lea = m_PENT4;
const int x86_shift1 = ~m_486;
const int x86_arch_always_fancy_math_387 = m_PENT | m_PPRO | m_ATHLON | m_PENT4;
/* In case the avreage insn count for single function invocation is
......@@ -1834,6 +1835,10 @@ classify_argument (mode, type, classes, bit_offset)
return 1;
case V4SFmode:
case V4SImode:
case V16QImode:
case V8HImode:
case V2DFmode:
case V2DImode:
classes[0] = X86_64_SSE_CLASS;
classes[1] = X86_64_SSEUP_CLASS;
return 2;
......
......@@ -208,7 +208,7 @@ extern const int x86_add_esp_4, x86_add_esp_8, x86_sub_esp_4, x86_sub_esp_8;
extern const int x86_partial_reg_dependency, x86_memory_mismatch_stall;
extern const int x86_accumulate_outgoing_args, x86_prologue_using_move;
extern const int x86_epilogue_using_move, x86_decompose_lea;
extern const int x86_arch_always_fancy_math_387;
extern const int x86_arch_always_fancy_math_387, x86_shift1;
extern int x86_prefetch_sse;
#define TARGET_USE_LEAVE (x86_use_leave & CPUMASK)
......@@ -250,6 +250,7 @@ extern int x86_prefetch_sse;
#define TARGET_EPILOGUE_USING_MOVE (x86_epilogue_using_move & CPUMASK)
#define TARGET_DECOMPOSE_LEA (x86_decompose_lea & CPUMASK)
#define TARGET_PREFETCH_SSE (x86_prefetch_sse)
#define TARGET_SHIFT1 (x86_shift1 & CPUMASK)
#define TARGET_STACK_PROBE (target_flags & MASK_STACK_PROBE)
......
......@@ -2368,8 +2368,6 @@ sched_init (dump_file)
init_dependency_caches (luid);
compute_bb_for_insn ();
init_alias_analysis ();
if (write_symbols != NO_DEBUG)
......
......@@ -991,9 +991,6 @@ ssa_const_prop ()
df_analyse (df_analyzer, 0,
DF_RD_CHAIN | DF_RU_CHAIN | DF_REG_INFO | DF_HARD_REGS);
/* We need mappings from insn to its containing block. */
compute_bb_for_insn ();
/* Perform a quick and dirty dead code elimination pass. This is not
as aggressive as it could be, but it's good enough to clean up a
lot of unwanted junk and it is fast. */
......
......@@ -508,8 +508,6 @@ ssa_eliminate_dead_code ()
/* Prepare for use of BLOCK_NUM (). */
connect_infinite_loops_to_exit ();
/* Be careful not to clear the added edges. */
compute_bb_for_insn ();
/* Compute control dependence. */
pdom = (int *) xmalloc (last_basic_block * sizeof (int));
......
......@@ -2642,6 +2642,7 @@ rest_of_compilation (decl)
free_bb_for_insn ();
copy_loop_headers (insns);
purge_line_number_notes (insns);
find_basic_blocks (insns, max_reg_num (), rtl_dump_file);
timevar_pop (TV_JUMP);
close_dump_file (DFI_jump, print_rtl, insns);
......@@ -2662,7 +2663,6 @@ rest_of_compilation (decl)
timevar_push (TV_TO_SSA);
open_dump_file (DFI_ssa, decl);
find_basic_blocks (insns, max_reg_num (), rtl_dump_file);
cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_PRE_LOOP);
convert_to_ssa ();
......@@ -2717,8 +2717,6 @@ rest_of_compilation (decl)
timevar_pop (TV_FROM_SSA);
ggc_collect ();
/* CFG is no longer maintained up-to-date. */
free_bb_for_insn ();
}
timevar_push (TV_JUMP);
......@@ -2726,7 +2724,6 @@ rest_of_compilation (decl)
if (flag_delete_null_pointer_checks || flag_if_conversion)
{
open_dump_file (DFI_null, decl);
find_basic_blocks (insns, max_reg_num (), rtl_dump_file);
if (rtl_dump_file)
dump_flow_info (rtl_dump_file);
cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_PRE_LOOP);
......@@ -2745,8 +2742,6 @@ rest_of_compilation (decl)
maximum instruction UID, so if we can reduce the maximum UID
we'll save big on memory. */
renumber_insns (rtl_dump_file);
if (optimize)
compute_bb_for_insn ();
timevar_pop (TV_JUMP);
close_dump_file (DFI_jump, print_rtl_with_bb, insns);
......@@ -2794,7 +2789,6 @@ rest_of_compilation (decl)
/* The second pass of jump optimization is likely to have
removed a bunch more instructions. */
renumber_insns (rtl_dump_file);
compute_bb_for_insn ();
timevar_pop (TV_CSE);
close_dump_file (DFI_cse, print_rtl_with_bb, insns);
......@@ -2912,6 +2906,7 @@ rest_of_compilation (decl)
delete_trivially_dead_insns (insns, max_reg_num ());
close_dump_file (DFI_loop, print_rtl, insns);
timevar_pop (TV_LOOP);
find_basic_blocks (insns, max_reg_num (), rtl_dump_file);
ggc_collect ();
}
......@@ -2921,8 +2916,6 @@ rest_of_compilation (decl)
timevar_push (TV_FLOW);
open_dump_file (DFI_cfg, decl);
find_basic_blocks (insns, max_reg_num (), rtl_dump_file);
if (rtl_dump_file)
dump_flow_info (rtl_dump_file);
cleanup_cfg ((optimize ? CLEANUP_EXPENSIVE : 0)
......
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