objc-act.c: Include cgraph.h
* objc-act.c: Include cgraph.h (mark_referenced_methods): New function. (objc_init): Call it. * objc-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Set. * c-decl.c (finish_function): Honor can_defer_p even in unit-at-a-time mode. * optabs.c (expand_fix): Do not widen the input operand. * expr.c (emit_group_store): Fix crash when converting single register into complex register. * Makefile.in (jump.o, regclass.o, alias.o): Add dependency on timevar.h * alias.c: Include timevar.h (init_alias_analysis): Set timevar * jump.c: Include timevar.h (rebuild_jump_labels): Set timevar * regcalss.c: Include timevar.h (reg_scan): Set timevar * timevar.def (TV_ALIAS_ANALYSIS, TV_REG_SCAN, TV_REBUILD_JUMP): New From-SVN: r63464
This commit is contained in:
parent
9541e2e3d9
commit
0d446150c2
|
@ -1,3 +1,27 @@
|
|||
Tue Feb 25 22:46:27 CET 2003 Jan Hubicka <jh@suse.cz>
|
||||
|
||||
* objc-act.c: Include cgraph.h
|
||||
(mark_referenced_methods): New function.
|
||||
(objc_init): Call it.
|
||||
* objc-lang.c (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Set.
|
||||
|
||||
* c-decl.c (finish_function): Honor can_defer_p even in unit-at-a-time
|
||||
mode.
|
||||
|
||||
* optabs.c (expand_fix): Do not widen the input operand.
|
||||
|
||||
* expr.c (emit_group_store): Fix crash when converting single
|
||||
register into complex register.
|
||||
|
||||
* Makefile.in (jump.o, regclass.o, alias.o): Add dependency on timevar.h
|
||||
* alias.c: Include timevar.h
|
||||
(init_alias_analysis): Set timevar
|
||||
* jump.c: Include timevar.h
|
||||
(rebuild_jump_labels): Set timevar
|
||||
* regcalss.c: Include timevar.h
|
||||
(reg_scan): Set timevar
|
||||
* timevar.def (TV_ALIAS_ANALYSIS, TV_REG_SCAN, TV_REBUILD_JUMP): New
|
||||
|
||||
2003-02-26 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
|
||||
|
||||
* cse.c (count_reg_usage): Fix handling of REG_EQUAL notes.
|
||||
|
|
|
@ -1526,7 +1526,7 @@ integrate.o : integrate.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $
|
|||
$(PARAMS_H) $(TM_P_H) $(TARGET_H) langhooks.h gt-integrate.h
|
||||
jump.o : jump.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) flags.h \
|
||||
hard-reg-set.h $(REGS_H) insn-config.h $(RECOG_H) $(EXPR_H) real.h except.h function.h \
|
||||
toplev.h $(INSN_ATTR_H) $(TM_P_H) reload.h $(PREDICT_H)
|
||||
toplev.h $(INSN_ATTR_H) $(TM_P_H) reload.h $(PREDICT_H) $(TIMEVAR_H)
|
||||
|
||||
simplify-rtx.o : simplify-rtx.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
|
||||
$(REGS_H) hard-reg-set.h flags.h real.h insn-config.h $(RECOG_H) $(EXPR_H) toplev.h \
|
||||
|
@ -1623,7 +1623,7 @@ combine.o : combine.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) flags
|
|||
$(BASIC_BLOCK_H) $(RECOG_H) real.h hard-reg-set.h toplev.h $(TM_P_H)
|
||||
regclass.o : regclass.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
|
||||
hard-reg-set.h flags.h $(BASIC_BLOCK_H) $(REGS_H) insn-config.h $(RECOG_H) reload.h \
|
||||
real.h toplev.h function.h output.h $(GGC_H) $(TM_P_H) $(EXPR_H)
|
||||
real.h toplev.h function.h output.h $(GGC_H) $(TM_P_H) $(EXPR_H) $(TIMEVAR_H)
|
||||
local-alloc.o : local-alloc.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
|
||||
flags.h $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h insn-config.h $(RECOG_H) \
|
||||
output.h function.h $(INSN_ATTR_H) toplev.h except.h $(TM_P_H)
|
||||
|
@ -1664,7 +1664,7 @@ reorg.o : reorg.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) condition
|
|||
alias.o : alias.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) flags.h \
|
||||
hard-reg-set.h $(BASIC_BLOCK_H) $(REGS_H) toplev.h output.h $(EXPR_H) \
|
||||
$(GGC_H) function.h cselib.h $(TREE_H) $(TM_P_H) langhooks.h $(TARGET_H) \
|
||||
gt-alias.h
|
||||
gt-alias.h $(TIMEVAR_H)
|
||||
regmove.o : regmove.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) insn-config.h \
|
||||
$(RECOG_H) output.h $(REGS_H) hard-reg-set.h flags.h function.h \
|
||||
$(EXPR_H) $(BASIC_BLOCK_H) toplev.h $(TM_P_H) except.h reload.h
|
||||
|
|
|
@ -39,6 +39,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
|||
#include "splay-tree.h"
|
||||
#include "ggc.h"
|
||||
#include "langhooks.h"
|
||||
#include "timevar.h"
|
||||
#include "target.h"
|
||||
|
||||
/* The alias sets assigned to MEMs assist the back-end in determining
|
||||
|
@ -2745,6 +2746,8 @@ init_alias_analysis ()
|
|||
unsigned int ui;
|
||||
rtx insn;
|
||||
|
||||
timevar_push (TV_ALIAS_ANALYSIS);
|
||||
|
||||
reg_known_value_size = maxreg;
|
||||
|
||||
reg_known_value
|
||||
|
@ -2950,6 +2953,7 @@ init_alias_analysis ()
|
|||
new_reg_base_value = 0;
|
||||
free (reg_seen);
|
||||
reg_seen = 0;
|
||||
timevar_pop (TV_ALIAS_ANALYSIS);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -6413,7 +6413,7 @@ finish_function (nested, can_defer_p)
|
|||
free_after_compilation (cfun);
|
||||
cfun = NULL;
|
||||
|
||||
if (flag_unit_at_a_time)
|
||||
if (flag_unit_at_a_time && can_defer_p)
|
||||
{
|
||||
cgraph_finalize_function (fndecl, DECL_SAVED_TREE (fndecl));
|
||||
current_function_decl = NULL;
|
||||
|
|
11
gcc/expr.c
11
gcc/expr.c
|
@ -2477,6 +2477,15 @@ emit_group_store (orig_dst, src, ssize)
|
|||
bytepos -= GET_MODE_SIZE (GET_MODE (XEXP (dst, 0)));
|
||||
dest = XEXP (dst, 1);
|
||||
}
|
||||
else if (bytepos == 0 && XVECLEN (src, 0))
|
||||
{
|
||||
dest = assign_stack_temp (GET_MODE (dest),
|
||||
GET_MODE_SIZE (GET_MODE (dest)), 0);
|
||||
emit_move_insn (adjust_address (dest, GET_MODE (tmps[i]), bytepos),
|
||||
tmps[i]);
|
||||
dst = dest;
|
||||
break;
|
||||
}
|
||||
else
|
||||
abort ();
|
||||
}
|
||||
|
@ -2495,7 +2504,7 @@ emit_group_store (orig_dst, src, ssize)
|
|||
emit_queue ();
|
||||
|
||||
/* Copy from the pseudo into the (probable) hard reg. */
|
||||
if (GET_CODE (dst) == REG)
|
||||
if (orig_dst != dst)
|
||||
emit_move_insn (orig_dst, dst);
|
||||
}
|
||||
|
||||
|
|
|
@ -53,6 +53,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
|||
#include "toplev.h"
|
||||
#include "reload.h"
|
||||
#include "predict.h"
|
||||
#include "timevar.h"
|
||||
|
||||
/* Optimize jump y; x: ... y: jumpif... x?
|
||||
Don't know if it is worth bothering with. */
|
||||
|
@ -82,6 +83,7 @@ rebuild_jump_labels (f)
|
|||
{
|
||||
rtx insn;
|
||||
|
||||
timevar_push (TV_REBUILD_JUMP);
|
||||
init_label_info (f);
|
||||
mark_all_labels (f);
|
||||
|
||||
|
@ -92,6 +94,7 @@ rebuild_jump_labels (f)
|
|||
for (insn = forced_labels; insn; insn = XEXP (insn, 1))
|
||||
if (GET_CODE (XEXP (insn, 0)) == CODE_LABEL)
|
||||
LABEL_NUSES (XEXP (insn, 0))++;
|
||||
timevar_pop (TV_REBUILD_JUMP);
|
||||
}
|
||||
|
||||
/* Some old code expects exactly one BARRIER as the NEXT_INSN of a
|
||||
|
|
|
@ -60,6 +60,7 @@ Boston, MA 02111-1307, USA. */
|
|||
#include "debug.h"
|
||||
#include "target.h"
|
||||
#include "diagnostic.h"
|
||||
#include "cgraph.h"
|
||||
|
||||
/* This is the default way of generating a method name. */
|
||||
/* I am not sure it is really correct.
|
||||
|
@ -294,6 +295,7 @@ static void handle_class_ref PARAMS ((tree));
|
|||
static void generate_struct_by_value_array PARAMS ((void))
|
||||
ATTRIBUTE_NORETURN;
|
||||
static void encode_complete_bitfield PARAMS ((int, tree, int));
|
||||
static void mark_referenced_methods PARAMS ((void));
|
||||
|
||||
/*** Private Interface (data) ***/
|
||||
|
||||
|
@ -486,6 +488,7 @@ objc_init (filename)
|
|||
void
|
||||
finish_file ()
|
||||
{
|
||||
mark_referenced_methods ();
|
||||
c_objc_common_finish_file ();
|
||||
|
||||
/* Finalize Objective-C runtime data. No need to generate tables
|
||||
|
@ -4027,6 +4030,29 @@ generate_dispatch_table (type, name, size, list)
|
|||
return decl;
|
||||
}
|
||||
|
||||
static void
|
||||
mark_referenced_methods ()
|
||||
{
|
||||
struct imp_entry *impent;
|
||||
tree chain;
|
||||
|
||||
for (impent = imp_list; impent; impent = impent->next)
|
||||
{
|
||||
chain = CLASS_CLS_METHODS (impent->imp_context);
|
||||
while (chain)
|
||||
{
|
||||
cgraph_mark_needed_node (cgraph_node (METHOD_DEFINITION (chain)));
|
||||
chain = TREE_CHAIN (chain);
|
||||
}
|
||||
chain = CLASS_NST_METHODS (impent->imp_context);
|
||||
while (chain)
|
||||
{
|
||||
cgraph_mark_needed_node (cgraph_node (METHOD_DEFINITION (chain)));
|
||||
chain = TREE_CHAIN (chain);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
generate_dispatch_tables ()
|
||||
{
|
||||
|
|
|
@ -99,6 +99,9 @@ static void objc_init_options PARAMS ((void));
|
|||
#define LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING \
|
||||
c_convert_parm_for_inlining
|
||||
|
||||
#undef LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION
|
||||
#define LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION c_expand_body
|
||||
|
||||
#undef LANG_HOOKS_TYPE_FOR_MODE
|
||||
#define LANG_HOOKS_TYPE_FOR_MODE c_common_type_for_mode
|
||||
#undef LANG_HOOKS_TYPE_FOR_SIZE
|
||||
|
|
19
gcc/optabs.c
19
gcc/optabs.c
|
@ -5119,14 +5119,25 @@ expand_fix (to, from, unsignedp)
|
|||
one plus the highest signed number, convert, and add it back.
|
||||
|
||||
We only need to check all real modes, since we know we didn't find
|
||||
anything with a wider integer mode. */
|
||||
anything with a wider integer mode.
|
||||
|
||||
This code used to extend FP value into mode wider than the destination.
|
||||
This is not needed. Consider, for instance conversion from SFmode
|
||||
into DImode.
|
||||
|
||||
The hot path trought the code is dealing with inputs smaller than 2^63
|
||||
and doing just the conversion, so there is no bits to lose.
|
||||
|
||||
In the other path we know the value is positive in the range 2^63..2^64-1
|
||||
inclusive. (as for other imput overflow happens and result is undefined)
|
||||
So we know that the most important bit set in mantisa corresponds to
|
||||
2^63. The subtraction of 2^63 should not generate any rounding as it
|
||||
simply clears out that bit. The rest is trivial. */
|
||||
|
||||
if (unsignedp && GET_MODE_BITSIZE (GET_MODE (to)) <= HOST_BITS_PER_WIDE_INT)
|
||||
for (fmode = GET_MODE (from); fmode != VOIDmode;
|
||||
fmode = GET_MODE_WIDER_MODE (fmode))
|
||||
/* Make sure we won't lose significant bits doing this. */
|
||||
if (GET_MODE_BITSIZE (fmode) > GET_MODE_BITSIZE (GET_MODE (to))
|
||||
&& CODE_FOR_nothing != can_fix_p (GET_MODE (to), fmode, 0,
|
||||
if (CODE_FOR_nothing != can_fix_p (GET_MODE (to), fmode, 0,
|
||||
&must_trunc))
|
||||
{
|
||||
int bitsize;
|
||||
|
|
|
@ -43,6 +43,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
|||
#include "toplev.h"
|
||||
#include "output.h"
|
||||
#include "ggc.h"
|
||||
#include "timevar.h"
|
||||
|
||||
#ifndef REGISTER_MOVE_COST
|
||||
#define REGISTER_MOVE_COST(m, x, y) 2
|
||||
|
@ -2338,6 +2339,8 @@ reg_scan (f, nregs, repeat)
|
|||
max_parallel = 3;
|
||||
max_set_parallel = 0;
|
||||
|
||||
timevar_push (TV_REG_SCAN);
|
||||
|
||||
for (insn = f; insn; insn = NEXT_INSN (insn))
|
||||
if (GET_CODE (insn) == INSN
|
||||
|| GET_CODE (insn) == CALL_INSN
|
||||
|
@ -2353,6 +2356,8 @@ reg_scan (f, nregs, repeat)
|
|||
}
|
||||
|
||||
max_parallel += max_set_parallel;
|
||||
|
||||
timevar_pop (TV_REG_SCAN);
|
||||
}
|
||||
|
||||
/* Update 'regscan' information by looking at the insns
|
||||
|
|
|
@ -47,6 +47,10 @@ DEFTIMEVAR (TV_DELETE_TRIVIALLY_DEAD , "trivially dead code")
|
|||
/* Time spent by life analysis. */
|
||||
DEFTIMEVAR (TV_LIFE , "life analysis")
|
||||
DEFTIMEVAR (TV_LIFE_UPDATE , "life info update")
|
||||
|
||||
DEFTIMEVAR (TV_ALIAS_ANALYSIS , "alias analysis")
|
||||
DEFTIMEVAR (TV_REG_SCAN , "register scan")
|
||||
DEFTIMEVAR (TV_REBUILD_JUMP , "rebuild jump labels")
|
||||
/* Timing in various stages of the compiler. */
|
||||
DEFTIMEVAR (TV_CPP , "preprocessing")
|
||||
DEFTIMEVAR (TV_LEX , "lexical analysis")
|
||||
|
|
Loading…
Reference in New Issue