diff options
author | steven <steven@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-07-21 18:57:09 +0000 |
---|---|---|
committer | steven <steven@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-07-21 18:57:09 +0000 |
commit | 24049db97c735788356e1e84cd572237e3242bec (patch) | |
tree | d4da6fa4c9e5c2b532917701f2d280cf5b10c01a /gcc/stmt.c | |
parent | cd45159c7ce27cd0eb6412c0cbbc6c2450bd95bf (diff) | |
download | ppe42-gcc-24049db97c735788356e1e84cd572237e3242bec.tar.gz ppe42-gcc-24049db97c735788356e1e84cd572237e3242bec.zip |
* rtl.h (insn_note): Remove NOTE_INSN_PREDICTION.
* rtl.c (note_insn_name): Likewise.
* print-rtl.c (print_rtx): Don't print it.
* cfgrtl.h (can_delete_note_p): Don't handle it.
(rtl_delete_block): Likewise.
* passes.c (rest_of_handle_guess_branch_prob): Remove.
(rest_of_compilation): Don't call it.
* predict.c (process_note_predictions, process_note_prediction,
note_prediction_to_br_prob): Remove.
* basic-block.c (note_prediction_to_br_prob): Remove prototype.
* stmt.c (return_prediction): Remove.
(expand_value_return): Don't call it. Don't add prediction
notes for return statements.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85016 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/stmt.c')
-rw-r--r-- | gcc/stmt.c | 48 |
1 files changed, 1 insertions, 47 deletions
diff --git a/gcc/stmt.c b/gcc/stmt.c index 6d3043b3869..b2ffef690ca 100644 --- a/gcc/stmt.c +++ b/gcc/stmt.c @@ -264,7 +264,6 @@ static bool check_operand_nalternatives (tree, tree); static bool check_unique_operand_names (tree, tree); static char *resolve_operand_name_1 (char *, tree, tree); static void expand_null_return_1 (void); -static enum br_predictor return_prediction (rtx); static rtx shift_return_value (rtx); static void expand_value_return (rtx); static void do_jump_if_equal (rtx, rtx, rtx, int); @@ -1811,35 +1810,6 @@ expand_naked_return (void) emit_jump (end_label); } -/* Try to guess whether the value of return means error code. */ -static enum br_predictor -return_prediction (rtx val) -{ - /* Different heuristics for pointers and scalars. */ - if (POINTER_TYPE_P (TREE_TYPE (DECL_RESULT (current_function_decl)))) - { - /* NULL is usually not returned. */ - if (val == const0_rtx) - return PRED_NULL_RETURN; - } - else - { - /* Negative return values are often used to indicate - errors. */ - if (GET_CODE (val) == CONST_INT - && INTVAL (val) < 0) - return PRED_NEGATIVE_RETURN; - /* Constant return values are also usually erors, - zero/one often mean booleans so exclude them from the - heuristics. */ - if (CONSTANT_P (val) - && (val != const0_rtx && val != const1_rtx)) - return PRED_CONST_RETURN; - } - return PRED_NO_PREDICTION; -} - - /* If the current function returns values in the most significant part of a register, shift return value VAL appropriately. The mode of the function's return type is known not to be BLKmode. */ @@ -1872,26 +1842,10 @@ shift_return_value (rtx val) static void expand_value_return (rtx val) { - rtx return_reg; - enum br_predictor pred; - - if (flag_guess_branch_prob - && (pred = return_prediction (val)) != PRED_NO_PREDICTION) - { - /* Emit information for branch prediction. */ - rtx note; - - note = emit_note (NOTE_INSN_PREDICTION); - - NOTE_PREDICTION (note) = NOTE_PREDICT (pred, NOT_TAKEN); - - } - - return_reg = DECL_RTL (DECL_RESULT (current_function_decl)); - /* Copy the value to the return location unless it's already there. */ + rtx return_reg = DECL_RTL (DECL_RESULT (current_function_decl)); if (return_reg != val) { tree type = TREE_TYPE (DECL_RESULT (current_function_decl)); |