Re: [PATCH] middle-end/114931 - type_hash_canon and structual equality types

2024-05-07 Thread Richard Biener
On Mon, 6 May 2024, Martin Uecker wrote: > Am Montag, dem 06.05.2024 um 11:07 +0200 schrieb Richard Biener: > > On Mon, 6 May 2024, Martin Uecker wrote: > > > > > Am Montag, dem 06.05.2024 um 09:00 +0200 schrieb Richard Biener: > > > > On Sat, 4 May 2024, Martin Uecker wrote: > > > > > > > > >

Re: [PATCH] middle-end/114931 - type_hash_canon and structual equality types

2024-05-06 Thread Martin Uecker
Am Montag, dem 06.05.2024 um 11:07 +0200 schrieb Richard Biener: > On Mon, 6 May 2024, Martin Uecker wrote: > > > Am Montag, dem 06.05.2024 um 09:00 +0200 schrieb Richard Biener: > > > On Sat, 4 May 2024, Martin Uecker wrote: > > > > > > > Am Freitag, dem 03.05.2024 um 21:16 +0200 schrieb Jakub

Re: [PATCH] middle-end/114931 - type_hash_canon and structual equality types

2024-05-06 Thread Richard Biener
On Mon, 6 May 2024, Martin Uecker wrote: > Am Montag, dem 06.05.2024 um 09:00 +0200 schrieb Richard Biener: > > On Sat, 4 May 2024, Martin Uecker wrote: > > > > > Am Freitag, dem 03.05.2024 um 21:16 +0200 schrieb Jakub Jelinek: > > > > > On Fri, May 03, 2024 at 09:11:20PM +0200, Martin Uecker

Re: [PATCH] middle-end/114931 - type_hash_canon and structual equality types

2024-05-06 Thread Martin Uecker
Am Montag, dem 06.05.2024 um 09:00 +0200 schrieb Richard Biener: > On Sat, 4 May 2024, Martin Uecker wrote: > > > Am Freitag, dem 03.05.2024 um 21:16 +0200 schrieb Jakub Jelinek: > > > > On Fri, May 03, 2024 at 09:11:20PM +0200, Martin Uecker wrote: > > > > > > > > TYPE_CANONICAL as used by the

Re: [PATCH] middle-end/114931 - type_hash_canon and structual equality types

2024-05-06 Thread Richard Biener
On Sat, 4 May 2024, Martin Uecker wrote: > Am Freitag, dem 03.05.2024 um 21:16 +0200 schrieb Jakub Jelinek: > > > On Fri, May 03, 2024 at 09:11:20PM +0200, Martin Uecker wrote: > > > > > > > TYPE_CANONICAL as used by the middle-end cannot express this but > > > > > > > > > > Hm. so how does it

Re: [PATCH] middle-end/114931 - type_hash_canon and structual equality types

2024-05-04 Thread Martin Uecker
Am Freitag, dem 03.05.2024 um 21:16 +0200 schrieb Jakub Jelinek: > > On Fri, May 03, 2024 at 09:11:20PM +0200, Martin Uecker wrote: > > > > > > TYPE_CANONICAL as used by the middle-end cannot express this but > > > > > > > > Hm. so how does it work now for arrays? > > > > Do you have a testcase

Re: [PATCH] middle-end/114931 - type_hash_canon and structual equality types

2024-05-03 Thread Jakub Jelinek
On Fri, May 03, 2024 at 09:11:20PM +0200, Martin Uecker wrote: > > TYPE_CANONICAL as used by the middle-end cannot express this but > > Hm. so how does it work now for arrays? Do you have a testcase which doesn't work correctly with the arrays? E.g. same_type_for_tbaa has type1 =

Re: [PATCH] middle-end/114931 - type_hash_canon and structual equality types

2024-05-03 Thread Martin Uecker
Am Freitag, dem 03.05.2024 um 20:48 +0200 schrieb Richard Biener: > > > Am 03.05.2024 um 20:37 schrieb Martin Uecker : > > > > Am Freitag, dem 03.05.2024 um 20:18 +0200 schrieb Jakub Jelinek: > > > > On Fri, May 03, 2024 at 08:04:18PM +0200, Martin Uecker wrote: > > > > A change that is not

