Paolo Bonzini - Re: [dataflow] speed up by 2%, patch 4/4 (original) (raw)
This is the mail archive of the gcc-patches@gcc.gnu.orgmailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Re: [dataflow] speed up by 2%, patch 4/4 - remove LOG_LINKS field from insns
- From: Paolo Bonzini
- To: Paolo Bonzini
- Cc: GCC Patches , Kenneth Zadeck
- Date: Mon, 19 Feb 2007 13:24:06 +0100
- Subject: Re: [dataflow] speed up by 2%, patch 4/4 - remove LOG_LINKS field from insns
- References: <45D99646.6040909@lu.unisi.ch>
Paolo Bonzini wrote:
This has the benefit of slightly lower memory consumption, too.Bootstrapped/regtested i686-pc-linux-gnu together with the others. Ok?
I attached patch 1/4 twice, this is the correct one.Paolo
2007-02-18 Paolo Bonzini bonzini@gnu.org
* gengtype.c (adjust_field_rtx_def): Adjust index of JUMP_LABEL.
* caller-save.c (init_caller_save): Adjust creation of INSNs.
* rtl.def (CODE_LABEL): Adjust comment.
(INSN, JUMP_INSN, CALL_INSN, BARRIER): Remove penultimate field.
* emit-rtl.c (unshare_all_rtl_again, verify_rtl_sharing,
unshare_all_rtl_in_chain, make_insn_raw, make_jump_insn_raw,
make_call_insn_raw): Remove references to LOG_LINKS.
* rtl.h (LOG_LINKS): Remove.
(REG_NOTES, CALL_INSN_FUNCTION_USAGE, JUMP_LABEL): Shift index
down by one.
Index: gengtype.c
--- gengtype.c (revision 122099) +++ gengtype.c (working copy) @@ -577,7 +577,7 @@ adjust_field_rtx_def (type_p t, options_ case '0': if (i == MEM && aindex == 1) t = mem_attrs_tp, subname = "rt_mem"; - else if (i == JUMP_INSN && aindex == 9) + else if (i == JUMP_INSN && aindex == 8) t = rtx_tp, subname = "rt_rtx"; else if (i == CODE_LABEL && aindex == 4) t = scalar_tp, subname = "rt_int"; Index: caller-save.c
--- caller-save.c (revision 122099) +++ caller-save.c (working copy) @@ -190,8 +190,8 @@ init_caller_save (void) savepat = gen_rtx_SET (VOIDmode, test_mem, test_reg); restpat = gen_rtx_SET (VOIDmode, test_reg, test_mem); - saveinsn = gen_rtx_INSN (VOIDmode, 0, 0, 0, 0, 0, savepat, -1, 0, 0); - restinsn = gen_rtx_INSN (VOIDmode, 0, 0, 0, 0, 0, restpat, -1, 0, 0); + saveinsn = gen_rtx_INSN (VOIDmode, 0, 0, 0, 0, 0, savepat, -1, 0); + restinsn = gen_rtx_INSN (VOIDmode, 0, 0, 0, 0, 0, restpat, -1, 0); for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) for (mode = 0 ; mode < MAX_MACHINE_MODE; mode++) Index: rtl.def
--- rtl.def (revision 122099) +++ rtl.def (working copy) @@ -113,26 +113,26 @@ DEF_RTL_EXPR(ADDRESS, "address", "e", RT ---------------------------------------------------------------------- / / An instruction that cannot jump. / -DEF_RTL_EXPR(INSN, "insn", "iuuBieiee", RTX_INSN) +DEF_RTL_EXPR(INSN, "insn", "iuuBieie", RTX_INSN) / An instruction that can possibly jump. Fields ( rtx->u.fld[] ) have exact same meaning as INSN's. / -DEF_RTL_EXPR(JUMP_INSN, "jump_insn", "iuuBieiee0", RTX_INSN) +DEF_RTL_EXPR(JUMP_INSN, "jump_insn", "iuuBieie0", RTX_INSN) / An instruction that can possibly call a subroutine but which will not change which instruction comes next in the current function. - Field ( rtx->u.fld[9] ) is CALL_INSN_FUNCTION_USAGE. + Field ( rtx->u.fld[8] ) is CALL_INSN_FUNCTION_USAGE. All other fields ( rtx->u.fld[] ) have exact same meaning as INSN's. / -DEF_RTL_EXPR(CALL_INSN, "call_insn", "iuuBieieee", RTX_INSN) +DEF_RTL_EXPR(CALL_INSN, "call_insn", "iuuBieiee", RTX_INSN) / A marker that indicates that control will not flow through. / -DEF_RTL_EXPR(BARRIER, "barrier", "iuu000000", RTX_EXTRA) +DEF_RTL_EXPR(BARRIER, "barrier", "iuu00000", RTX_EXTRA) / Holds a label that is followed by instructions. Operand: 4: is used in jump.c for the use-count of the label. - 5: is used in flow.c to point to the chain of label_ref's to this label. + 5: is used in the sh backend. 6: is a number that is unique in the entire compilation. 7: is the user-given name of the label, if any. */ DEF_RTL_EXPR(CODE_LABEL, "code_label", "iuuB00is", RTX_EXTRA) Index: emit-rtl.c
--- emit-rtl.c (revision 122099) +++ emit-rtl.c (working copy) @@ -2152,7 +2152,6 @@ unshare_all_rtl_again (rtx insn) { reset_used_flags (PATTERN (p)); reset_used_flags (REG_NOTES (p)); - reset_used_flags (LOG_LINKS (p)); } /* Make sure that virtual stack slots are not shared. */ @@ -2315,7 +2314,6 @@ verify_rtl_sharing (void) { reset_used_flags (PATTERN (p)); reset_used_flags (REG_NOTES (p)); - reset_used_flags (LOG_LINKS (p)); if (GET_CODE (PATTERN (p)) == SEQUENCE) { int i; @@ -2327,7 +2325,6 @@ verify_rtl_sharing (void) gcc_assert (INSN_P (q)); reset_used_flags (PATTERN (q)); reset_used_flags (REG_NOTES (q)); - reset_used_flags (LOG_LINKS (q)); } } } @@ -2337,7 +2334,6 @@ verify_rtl_sharing (void) { verify_rtx_sharing (PATTERN (p), p); verify_rtx_sharing (REG_NOTES (p), p); - verify_rtx_sharing (LOG_LINKS (p), p); } } @@ -2352,7 +2348,6 @@ unshare_all_rtl_in_chain (rtx insn) { PATTERN (insn) = copy_rtx_if_shared (PATTERN (insn)); REG_NOTES (insn) = copy_rtx_if_shared (REG_NOTES (insn)); - LOG_LINKS (insn) = copy_rtx_if_shared (LOG_LINKS (insn)); } } @@ -3294,7 +3289,6 @@ make_insn_raw (rtx pattern) INSN_UID (insn) = cur_insn_uid++; PATTERN (insn) = pattern; INSN_CODE (insn) = -1; - LOG_LINKS (insn) = NULL; REG_NOTES (insn) = NULL; INSN_LOCATOR (insn) = 0; BLOCK_FOR_INSN (insn) = NULL; @@ -3326,7 +3320,6 @@ make_jump_insn_raw (rtx pattern) PATTERN (insn) = pattern; INSN_CODE (insn) = -1; - LOG_LINKS (insn) = NULL; REG_NOTES (insn) = NULL; JUMP_LABEL (insn) = NULL; INSN_LOCATOR (insn) = 0; @@ -3347,7 +3340,6 @@ make_call_insn_raw (rtx pattern) PATTERN (insn) = pattern; INSN_CODE (insn) = -1; - LOG_LINKS (insn) = NULL; REG_NOTES (insn) = NULL; CALL_INSN_FUNCTION_USAGE (insn) = NULL; INSN_LOCATOR (insn) = 0; Index: rtl.h
--- rtl.h (revision 122099)
+++ rtl.h (working copy)
@@ -741,13 +741,6 @@ extern void rtl_check_failed_flag (const
-1 means this instruction has not been recognized yet. /
#define INSN_CODE(INSN) XINT (INSN, 6)
-/ This is only used in combine and in the schedulers.
- Holds a chain of INSN_LIST rtx's whose first operands point at
- previous insns with direct data-flow connections to this one.
- That means that those insns set variables whose next use is in this insn.
- They are always in the same basic block as this insn. */
-#define LOG_LINKS(INSN) XEXP(INSN, 7)
#define RTX_FRAME_RELATED_P(RTX)
(RTL_FLAG_CHECK5("RTX_FRAME_RELATED_P", (RTX), INSN, CALL_INSN,
JUMP_INSN, BARRIER, SET)->frame_related)
@@ -790,7 +783,7 @@ extern void rtl_check_failed_flag (const
chain pointer and the first operand is the REG being described.
The mode field of the EXPR_LIST contains not a real machine mode
but a value from enum reg_note. */
-#define REG_NOTES(INSN) XEXP(INSN, 8)
+#define REG_NOTES(INSN) XEXP(INSN, 7)
enum reg_note { @@ -817,7 +810,7 @@ extern const char * const reg_note_name[ CLOBBER expressions document the registers explicitly clobbered by this CALL_INSN. Pseudo registers can not be mentioned in this list. */ -#define CALL_INSN_FUNCTION_USAGE(INSN) XEXP(INSN, 9) +#define CALL_INSN_FUNCTION_USAGE(INSN) XEXP(INSN, 8)
/* The label-number of a code-label. The assembler label is made from `L' and the label-number printed in decimal. @@ -952,7 +945,7 @@ enum label_kind /* In jump.c, each JUMP_INSN can point to a label that it can jump to, so that if the JUMP_INSN is deleted, the label's LABEL_NUSES can be decremented and possibly the label can be deleted. */ -#define JUMP_LABEL(INSN) XCEXP (INSN, 9, JUMP_INSN) +#define JUMP_LABEL(INSN) XCEXP (INSN, 8, JUMP_INSN)
/* Once basic blocks are found, each CODE_LABEL starts a chain that goes through all the LABEL_REFs that jump to that label. The chain
- References:
- [dataflow] speed up by 2%, patch 4/4 - remove LOG_LINKS field from insns
* From: Paolo Bonzini
- [dataflow] speed up by 2%, patch 4/4 - remove LOG_LINKS field from insns
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |