Commit a0d33ff8 by Maxim Kuvyrkov Committed by Maxim Kuvyrkov

haifa-sched.c (extend_global): Split to extend_global_data and extend_region_data.

	* haifa-sched.c (extend_global): Split to extend_global_data and
	extend_region_data.  Update all uses.
	(extend_all): Rename to extend_block_data.

	* gcc.target/ia64/20080802-1.c: New test.

From-SVN: r138758
parent 07da1cfc
2008-08-06 Maxim Kuvyrkov <maxim@codesourcery.com> 2008-08-06 Maxim Kuvyrkov <maxim@codesourcery.com>
* haifa-sched.c (extend_global): Split to extend_global_data and
extend_region_data. Update all uses.
(extend_all): Rename to extend_block_data.
2008-08-06 Maxim Kuvyrkov <maxim@codesourcery.com>
* sched-rgn.c (new_ready): Check if instruction can be * sched-rgn.c (new_ready): Check if instruction can be
speculatively scheduled before attempting speculation. speculatively scheduled before attempting speculation.
(debug_rgn_dependencies): Remove wrongful assert. (debug_rgn_dependencies): Remove wrongful assert.
......
...@@ -544,8 +544,6 @@ static void change_queue_index (rtx, int); ...@@ -544,8 +544,6 @@ static void change_queue_index (rtx, int);
static void extend_h_i_d (void); static void extend_h_i_d (void);
static void extend_ready (int); static void extend_ready (int);
static void extend_global (rtx);
static void extend_all (rtx);
static void init_h_i_d (rtx); static void init_h_i_d (rtx);
static void generate_recovery_code (rtx); static void generate_recovery_code (rtx);
static void process_insn_forw_deps_be_in_spec (rtx, rtx, ds_t); static void process_insn_forw_deps_be_in_spec (rtx, rtx, ds_t);
...@@ -3188,36 +3186,45 @@ extend_ready (int n_new_insns) ...@@ -3188,36 +3186,45 @@ extend_ready (int n_new_insns)
choice_stack[i].state = xmalloc (dfa_state_size); choice_stack[i].state = xmalloc (dfa_state_size);
} }
/* Extend global scheduler structures (those, that live across calls to /* Extend global-scope scheduler data structures
schedule_block) to include information about just emitted INSN. */ (those, that live within one call to schedule_insns)
to include information about just emitted INSN. */
static void static void
extend_global (rtx insn) extend_global_data (rtx insn)
{ {
gcc_assert (INSN_P (insn)); gcc_assert (INSN_P (insn));
/* These structures have scheduler scope. */
/* Init h_i_d. */ /* Init h_i_d. */
extend_h_i_d (); extend_h_i_d ();
init_h_i_d (insn); init_h_i_d (insn);
/* Init data handled in sched-deps.c. */
sd_init_insn (insn);
/* Extend dependency caches by one element. */ /* Extend dependency caches by one element. */
extend_dependency_caches (1, false); extend_dependency_caches (1, false);
} }
/* Extends global and local scheduler structures to include information /* Extend global- and region-scope scheduler data structures
about just emitted INSN. */ (those, that live within one call to schedule_region)
to include information about just emitted INSN. */
static void
extend_region_data (rtx insn)
{
extend_global_data (insn);
/* Init dependency data. */
sd_init_insn (insn);
}
/* Extend global-, region- and block-scope scheduler data structures
(those, that live within one call to schedule_block)
to include information about just emitted INSN. */
static void static void
extend_all (rtx insn) extend_block_data (rtx insn)
{ {
extend_global (insn); extend_region_data (insn);
/* These structures have block scope. */ /* These structures have block scope. */
extend_ready (1); extend_ready (1);
(*current_sched_info->add_remove_insn) (insn, 0); (*current_sched_info->add_remove_insn) (insn, 0);
} }
...@@ -3391,7 +3398,7 @@ add_to_speculative_block (rtx insn) ...@@ -3391,7 +3398,7 @@ add_to_speculative_block (rtx insn)
rec = BLOCK_FOR_INSN (check); rec = BLOCK_FOR_INSN (check);
twin = emit_insn_before (copy_insn (PATTERN (insn)), BB_END (rec)); twin = emit_insn_before (copy_insn (PATTERN (insn)), BB_END (rec));
extend_global (twin); extend_region_data (twin);
sd_copy_back_deps (twin, insn, true); sd_copy_back_deps (twin, insn, true);
...@@ -3581,7 +3588,7 @@ init_before_recovery (void) ...@@ -3581,7 +3588,7 @@ init_before_recovery (void)
x = emit_jump_insn_after (gen_jump (label), BB_END (single)); x = emit_jump_insn_after (gen_jump (label), BB_END (single));
JUMP_LABEL (x) = label; JUMP_LABEL (x) = label;
LABEL_NUSES (label)++; LABEL_NUSES (label)++;
extend_global (x); extend_global_data (x);
emit_barrier_after (x); emit_barrier_after (x);
...@@ -3681,7 +3688,7 @@ create_check_block_twin (rtx insn, bool mutate_p) ...@@ -3681,7 +3688,7 @@ create_check_block_twin (rtx insn, bool mutate_p)
check = emit_insn_before (check, insn); check = emit_insn_before (check, insn);
/* Extend data structures. */ /* Extend data structures. */
extend_all (check); extend_block_data (check);
RECOVERY_BLOCK (check) = rec; RECOVERY_BLOCK (check) = rec;
if (sched_verbose && spec_info->dump) if (sched_verbose && spec_info->dump)
...@@ -3708,7 +3715,7 @@ create_check_block_twin (rtx insn, bool mutate_p) ...@@ -3708,7 +3715,7 @@ create_check_block_twin (rtx insn, bool mutate_p)
} }
twin = emit_insn_after (ORIG_PAT (insn), BB_END (rec)); twin = emit_insn_after (ORIG_PAT (insn), BB_END (rec));
extend_global (twin); extend_region_data (twin);
if (sched_verbose && spec_info->dump) if (sched_verbose && spec_info->dump)
/* INSN_BB (insn) isn't determined for twin insns yet. /* INSN_BB (insn) isn't determined for twin insns yet.
...@@ -3761,7 +3768,7 @@ create_check_block_twin (rtx insn, bool mutate_p) ...@@ -3761,7 +3768,7 @@ create_check_block_twin (rtx insn, bool mutate_p)
jump = emit_jump_insn_after (gen_jump (label), BB_END (rec)); jump = emit_jump_insn_after (gen_jump (label), BB_END (rec));
JUMP_LABEL (jump) = label; JUMP_LABEL (jump) = label;
LABEL_NUSES (label)++; LABEL_NUSES (label)++;
extend_global (jump); extend_region_data (jump);
if (BB_PARTITION (second_bb) != BB_PARTITION (rec)) if (BB_PARTITION (second_bb) != BB_PARTITION (rec))
/* Partition type is the same, if it is "unpartitioned". */ /* Partition type is the same, if it is "unpartitioned". */
......
2008-08-06 Maxim Kuvyrkov <maxim@codesourcery.com>
* gcc.target/ia64/20080802-1.c: New test.
2008-08-05 Andrew Pinski <andrew_pinski@playstation.sony.com> 2008-08-05 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR tree-opt/37024 PR tree-opt/37024
......
/* { dg-do compile } */
/* { dg-options "-O2 -msched-control-spec" } */
struct cpp_reader;
extern const char * parse_include (struct cpp_reader *, int *m, void *);
extern int _cpp_compare_file_date (struct cpp_reader *, const char *, int);
void
_cpp_init_internal_pragmas (struct cpp_reader *pfile)
{
const char *fname;
int angle_brackets, ordering;
fname = parse_include (pfile, &angle_brackets, (void *) 0);
if (!fname)
return;
ordering = _cpp_compare_file_date (pfile, fname, angle_brackets);
}
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