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] |

*From*: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)*To*: mark at codesourcery dot com*Cc*: ebotcazou at adacore dot com, gcc-patches at gcc dot gnu dot org, iant at google dot com, matz at suse dot de, richard dot guenther at gmail dot com*Date*: Fri, 12 Oct 2007 14:55:30 EDT*Subject*: Re: [PATCH] Fix optimization regression in constant folder*References*: <200709171539.26653.ebotcazou@adacore.com> <470D0C50.4080506@codesourcery.com> <Pine.LNX.4.64.0710111658530.23011@wotan.suse.de> <10710111536.AA24058@vlsi1.ultra.nyu.edu> <Pine.LNX.4.64.0710111756080.23011@wotan.suse.de> <10710111616.AA25194@vlsi1.ultra.nyu.edu> <Pine.LNX.4.64.0710111828400.23011@wotan.suse.de> <10710111651.AA26098@vlsi1.ultra.nyu.edu> <Pine.LNX.4.64.0710111853060.23011@wotan.suse.de> <m3r6k13728.fsf@localhost.localdomain> <Pine.LNX.4.64.0710112011530.23011@wotan.suse.de> <10710111850.AA27 912@vlsi1.ultra.nyu.edu> <Pine.LNX.4.64.0710112057570.2 <m3ve9d1h27.fsf@localhost.localdomain> <10710120240.AA03734@vlsi1.ultra.nyu.edu> <m3wsttymh6.fsf@localhost.localdomain> <470EFE64.6070204@codesourcery.com> <10710121235.AA10499@vlsi1.ultra.nyu.edu> <470FB37B.9040904@codesourcery.com> <10710121812.AA17868@vlsi1.ultra.nyu.edu> <470FBED1.9010108@codesourcery.com>

> So, in particular, when you pass (0, 0xffffffff) to fit_double_type, > using an unsigned sizetype as a the type, you end up with (0xffffffff, > 0xffffffff) as your representation, assuming 32-bit HOST_WIDE_INT and > 32-bit sizetype. I wasn't aware we do that and it seems peculiar to me. I doubt it matters either way how we handle that, though. > 3. Unsigned sizetypes are treated as if TYPE_OVERFLOW_UNDEFINED (i.e., > as if they were signed) was defined in the case of multiply/division > that cancel. (See extract_muldiv_1.) In that case, yes, but treated as if overflow wraps for the other case (the association cases). > I'm not sure how sizetype is a win over representing sizes as size_t, > differences between sizes as ptrdiff_t, and performing operations on > sizes by first doing a bit-preserving cast from size_t to ptrdiff_t, > then doing all the operations on ptrdiff_t, and then casting back if > necessary. Because size_t, being user-visible, has to have a consistent view of the handling of overflow (whether it's defined or wraps) and sizetypes don't and the latter allows more optimizations. As to conversions, I don't see much code that computes the difference between sizes (indeed I can't think of any such at the moment), so I can't really comment on it, but I do worry about adding too many conversions for lots of reasons.

**References**:**Re: [PATCH] Fix optimization regression in constant folder***From:*Mark Mitchell

**Re: [PATCH] Fix optimization regression in constant folder***From:*Michael Matz

**Re: [PATCH] Fix optimization regression in constant folder***From:*Richard Kenner

**Re: [PATCH] Fix optimization regression in constant folder***From:*Michael Matz

**Re: [PATCH] Fix optimization regression in constant folder***From:*Richard Kenner

**Re: [PATCH] Fix optimization regression in constant folder***From:*Michael Matz

**Re: [PATCH] Fix optimization regression in constant folder***From:*Richard Kenner

**Re: [PATCH] Fix optimization regression in constant folder***From:*Michael Matz

**Re: [PATCH] Fix optimization regression in constant folder***From:*Ian Lance Taylor

**Re: [PATCH] Fix optimization regression in constant folder***From:*Michael Matz

**Re: [PATCH] Fix optimization regression in constant folder***From:*Ian Lance Taylor

**Re: [PATCH] Fix optimization regression in constant folder***From:*Richard Kenner

**Re: [PATCH] Fix optimization regression in constant folder***From:*Ian Lance Taylor

**Re: [PATCH] Fix optimization regression in constant folder***From:*Mark Mitchell

**Re: [PATCH] Fix optimization regression in constant folder***From:*Richard Kenner

**Re: [PATCH] Fix optimization regression in constant folder***From:*Mark Mitchell

**Re: [PATCH] Fix optimization regression in constant folder***From:*Richard Kenner

**Re: [PATCH] Fix optimization regression in constant folder***From:*Mark Mitchell

Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|

Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |