On Thu, 12 Nov 2020, Jan Hubicka wrote:
> > On Thu, 12 Nov 2020, Jan Hubicka wrote:
> >
> > > Hi,
> > > this is updated patch I am re-testing and plan to commit if it suceeds.
> > >
> > > * fold-const.c (operand_compare::operand_equal_p): Compare
> > > offsets of fields in component_refs whe
> On Thu, 12 Nov 2020, Jan Hubicka wrote:
>
> > Hi,
> > this is updated patch I am re-testing and plan to commit if it suceeds.
> >
> > * fold-const.c (operand_compare::operand_equal_p): Compare
> > offsets of fields in component_refs when comparing addresses.
> > (operand_compare::ha
On Thu, 12 Nov 2020, Jan Hubicka wrote:
> Hi,
> this is updated patch I am re-testing and plan to commit if it suceeds.
>
> * fold-const.c (operand_compare::operand_equal_p): Compare
> offsets of fields in component_refs when comparing addresses.
> (operand_compare::hash_operand
Hi,
this is updated patch I am re-testing and plan to commit if it suceeds.
* fold-const.c (operand_compare::operand_equal_p): Compare
offsets of fields in component_refs when comparing addresses.
(operand_compare::hash_operand): Likewise.
diff --git a/gcc/fold-const.c b/gc
> > * fold-const.c (operand_compare::operand_equal_p): When comparing
> > addresses
> > look info field offsets for COMPONENT_REFs.
> > (operand_compare::hash_operand): Likewise.
> > diff --git a/gcc/fold-const.c b/gcc/fold-const.c
> > index c47557daeba..a4e8cccb1b7 100644
> > --- a/gc
On Thu, 12 Nov 2020, Jan Hubicka wrote:
> Hi,
> with ipa-icf we often run into problem that operand_equal_p does not
> match ADDR_EXPR that take address of fields from two different instances
> of same class (at ideantical offsets). Similar problem can also happen
> for record types with LTO if t
> > How is that different from:
> > struct S { long long d; int e; };
> > struct T { long long d; long long e; };
> > s->e vs. t->e ?
> > One thing is comparison of the address (as it is comparing
> > DECL_FIELD_BIT_OFFSET too, it is essentially bit-address), and another thing
> > (unlrelated to OE
> On Thu, Nov 12, 2020 at 11:39:07AM +0100, Jan Hubicka wrote:
> > > On Thu, Nov 12, 2020 at 11:29:21AM +0100, Jan Hubicka wrote:
> > > > > If OEP_ADDRESS is used also on non-addressable stuff, just to compare
> > > > > that two COMPONENT_REFs access the same memory, then just comparing
> > > > > D
On Thu, Nov 12, 2020 at 11:39:07AM +0100, Jan Hubicka wrote:
> > On Thu, Nov 12, 2020 at 11:29:21AM +0100, Jan Hubicka wrote:
> > > > If OEP_ADDRESS is used also on non-addressable stuff, just to compare
> > > > that two COMPONENT_REFs access the same memory, then just comparing
> > > > DECL_BIT_FI
> On Thu, Nov 12, 2020 at 11:29:21AM +0100, Jan Hubicka wrote:
> > > If OEP_ADDRESS is used also on non-addressable stuff, just to compare
> > > that two COMPONENT_REFs access the same memory, then just comparing
> > > DECL_BIT_FIELD_REPRESENTATIVE is not sufficient, you could have:
> > > struct S
On Thu, Nov 12, 2020 at 11:29:21AM +0100, Jan Hubicka wrote:
> > If OEP_ADDRESS is used also on non-addressable stuff, just to compare
> > that two COMPONENT_REFs access the same memory, then just comparing
> > DECL_BIT_FIELD_REPRESENTATIVE is not sufficient, you could have:
> > struct S { int c; i
> On Thu, Nov 12, 2020 at 10:49:40AM +0100, Jan Hubicka wrote:
> > > > + if (!operand_equal_p (DECL_FIELD_OFFSET (field0),
> > > > + DECL_FIELD_OFFSET (field1),
> > > > + flags & ~OEP_ADDRESS_OF)
> > > > +
On Thu, Nov 12, 2020 at 10:49:40AM +0100, Jan Hubicka wrote:
> > > + if (!operand_equal_p (DECL_FIELD_OFFSET (field0),
> > > + DECL_FIELD_OFFSET (field1),
> > > + flags & ~OEP_ADDRESS_OF)
> > > + || !operand_equ
> > + if (!operand_equal_p (DECL_FIELD_OFFSET (field0),
> > + DECL_FIELD_OFFSET (field1),
> > + flags & ~OEP_ADDRESS_OF)
> > + || !operand_equal_p (DECL_FIELD_BIT_OFFSET (field0),
> > +
On Thu, Nov 12, 2020 at 10:36:28AM +0100, Jan Hubicka wrote:
> * fold-const.c (operand_compare::operand_equal_p): When comparing
> addresses
> look info field offsets for COMPONENT_REFs.
> (operand_compare::hash_operand): Likewise.
> diff --git a/gcc/fold-const.c b/gcc/fold-const
Hi,
with ipa-icf we often run into problem that operand_equal_p does not
match ADDR_EXPR that take address of fields from two different instances
of same class (at ideantical offsets). Similar problem can also happen
for record types with LTO if they did not get tree merged.
This patch makes fold-
16 matches
Mail list logo