This is the mail archive of the gcc-patches@gcc.gnu.org mailing 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]

Tiny cse.c cleanup


Hi,

This is an eenie weenie tiny cute little cleanup for cse.c.  When calling
invalidate(), the full_mode argument is ignored except when X is a MEM.
So when we invalidate a REG, we know we don't have to pass a mode.

Bootstrapped&tested (c,c++,objc,fortran) on x86_64-linux.  OK now, or
otherwise OK when we go to stage1 of GCC 4.3?

Thanks,

Gr.
Steven



	* cse.c (flush_hash_table): Use VOIDmode to invalidate a REG.
	(cse_insn): Likewise for the stack_pointer_rtx.

Index: cse.c
===================================================================
--- cse.c       (revision 114443)
+++ cse.c       (working copy)
@@ -1724,7 +1724,7 @@ flush_hash_table (void)
        /* Note that invalidate can remove elements
           after P in the current hash chain.  */
        if (REG_P (p->exp))
-         invalidate (p->exp, p->mode);
+         invalidate (p->exp, VOIDmode);
        else
          remove_from_table (p, i);
       }
@@ -5723,7 +5723,7 @@ cse_insn (rtx insn, rtx libcall_insn)
          rtx addr = XEXP (dest, 0);
          if (GET_RTX_CLASS (GET_CODE (addr)) == RTX_AUTOINC
              && XEXP (addr, 0) == stack_pointer_rtx)
-           invalidate (stack_pointer_rtx, Pmode);
+           invalidate (stack_pointer_rtx, VOIDmode);
 #endif
          dest = fold_rtx (dest, insn);
        }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]