This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: patch to fix constant math -5th patch, rtl
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: Kenneth Zadeck <zadeck at naturalbridge dot com>, Mike Stump <mikestump at comcast dot net>, gcc-patches <gcc-patches at gcc dot gnu dot org>, Lawrence Crowl <crowl at google dot com>, Ian Lance Taylor <iant at google dot com>
- Date: Fri, 03 May 2013 14:23:17 +0100
- Subject: Re: patch to fix constant math -5th patch, rtl
- References: <506C72C7 dot 7090207 at naturalbridge dot com> <512D686B dot 90000 at naturalbridge dot com> <515EC4E7 dot 7040907 at naturalbridge dot com> <CAFiYyc3P8sFfFQT95yr_UZSOs-JOUefvCm0bxQe1ZSUDgcMg_A at mail dot gmail dot com> <871ua0qer8 dot fsf at sandifor-thinkpad dot stglab dot manchester dot uk dot ibm dot com> <CAFiYyc2kotJXQKT8sWu7UXKd5bYccpZKegMajRSt6BesAx-=ZA at mail dot gmail dot com> <87y5c8nhz2 dot fsf at sandifor-thinkpad dot stglab dot manchester dot uk dot ibm dot com> <CAFiYyc15V9NDk2dAJ9kZZ8wwoxts7bEm5eA5Lk8Tk2Erk9LWKg at mail dot gmail dot com> <87fvygngsw dot fsf at sandifor-thinkpad dot stglab dot manchester dot uk dot ibm dot com> <CAFiYyc0ufm=UFdxgesCxGVV5jO+V-4BJ5nJGLJP6mk8-Wqt=vQ at mail dot gmail dot com> <87txmwm0r9 dot fsf at sandifor-thinkpad dot stglab dot manchester dot uk dot ibm dot com> <CAFiYyc297Ev4J5ETxwXM3jQuAjj4Gb20bF2XaUCOgxTdrfF_NA at mail dot gmail dot com> <5178682F dot 2060807 at naturalbridge dot com> <5183A467 dot 2060508 at naturalbridge dot com> <5183AE0D dot 3060802 at naturalbridge dot com> <87ppx8i60o dot fsf at sandifor-thinkpad dot stglab dot manchester dot uk dot ibm dot com> <CAFiYyc0RBvaRuu_CHAedz3T0eTsY+1uB+r_OwdADkVnTT2aChg at mail dot gmail dot com>
Richard Biener <richard.guenther@gmail.com> writes:
>> 5) All const_ints in the .md files would need to be given a mode
>> (except for those places where const_int actually represents
>> a C++ constant, such as in attributes).
>>
>> I realise your list wasn't supposed to be exhaustive, and neither's mine :-)
>
> Now, do you think it is a good idea to assign integer constants a mode
> or not?
I think the answer was obvious: good idea. But it's an aspiration.
The huge amount of work involved means that it's out of scope unless
someone has several spare months on their hands.
The equivalent choice for wide_ints is not an aspiration. The choice
is in ours hands. So why force the class to use the old, problematic
model that rtl followed when (a) there are no compatiblity reasons
to do so and (b) Kenny has already written an implementation that
does it the better way?
The main reason we share the same CONST_INT and CONST_DOUBLE representation
for distinct constants is to save memory. Even that's not an advantage
for wide_int, since wide_ints are supposed to be short-lived stack objects.
Richard