On Fri, Oct 12, 2012 at 4:22 AM, Richard Biener
wrote:
> I also think that instead of
>
>>> if (cgraph_node *q = p->cast_to ())
>
> we want
>
> if ((q = cast_to (p))
>
> I see absolutely no good reason to make cast_to a member, given
> that the language has static_cast, const_cast and stuff
On Sat, Oct 13, 2012 at 12:44 PM, Lawrence Crowl wrote:
>> Thus, please re-use or follow existing concepts.
>
> Both are existing concepts. What I proposed is a common technique
> for avoiding the cost of dynamic_cast when down casting in a class
> hierarchy. Both concepts will work. I propose
On 10/12/12, Richard Biener wrote:
> On Oct 11, 2012 Xinliang David Li wrote:
>> On Oct 11, 2012 Lawrence Crowl wrote:
>>> On 10/10/12, Xinliang David Li wrote:
In a different thread, I proposed the following alternative to
'try_xxx':
template T* symbol::cast_to(symbol* p) {
On Fri, Oct 12, 2012 at 1:22 AM, Richard Biener
wrote:
> On Thu, Oct 11, 2012 at 10:39 PM, Xinliang David Li
> wrote:
>> On Thu, Oct 11, 2012 at 1:23 PM, Lawrence Crowl wrote:
>>> On 10/10/12, Xinliang David Li wrote:
In a different thread, I proposed the following alternative to 'try_xxx
On Thu, Oct 11, 2012 at 10:39 PM, Xinliang David Li wrote:
> On Thu, Oct 11, 2012 at 1:23 PM, Lawrence Crowl wrote:
>> On 10/10/12, Xinliang David Li wrote:
>>> In a different thread, I proposed the following alternative to 'try_xxx':
>>>
>>> template T* symbol::cast_to(symbol* p) {
>>>if (p
On Thu, Oct 11, 2012 at 1:23 PM, Lawrence Crowl wrote:
> On 10/10/12, Xinliang David Li wrote:
>> In a different thread, I proposed the following alternative to 'try_xxx':
>>
>> template T* symbol::cast_to(symbol* p) {
>>if (p->is())
>> return static_cast(p);
>>return 0;
>> }
>>
>>
On 10/10/12, Xinliang David Li wrote:
> In a different thread, I proposed the following alternative to 'try_xxx':
>
> template T* symbol::cast_to(symbol* p) {
>if (p->is())
> return static_cast(p);
>return 0;
> }
>
> cast:
>
> template T& symbol:as(symbol* p) {
>assert(p->is())
On Thu, Oct 11, 2012 at 7:31 AM, Xinliang David Li wrote:
> On Fri, Oct 5, 2012 at 1:49 AM, Richard Guenther
> wrote:
>> On Thu, Oct 4, 2012 at 8:16 PM, Diego Novillo wrote:
>>> On Thu, Oct 4, 2012 at 2:14 PM, Lawrence Crowl wrote:
>>>
So, Jan Hubicka requested and approved the current spe
On Fri, Oct 5, 2012 at 1:49 AM, Richard Guenther
wrote:
> On Thu, Oct 4, 2012 at 8:16 PM, Diego Novillo wrote:
>> On Thu, Oct 4, 2012 at 2:14 PM, Lawrence Crowl wrote:
>>
>>> So, Jan Hubicka requested and approved the current spelling.
>>> What now?
>>
>> I don't think we should hold this up. T
On Wed, Sep 19, 2012 at 11:39 AM, Lawrence Crowl wrote:
> On 9/19/12, Gabriel Dos Reis wrote:
>> On Sep 19, 2012 Richard Guenther wrote:
>> > Indeed. Btw, can we not provide a specialization for
>> > dynamic_cast <>? This ->try_... looks awkward to me compared
>> > to the more familiar
>> >
>>
In a different thread, I proposed the following alternative to 'try_xxx':
template T* symbol::cast_to(symbol* p) {
if (p->is())
return static_cast(p);
return 0;
}
cast:
template T& symbol:as(symbol* p) {
assert(p->is())
return static_cast(*p);
}
David
On Wed, Sep 19, 2012
On Tue, Oct 9, 2012 at 8:03 PM, Lawrence Crowl wrote:
> I would like some clarity. Can I commit this patch?
I'm thinking, yes. I will be making the gengtype changes in time for
stage 1, so further renames can continue after those patches are in.
Jan, Richard? Any strong objections?
Diego.
On 10/5/12, Jan Hubicka wrote:
>> On Thu, Oct 4, 2012 at 8:16 PM, Diego Novillo wrote:
>> > On Thu, Oct 4, 2012 at 2:14 PM, Lawrence Crowl wrote:
>> >
>> >> So, Jan Hubicka requested and approved the current spelling.
>> >> What now?
>> >
>> > I don't think we should hold this up. The names Jan
On Fri, Oct 5, 2012 at 11:50 PM, Lawrence Crowl wrote:
> If no one cares about these time reports, then I will gladly stop
> spending the effort to make them.
It's not that no-one cases, I think, but the mathematics don't have to
be so complicated. Just showing or saying there's no significant
co
On 10/5/12, Diego Novillo wrote:
> On Oct 5, 2012 Richard Guenther wrote:
> > Sorry, that wasn't intended. I question these numbers because
> > unless you bootstrap say 100 times the noise in bootstrap
> > speed is way too high to make such claims. Of course critical
> > information is missing:
On Fri, Oct 5, 2012 at 2:43 PM, Diego Novillo wrote:
> Because (...) there has been so much
> negative pressure on our work, that we sometimes try to find some
> benefit when reality may provide neutral results.
When people say "your work sucks", they probably don't mean to apply
negative pressure
On Fri, Oct 5, 2012 at 2:43 PM, Diego Novillo wrote:
> Because (...) there has been so much
> negative pressure on our work, that we sometimes try to find some
> benefit when reality may provide neutral results.
When people say "your work sucks", they probably don't mean to apply
negative pressure
On Fri, Oct 5, 2012 at 7:05 AM, Richard Guenther
wrote:
> Sorry, that wasn't intended. I question these numbers because
> unless you bootstrap say 100 times the noise in bootstrap speed
> is way too high to make such claims. Of course critical information
> is missing:
I agree with Nathan. Yo
On Fri, Oct 5, 2012 at 12:50 PM, Nathan Froyd wrote:
> - Original Message -
>> I see all these patches with mixed feeling - it puts breaks on all
>> developers
>> because they need to learn the new interface which does not bring any
>> immediate benefit. So I think _your_ development time
- Original Message -
> I see all these patches with mixed feeling - it puts breaks on all
> developers
> because they need to learn the new interface which does not bring any
> immediate benefit. So I think _your_ development time would be
> better
> spent by fixing open bugs or by tacklin
> On Thu, Oct 4, 2012 at 8:16 PM, Diego Novillo wrote:
> > On Thu, Oct 4, 2012 at 2:14 PM, Lawrence Crowl wrote:
> >
> >> So, Jan Hubicka requested and approved the current spelling.
> >> What now?
> >
> > I don't think we should hold this up. The names Jan requested seem
> > reasonable enough.
On Thu, Oct 4, 2012 at 8:16 PM, Diego Novillo wrote:
> On Thu, Oct 4, 2012 at 2:14 PM, Lawrence Crowl wrote:
>
>> So, Jan Hubicka requested and approved the current spelling.
>> What now?
>
> I don't think we should hold this up. The names Jan requested seem
> reasonable enough. We seem to be r
On Thu, Oct 4, 2012 at 2:14 PM, Lawrence Crowl wrote:
> So, Jan Hubicka requested and approved the current spelling.
> What now?
I don't think we should hold this up. The names Jan requested seem
reasonable enough. We seem to be running in circles here.
Diego.
Updated Patch
Add functions symtab_node_def::try_function and symtab_node_def::try_variable.
These function return a pointer to the more specific type (e.g. cgraph_node*)
if and only if the general type (symtab_node aka symtab_node_def*) is an
instance of the specific type. These functions are es
Add functions symtab_node_def::try_function and symtab_node_def::try_variable.
These function return a pointer to the more specific type (e.g. cgraph_node*)
if and only if the general type (symtab_node aka symtab_node_def*) is an
instance of the specific type. These functions are essentially check
On 9/20/12, Gabriel Dos Reis wrote:
> On Sep 20, 2012 Lawrence Crowl wrote:
> > > > Why do you think cascading ifs is a bad idea?
> > >
> > > Precedent. Confusion in case of dangling else (requiring
> > > more {}, and hence even more indentation). Ugly.
> >
> > I generally take ugly as an indic
On Thu, Sep 20, 2012 at 1:53 PM, Lawrence Crowl wrote:
>> > Why do you think cascading ifs is a bad idea?
>>
>> Precedent. Confusion in case of dangling else (requiring more {},
>> and hence even more indentation). Ugly.
>
> I generally take ugly as an indication that the function needs
> refac
On 9/20/12, Michael Matz wrote:
> On Wed, 19 Sep 2012, Lawrence Crowl wrote:
> > On 9/19/12, Eric Botcazou wrote:
> > > > The language syntax would bind the conditional into the
> > > > intializer, as in
> > > >
> > > > if (varpool_node *vnode = (node->try_variable ()
> > > >
Hi,
On Wed, 19 Sep 2012, Lawrence Crowl wrote:
> On 9/19/12, Eric Botcazou wrote:
> > > The language syntax would bind the conditional into the
> > > intializer, as in
> > >
> > > if (varpool_node *vnode = (node->try_variable ()
> > > && vnode->finalized))
> > >
Hi,
On Wed, 19 Sep 2012, Richard Guenther wrote:
> > Just write:
> >
> > varpool_node *vnode;
> >
> > if ((vnode = node->try_variable ()) && vnode->finalized)
> > varpool_analyze_node (vnode);
> >
> > This has been the standard style for the past 2 decades and trading it for
> > cascading
On 9/19/12, Gabriel Dos Reis wrote:
> On Wed, Sep 19, 2012 at 1:39 PM, Lawrence Crowl wrote:
>> On 9/19/12, Gabriel Dos Reis wrote:
>>> On Sep 19, 2012 Richard Guenther wrote:
>>> > Indeed. Btw, can we not provide a specialization for
>>> > dynamic_cast <>? This ->try_... looks awkward to me
On Wed, Sep 19, 2012 at 1:39 PM, Lawrence Crowl wrote:
> On 9/19/12, Gabriel Dos Reis wrote:
>> On Sep 19, 2012 Richard Guenther wrote:
>> > Indeed. Btw, can we not provide a specialization for
>> > dynamic_cast <>? This ->try_... looks awkward to me compared
>> > to the more familiar
>> >
>>
On 9/19/12, Gabriel Dos Reis wrote:
> On Sep 19, 2012 Richard Guenther wrote:
> > Indeed. Btw, can we not provide a specialization for
> > dynamic_cast <>? This ->try_... looks awkward to me compared
> > to the more familiar
> >
> > vnode = dynamic_cast (node)
> >
> > but yeah - dynamic_cast i
On 9/19/12, Eric Botcazou wrote:
> > The language syntax would bind the conditional into the
> > intializer, as in
> >
> > if (varpool_node *vnode = (node->try_variable ()
> > && vnode->finalized))
> > varpool_analyze_node (vnode);
> >
> > which does not type-mat
On Wed, Sep 19, 2012 at 4:17 AM, Richard Guenther
wrote:
> On Wed, Sep 19, 2012 at 9:29 AM, Eric Botcazou wrote:
>>>
>>> The language syntax would bind the conditional into the intializer, as in
>>>
>>> if (varpool_node *vnode = (node->try_variable ()
>>> && vnode->
On Wed, Sep 19, 2012 at 9:29 AM, Eric Botcazou wrote:
>>
>> The language syntax would bind the conditional into the intializer, as in
>>
>> if (varpool_node *vnode = (node->try_variable ()
>> && vnode->finalized))
>> varpool_analyze_node (vnode);
>>
>> which does
>
> The language syntax would bind the conditional into the intializer, as in
>
> if (varpool_node *vnode = (node->try_variable ()
> && vnode->finalized))
> varpool_analyze_node (vnode);
>
> which does not type-match.
>
> So, if you want the type saftey and pe
On 9/18/12, Richard Guenther wrote:
> On Sep 18, 2012 Lawrence Crowl wrote:
> > * cgraph.h (varpool_node): Rename to varpool_node_for_tree.
>
> Sure it should be varpool_node_for_decl, if any.
> Or varpool_node_from_decl (grep for what is more common)
Grep says _for_decl wins over _from_decl by
On 9/18/12, Eric Botcazou wrote:
>> When, the property test is embedded within a larger condition, a little
>> restructuring is required to pull out the secondary conditions. For
>> example,
>>
>> if (symtab_variable_p (node)
>> && varpool (node)->finalized)
>> varpool_analyze_node (v
> When, the property test is embedded within a larger condition, a little
> restructuring is required to pull out the secondary conditions. For
> example,
>
> if (symtab_variable_p (node)
> && varpool (node)->finalized)
> varpool_analyze_node (varpool (node));
>
> becomes
>
> if (
40 matches
Mail list logo