Zdenek Dvorak - Re: [patch] (-fstrict-overflow) optimize counted loops on signed iv (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] |
- From: Zdenek Dvorak
- To: Richard Guenther
- Cc: Christian BRUEL , Ian Lance Taylor , gcc-patches at gcc dot gnu dot org
- Date: Thu, 15 Feb 2007 17:00:28 +0100
- Subject: Re: [patch] (-fstrict-overflow) optimize counted loops on signed iv
- References: <20070215093343.GA19299@atrey.karlin.mff.cuni.cz> <45D43AB6.4020709@st.com> <20070215111752.GA17650@atrey.karlin.mff.cuni.cz> <45D45681.1070902@st.com> <84fc9c000702150458r68b7d33bka3b4bf15dfc7c67f@mail.gmail.com> <20070215130453.GA1624@atrey.karlin.mff.cuni.cz> <84fc9c000702150644w246d3fcdv9486e60886e5ae64@mail.gmail.com> <20070215150023.GA16758@atrey.karlin.mff.cuni.cz> <84fc9c000702150732x79a77479m6d2a03738f8832e@mail.gmail.com> <84fc9c000702150748y4ea6ba39kd663508042740722@mail.gmail.com>
Hello,
But of course the following is the problem:
Index: fold-const.c
*** fold-const.c (revision 121992) --- fold-const.c (working copy) *************** tree_swap_operands_p (tree arg0, tree ar *** 6668,6676 **** && (TREE_SIDE_EFFECTS (arg0) || TREE_SIDE_EFFECTS (arg1))) return 0;
! if (DECL_P (arg1)) return 0; ! if (DECL_P (arg0)) return 1;
/* It is preferable to swap two SSA_NAME to ensure a canonical form --- 6668,6676 ---- && (TREE_SIDE_EFFECTS (arg0) || TREE_SIDE_EFFECTS (arg1))) return 0;
! if (DECL_P (arg1) || TREE_CODE (arg1) == SSA_NAME) return 0; ! if (DECL_P (arg0) || TREE_CODE (arg0) == SSA_NAME) return 1;
/* It is preferable to swap two SSA_NAME to ensure a canonical form
I'll bootstrap and test it.
makes sense, although it won't fix the problem in general (e.g., 2 * a < 2 * a + 4 still would not be folded).
Zdenek
- Follow-Ups:
- Re: [patch] (-fstrict-overflow) optimize counted loops on signed iv
* From: Richard Guenther
- Re: [patch] (-fstrict-overflow) optimize counted loops on signed iv
- References:
- Re: [patch] (-fstrict-overflow) optimize counted loops on signed iv
* From: Zdenek Dvorak - Re: [patch] (-fstrict-overflow) optimize counted loops on signed iv
* From: Christian BRUEL - Re: [patch] (-fstrict-overflow) optimize counted loops on signed iv
* From: Zdenek Dvorak - Re: [patch] (-fstrict-overflow) optimize counted loops on signed iv
* From: Christian BRUEL - Re: [patch] (-fstrict-overflow) optimize counted loops on signed iv
* From: Richard Guenther - Re: [patch] (-fstrict-overflow) optimize counted loops on signed iv
* From: Zdenek Dvorak - Re: [patch] (-fstrict-overflow) optimize counted loops on signed iv
* From: Richard Guenther - Re: [patch] (-fstrict-overflow) optimize counted loops on signed iv
* From: Zdenek Dvorak - Re: [patch] (-fstrict-overflow) optimize counted loops on signed iv
* From: Richard Guenther - Re: [patch] (-fstrict-overflow) optimize counted loops on signed iv
* From: Richard Guenther
- Re: [patch] (-fstrict-overflow) optimize counted loops on signed iv
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |