This is the mail archive of the 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]

Re: [PATCH] PR tree-optimization/43833

On Mon, Apr 26, 2010 at 3:17 AM, Jie Zhang <> wrote:
> On 04/25/2010 02:05 AM, Richard Guenther wrote:
>> On Sat, Apr 24, 2010 at 2:40 AM, Jie Zhang<> ?wrote:
>>> On 04/24/2010 12:56 AM, Paolo Bonzini wrote:
>>>> All sounds very nice...
>>>>> This new patch also uses int_const_binop for BIT_AND_EXPR folding
>>>>> instead of doing it itself.
>>>> ... but you attached a reload patch instead. :-)
>>> Oops, sorry. This right one is attached.
>> What about my suggestion?
> Seems much heavier. :-) ?I think we can first install my patch for 4.4, 4.5
> and trunk, then implement your idea on trunk.

This isn't a regression fix and thus not applicable for 4.4 nor 4.5.
As for trunk I'd rather _not_ continue re-implementing CCP inside

> Honestly, I don't know how to implement your idea. Can you point me a pass
> to take a look which is similar? I will be glad to have a try. Thanks.

Well, there isn't a pass which does this particular thing.  But the
simple idea is to re-use CCPs constant folder from other passes
where they do constant folding (such as VRP with singleton
value-ranges).  The CCP folder is contained in the single function
ccp_fold which gets all its information from the passed argument
plus the CCP lattice (via the CCP local get_value ()).  All that
is needed to expose the CCP folder to wider audience is to
make the lattice used configurable (either by providing a
complete CCP compatible lattice or by making get_value a hook
in that function).

The VRP lattice translates to CCP CONSTANT for singletons and
otherwise to VARYING.


> Jie

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