Re: [PATCH] middle-end/114931 - type_hash_canon and structual equality types

2024-05-03 Thread Richard Biener
> Am 03.05.2024 um 20:37 schrieb Martin Uecker : > > Am Freitag, dem 03.05.2024 um 20:18 +0200 schrieb Jakub Jelinek: >>> On Fri, May 03, 2024 at 08:04:18PM +0200, Martin Uecker wrote: >>> A change that is not optimal but would avoid a lot of trouble is to >>> only use the tag of the struct

Re: [PATCH] middle-end/114931 - type_hash_canon and structual equality types

2024-05-03 Thread Martin Uecker
Am Freitag, dem 03.05.2024 um 20:18 +0200 schrieb Jakub Jelinek: > On Fri, May 03, 2024 at 08:04:18PM +0200, Martin Uecker wrote: > > A change that is not optimal but would avoid a lot of trouble is to > > only use the tag of the struct for computing a TYPE_CANONICAL, which > > could then be set

Re: [PATCH] middle-end/114931 - type_hash_canon and structual equality types

2024-05-03 Thread Jakub Jelinek
On Fri, May 03, 2024 at 08:04:18PM +0200, Martin Uecker wrote: > A change that is not optimal but would avoid a lot of trouble is to > only use the tag of the struct for computing a TYPE_CANONICAL, which > could then be set already for incomplete types and never needs to > change again. We would

Re: [PATCH] middle-end/114931 - type_hash_canon and structual equality types

2024-05-03 Thread Martin Uecker
Am Freitag, dem 03.05.2024 um 19:30 +0200 schrieb Jakub Jelinek: > On Fri, May 03, 2024 at 05:32:12PM +0200, Martin Uecker wrote: > > Am Freitag, dem 03.05.2024 um 14:13 +0200 schrieb Richard Biener: > > > TYPE_STRUCTURAL_EQUALITY_P is part of our type system so we have > > > to make sure to

Re: [PATCH] middle-end/114931 - type_hash_canon and structual equality types

2024-05-03 Thread Martin Uecker
Am Freitag, dem 03.05.2024 um 18:23 +0200 schrieb Richard Biener: > > > Am 03.05.2024 um 17:33 schrieb Martin Uecker : > > > > Am Freitag, dem 03.05.2024 um 14:13 +0200 schrieb Richard Biener: > > > TYPE_STRUCTURAL_EQUALITY_P is part of our type system so we have > > > to make sure to include

Re: [PATCH] middle-end/114931 - type_hash_canon and structual equality types

2024-05-03 Thread Jakub Jelinek
On Fri, May 03, 2024 at 05:32:12PM +0200, Martin Uecker wrote: > Am Freitag, dem 03.05.2024 um 14:13 +0200 schrieb Richard Biener: > > TYPE_STRUCTURAL_EQUALITY_P is part of our type system so we have > > to make sure to include that into the type unification done via > > type_hash_canon. This

Re: [PATCH] middle-end/114931 - type_hash_canon and structual equality types

2024-05-03 Thread Richard Biener
> Am 03.05.2024 um 17:33 schrieb Martin Uecker : > > Am Freitag, dem 03.05.2024 um 14:13 +0200 schrieb Richard Biener: >> TYPE_STRUCTURAL_EQUALITY_P is part of our type system so we have >> to make sure to include that into the type unification done via >> type_hash_canon. This requires the

Re: [PATCH] middle-end/114931 - type_hash_canon and structual equality types

2024-05-03 Thread Martin Uecker
Am Freitag, dem 03.05.2024 um 14:13 +0200 schrieb Richard Biener: > TYPE_STRUCTURAL_EQUALITY_P is part of our type system so we have > to make sure to include that into the type unification done via > type_hash_canon. This requires the flag to be set before querying > the hash which is the

[PATCH] middle-end/114931 - type_hash_canon and structual equality types

2024-05-03 Thread Richard Biener
TYPE_STRUCTURAL_EQUALITY_P is part of our type system so we have to make sure to include that into the type unification done via type_hash_canon. This requires the flag to be set before querying the hash which is the biggest part of the patch. Bootstrapped and tested on x86_64-unknown-linux-gnu