From dae424695cc2848b137d7fd1ef7d375928101347 Mon Sep 17 00:00:00 2001 From: Steven Bosscher Date: Fri, 9 Jul 2004 22:42:43 +0000 Subject: [PATCH] md.texi (Processor pipeline description): Mention that the old pipeline description is deprecated. * doc/md.texi (Processor pipeline description): Mention that the old pipeline description is deprecated. * config/rs6000/7450.md (automaton ppc7450): Split up, move mciu_7450 function unit to... (automaton ppc7450mciu): ...new automaton. * haifa-sched.c (insert_schedule_bubbles_p): Remove. (schedule_block): Don't consider inserting bubbles. (sched_init): Don't initialize DFA bubbles. * target-def.h (TARGET_SCHED_INIT_DFA_BUBBLES, TARGET_SCHED_DFA_BUBBLE): Remove. * target.h (init_dfa_bubbles, dfa_bubble): Remove hooks. * doc/tm.texi (TARGET_SCHED_INIT_DFA_BUBBLES, TARGET_SCHED_DFA_BUBBLE): Remove documentation. * stmt.c (conditional_context): Remove prototype. * tree.h (conditional_context): Remove. * tree-cfg.c (pre_insert_on_edge): Remove. * c-common.h (c_expand_asm_operands): Remove prototype. * c-typeck.c (c_expand_asm_operands): Remove. cp/ * typeck.c (c_expand_asm_operands): Remove. From-SVN: r84411 --- gcc/ChangeLog | 29 ++++++++++++++-- gcc/c-common.h | 2 -- gcc/c-typeck.c | 59 ------------------------------- gcc/config/rs6000/7450.md | 5 +-- gcc/cp/ChangeLog | 4 +++ gcc/cp/typeck.c | 57 ------------------------------ gcc/doc/md.texi | 29 ++++++---------- gcc/doc/tm.texi | 35 ------------------- gcc/haifa-sched.c | 73 --------------------------------------- gcc/stmt.c | 10 ------ gcc/target-def.h | 4 --- gcc/target.h | 12 ------- gcc/tree-cfg.c | 21 ----------- gcc/tree.h | 1 - 14 files changed, 45 insertions(+), 296 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2486648f955..c234ec956ff 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,4 +1,29 @@ -2004-04-09 Jan Beulich +2004-07-09 Steven Bosscher + + * doc/md.texi (Processor pipeline description): Mention that + the old pipeline description is deprecated. + + * config/rs6000/7450.md (automaton ppc7450): Split up, move + mciu_7450 function unit to... + (automaton ppc7450mciu): ...new automaton. + + * haifa-sched.c (insert_schedule_bubbles_p): Remove. + (schedule_block): Don't consider inserting bubbles. + (sched_init): Don't initialize DFA bubbles. + * target-def.h (TARGET_SCHED_INIT_DFA_BUBBLES, + TARGET_SCHED_DFA_BUBBLE): Remove. + * target.h (init_dfa_bubbles, dfa_bubble): Remove hooks. + * doc/tm.texi (TARGET_SCHED_INIT_DFA_BUBBLES, + TARGET_SCHED_DFA_BUBBLE): Remove documentation. + + * stmt.c (conditional_context): Remove prototype. + * tree.h (conditional_context): Remove. + * tree-cfg.c (pre_insert_on_edge): Remove. + + * c-common.h (c_expand_asm_operands): Remove prototype. + * c-typeck.c (c_expand_asm_operands): Remove. + +2004-07-09 Jan Beulich * config/i386/i386.c (classify_argument): Treat V1xx modes the same as their base modes. CTImode, TCmode, and XCmode must be passed in memory. @@ -17,7 +42,7 @@ MMX areguments and return values are passed in XMM registers). (sse2_umulsidi3): Correct type and mode. -2004-04-09 Richard Henderson +2004-07-09 Richard Henderson * tree-cfg.c (dump_cfg_stats): Fix 64-bit format mismatch errors. diff --git a/gcc/c-common.h b/gcc/c-common.h index 2ae116efe07..ba7a2f87d24 100644 --- a/gcc/c-common.h +++ b/gcc/c-common.h @@ -798,8 +798,6 @@ extern tree build_case_label (tree, tree, tree); extern tree build_continue_stmt (void); extern tree build_break_stmt (void); -extern void c_expand_asm_operands (tree, tree, tree, tree, int, location_t); - /* These functions must be defined by each front-end which implements a variant of the C language. They are used in c-common.c. */ diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index b704fab47ea..ca2e6df793e 100644 --- a/gcc/c-typeck.c +++ b/gcc/c-typeck.c @@ -6187,65 +6187,6 @@ build_asm_expr (tree string, tree outputs, tree inputs, tree clobbers, } return args; } - -/* Expand an ASM statement with operands, handling output operands - that are not variables or INDIRECT_REFS by transforming such - cases into cases that expand_asm_operands can handle. - - Arguments are same as for expand_asm_operands. */ - -void -c_expand_asm_operands (tree string, tree outputs, tree inputs, - tree clobbers, int vol, location_t locus) -{ - int noutputs = list_length (outputs); - int i; - /* o[I] is the place that output number I should be written. */ - tree *o = alloca (noutputs * sizeof (tree)); - tree tail; - - /* Record the contents of OUTPUTS before it is modified. */ - for (i = 0, tail = outputs; tail; tail = TREE_CHAIN (tail), i++) - { - o[i] = TREE_VALUE (tail); - if (o[i] == error_mark_node) - return; - } - - /* Generate the ASM_OPERANDS insn; store into the TREE_VALUEs of - OUTPUTS some trees for where the values were actually stored. */ - expand_asm_operands (string, outputs, inputs, clobbers, vol, locus); - - /* Copy all the intermediate outputs into the specified outputs. */ - for (i = 0, tail = outputs; tail; tail = TREE_CHAIN (tail), i++) - { - if (o[i] != TREE_VALUE (tail)) - { - expand_expr (build_modify_expr (o[i], NOP_EXPR, TREE_VALUE (tail)), - NULL_RTX, VOIDmode, EXPAND_NORMAL); - free_temp_slots (); - - /* Restore the original value so that it's correct the next - time we expand this function. */ - TREE_VALUE (tail) = o[i]; - } - /* Detect modification of read-only values. - (Otherwise done by build_modify_expr.) */ - else - { - tree type = TREE_TYPE (o[i]); - if (TREE_READONLY (o[i]) - || TYPE_READONLY (type) - || ((TREE_CODE (type) == RECORD_TYPE - || TREE_CODE (type) == UNION_TYPE) - && C_TYPE_FIELDS_READONLY (type))) - readonly_error (o[i], "modification by `asm'"); - } - } - - /* Those MODIFY_EXPRs could do autoincrements. */ - emit_queue (); -} /* Generate a goto statement to LABEL. */ diff --git a/gcc/config/rs6000/7450.md b/gcc/config/rs6000/7450.md index 55bd4d86368..bedf41aa888 100644 --- a/gcc/config/rs6000/7450.md +++ b/gcc/config/rs6000/7450.md @@ -18,8 +18,9 @@ ;; Free Software Foundation, 59 Temple Place - Suite 330, Boston, ;; MA 02111-1307, USA. -(define_automaton "ppc7450,ppc7450fp,ppc7450vec") -(define_cpu_unit "iu1_7450,iu2_7450,iu3_7450,mciu_7450" "ppc7450") +(define_automaton "ppc7450,ppc7450mciu,ppc7450fp,ppc7450vec") +(define_cpu_unit "iu1_7450,iu2_7450,iu3_7450" "ppc7450") +(define_cpu_unit "mciu_7450" "ppc7450mciu") (define_cpu_unit "fpu_7450" "ppc7450fp") (define_cpu_unit "lsu_7450,bpu_7450" "ppc7450") (define_cpu_unit "du1_7450,du2_7450,du3_7450" "ppc7450") diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 01112d52c3c..a9ac0cb8b8f 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2004-07-09 Steven Bosscher + + * typeck.c (c_expand_asm_operands): Remove. + 2004-07-09 Mike Stump * typeck.c (build_class_member_access_expr): Skip null deref diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index 6b113255bda..d1792d4ddfb 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -5774,63 +5774,6 @@ convert_for_initialization (tree exp, tree type, tree rhs, int flags, return convert_for_assignment (type, rhs, errtype, fndecl, parmnum); } -/* Expand an ASM statement with operands, handling output operands - that are not variables or INDIRECT_REFS by transforming such - cases into cases that expand_asm_operands can handle. - - Arguments are same as for expand_asm_operands. - - We don't do default conversions on all inputs, because it can screw - up operands that are expected to be in memory. */ - -void -c_expand_asm_operands (tree string, tree outputs, tree inputs, tree clobbers, - int vol, location_t locus) -{ - int noutputs = list_length (outputs); - int i; - /* o[I] is the place that output number I should be written. */ - tree *o = alloca (noutputs * sizeof (tree)); - tree tail; - - /* Record the contents of OUTPUTS before it is modified. */ - for (i = 0, tail = outputs; tail; tail = TREE_CHAIN (tail), i++) - o[i] = TREE_VALUE (tail); - - /* Generate the ASM_OPERANDS insn; - store into the TREE_VALUEs of OUTPUTS some trees for - where the values were actually stored. */ - expand_asm_operands (string, outputs, inputs, clobbers, vol, locus); - - /* Copy all the intermediate outputs into the specified outputs. */ - for (i = 0, tail = outputs; tail; tail = TREE_CHAIN (tail), i++) - { - if (o[i] != TREE_VALUE (tail)) - { - expand_expr (build_modify_expr (o[i], NOP_EXPR, TREE_VALUE (tail)), - const0_rtx, VOIDmode, EXPAND_NORMAL); - free_temp_slots (); - - /* Restore the original value so that it's correct the next - time we expand this function. */ - TREE_VALUE (tail) = o[i]; - } - /* Detect modification of read-only values. - (Otherwise done by build_modify_expr.) */ - else - { - tree type = TREE_TYPE (o[i]); - if (type != error_mark_node - && (CP_TYPE_CONST_P (type) - || (CLASS_TYPE_P (type) && C_TYPE_FIELDS_READONLY (type)))) - readonly_error (o[i], "modification by `asm'", 1); - } - } - - /* Those MODIFY_EXPRs could do autoincrements. */ - emit_queue (); -} - /* If RETVAL is the address of, or a reference to, a local variable or temporary give an appropriate warning. */ diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi index bbd20437e79..5949b8dd1cc 100644 --- a/gcc/doc/md.texi +++ b/gcc/doc/md.texi @@ -5536,10 +5536,15 @@ instruction scheduler has to have an adequate description of the processor parallelism (or @dfn{pipeline description}). Currently GCC provides two alternative ways to describe processor parallelism, both described below. The first method is outlined in the next section; -it was once the only method provided by GCC, and thus is used in a number -of exiting ports. The second, and preferred method, specifies functional -unit reservations for groups of instructions with the aid of @dfn{regular -expressions}. This is called the @dfn{automaton based description}. +it specifies functional unit reservations for groups of instructions +with the aid of @dfn{regular expressions}. This is called the +@dfn{automaton based description}. The second method is called the +@dfn{old pipeline description}. This method specifies usage of +function units for classes of insns. This description is not as +powerful or accurate as the automaton based description, because it +is impossible to model instructions that use more than one function +unit. The second method is deprecated; new ports should use the +automaton based description. The GCC instruction scheduler uses a @dfn{pipeline hazard recognizer} to figure out the possibility of the instruction issue by the processor @@ -5552,20 +5557,6 @@ generated from the old description. Furthermore, its speed is not dependent on processor complexity. The instruction issue is possible if there is a transition from one automaton state to another one. -You can use either model to describe processor pipeline -characteristics or even mix them. You could use the old description -for some processor submodels and the @acronym{DFA}-based one for other -processor submodels. - -In general, using the automaton based description is preferred. Its -model is richer and makes it possible to more accurately describe -pipeline characteristics of processors, which results in improved -code quality (although sometimes only marginally). It will also be -used as an infrastructure to implement sophisticated and practical -instruction scheduling which will try many instruction sequences to -choose the best one. - - @menu * Old pipeline description:: Specifying information for insn scheduling. * Automaton pipeline description:: Describing insn pipeline characteristics. @@ -5579,6 +5570,8 @@ choose the best one. @cindex old pipeline description @cindex function units, for scheduling +@emph{Note:}The old pipeline description is deprecated. + On most @acronym{RISC} machines, there are instructions whose results are not available for a specific number of cycles. Common cases are instructions that load data from memory. On many machines, a pipeline diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index 5cbff1c53d1..3bc86f33982 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -5746,41 +5746,6 @@ correspondingly processor cycle on which the previous insn has been issued and the current processor cycle. @end deftypefn -@deftypefn {Target Hook} void TARGET_SCHED_INIT_DFA_BUBBLES (void) -The @acronym{DFA}-based scheduler could take the insertion of nop -operations for better insn scheduling into account. It can be done -only if the multi-pass insn scheduling works (see hook -@samp{TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD}). - -Let us consider a @acronym{VLIW} processor insn with 3 slots. Each -insn can be placed only in one of the three slots. We have 3 ready -insns @var{A}, @var{B}, and @var{C}. @var{A} and @var{C} can be -placed only in the 1st slot, @var{B} can be placed only in the 3rd -slot. We described the automaton which does not permit empty slot -gaps between insns (usually such description is simpler). Without -this code the scheduler would place each insn in 3 separate -@acronym{VLIW} insns. If the scheduler places a nop insn into the 2nd -slot, it could place the 3 insns into 2 @acronym{VLIW} insns. What is -the nop insn is returned by hook @samp{TARGET_SCHED_DFA_BUBBLE}. Hook -@samp{TARGET_SCHED_INIT_DFA_BUBBLES} can be used to initialize or -create the nop insns. - -You should remember that the scheduler does not insert the nop insns. -It is not wise because of the following optimizations. The scheduler -only considers such possibility to improve the result schedule. The -nop insns should be inserted lately, e.g. on the final phase. -@end deftypefn - -@deftypefn {Target Hook} rtx TARGET_SCHED_DFA_BUBBLE (int @var{index}) -This hook @samp{FIRST_CYCLE_MULTIPASS_SCHEDULING} is used to insert -nop operations for better insn scheduling when @acronym{DFA}-based -scheduler makes multipass insn scheduling (see also description of -hook @samp{TARGET_SCHED_INIT_DFA_BUBBLES}). This hook -returns a nop insn with given @var{index}. The indexes start with -zero. The hook should return @code{NULL} if there are no more nop -insns with indexes greater than given index. -@end deftypefn - @deftypefn {Target Hook} bool TARGET_SCHED_IS_COSTLY_DEPENDENCE (rtx @var{insn1}, rtx @var{insn2}, rtx @var{dep_link}, int @var{dep_cost}, int @var{distance}) This hook is used to define which dependences are considered costly by the target, so costly that it is not advisable to schedule the insns that diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c index 6abcd40cdbb..1e29e7f98b0 100644 --- a/gcc/haifa-sched.c +++ b/gcc/haifa-sched.c @@ -159,12 +159,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA static int issue_rate; -/* If the following variable value is nonzero, the scheduler inserts - bubbles (nop insns). The value of variable affects on scheduler - behavior only if automaton pipeline interface with multipass - scheduling is used and hook dfa_bubble is defined. */ -int insert_schedule_bubbles_p = 0; - /* sched-verbose controls the amount of debugging output the scheduler prints. It is controlled by -fsched-verbose=N: N>0 and no -DSR : the output is directed to stderr. @@ -2462,69 +2456,6 @@ schedule_block (int b, int rgn_n_insns) else { cost = state_transition (temp_state, insn); - - if (targetm.sched.first_cycle_multipass_dfa_lookahead - && targetm.sched.dfa_bubble) - { - if (cost == 0) - { - int j; - rtx bubble; - - for (j = 0; - (bubble = targetm.sched.dfa_bubble (j)) - != NULL_RTX; - j++) - { - memcpy (temp_state, curr_state, dfa_state_size); - - if (state_transition (temp_state, bubble) < 0 - && state_transition (temp_state, insn) < 0) - break; - } - - if (bubble != NULL_RTX) - { - if (insert_schedule_bubbles_p) - { - rtx copy; - - copy = copy_rtx (PATTERN (bubble)); - emit_insn_after (copy, last_scheduled_insn); - last_scheduled_insn - = NEXT_INSN (last_scheduled_insn); - INSN_CODE (last_scheduled_insn) - = INSN_CODE (bubble); - - /* Annotate the same for the first insns - scheduling by using mode. */ - PUT_MODE (last_scheduled_insn, - (clock_var > last_clock_var - ? clock_var - last_clock_var - : VOIDmode)); - last_clock_var = clock_var; - - if (sched_verbose >= 2) - { - fprintf (sched_dump, - ";;\t\t--> scheduling bubble insn <<<%d>>>:reservation ", - INSN_UID (last_scheduled_insn)); - - if (recog_memoized (last_scheduled_insn) - < 0) - fprintf (sched_dump, "nothing"); - else - print_reservation - (sched_dump, last_scheduled_insn); - - fprintf (sched_dump, "\n"); - } - } - cost = -1; - } - } - } - if (cost < 0) cost = 0; else if (cost == 0) @@ -2778,10 +2709,6 @@ sched_init (FILE *dump_file) if (targetm.sched.init_dfa_post_cycle_insn) targetm.sched.init_dfa_post_cycle_insn (); - if (targetm.sched.first_cycle_multipass_dfa_lookahead - && targetm.sched.init_dfa_bubbles) - targetm.sched.init_dfa_bubbles (); - dfa_start (); dfa_state_size = state_size (); curr_state = xmalloc (dfa_state_size); diff --git a/gcc/stmt.c b/gcc/stmt.c index 098efcb4a30..f3bf8720339 100644 --- a/gcc/stmt.c +++ b/gcc/stmt.c @@ -2308,16 +2308,6 @@ is_body_block (tree stmt) return 0; } -/* True if we are currently emitting insns in an area of output code - that is controlled by a conditional expression. This is used by - the cleanup handling code to generate conditional cleanup actions. */ - -int -conditional_context (void) -{ - return block_stack && block_stack->data.block.conditional_code; -} - /* Return an opaque pointer to the current nesting level, so frontend code can check its own sanity. */ diff --git a/gcc/target-def.h b/gcc/target-def.h index 905879441c5..50487f15933 100644 --- a/gcc/target-def.h +++ b/gcc/target-def.h @@ -236,8 +236,6 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD 0 #define TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD 0 #define TARGET_SCHED_DFA_NEW_CYCLE 0 -#define TARGET_SCHED_INIT_DFA_BUBBLES 0 -#define TARGET_SCHED_DFA_BUBBLE 0 #define TARGET_SCHED_IS_COSTLY_DEPENDENCE 0 #define TARGET_SCHED \ @@ -260,8 +258,6 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD, \ TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD_GUARD, \ TARGET_SCHED_DFA_NEW_CYCLE, \ - TARGET_SCHED_INIT_DFA_BUBBLES, \ - TARGET_SCHED_DFA_BUBBLE, \ TARGET_SCHED_IS_COSTLY_DEPENDENCE} /* In tree.c. */ diff --git a/gcc/target.h b/gcc/target.h index fd58fecba90..e2c24c67cbf 100644 --- a/gcc/target.h +++ b/gcc/target.h @@ -258,18 +258,6 @@ struct gcc_target the previous insn has been issued and the current processor cycle. */ int (* dfa_new_cycle) (FILE *, int, rtx, int, int, int *); - /* The values of the following members are pointers to functions - used to improve the first cycle multipass scheduling by - inserting nop insns. dfa_scheduler_bubble gives a function - returning a nop insn with given index. The indexes start with - zero. The function should return NULL if there are no more nop - insns with indexes greater than given index. To initialize the - nop insn the function given by member - init_dfa_scheduler_bubbles is used. The default values of the - members result in not inserting nop insns during the multipass - scheduling. */ - void (* init_dfa_bubbles) (void); - rtx (* dfa_bubble) (int); /* The following member value is a pointer to a function called by the insn scheduler. It should return true if there exists a dependence which is considered costly by the target, between diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index 3c790b4db84..bd2ec9af808 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -3038,27 +3038,6 @@ bsi_insert_on_edge (edge e, tree stmt) } -/* Specialized edge insertion for SSA-PRE. FIXME: This should - probably disappear. The only reason it's here is because PRE needs - the call to tree_find_edge_insert_loc(). */ - -void pre_insert_on_edge (edge e, tree stmt); - -void -pre_insert_on_edge (edge e, tree stmt) -{ - block_stmt_iterator bsi; - - if (PENDING_STMT (e)) - abort (); - - if (tree_find_edge_insert_loc (e, &bsi)) - bsi_insert_after (&bsi, stmt, BSI_NEW_STMT); - else - bsi_insert_before (&bsi, stmt, BSI_NEW_STMT); -} - - /*--------------------------------------------------------------------------- Tree specific functions for CFG manipulation ---------------------------------------------------------------------------*/ diff --git a/gcc/tree.h b/gcc/tree.h index ac13f123462..f2cfa21de34 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -3348,7 +3348,6 @@ extern void expand_end_bindings (tree, int, int); extern void warn_about_unused_variables (tree); extern int is_body_block (tree); -extern int conditional_context (void); extern struct nesting * current_nesting_level (void); extern void expand_start_case (int, tree, tree, const char *); extern void expand_end_case_type (tree, tree); -- 2.30.2