Re: [PATCH] Change gcc/ira-conflicts.cc build_conflict_bit_table to use size_t/%zu

2024-02-09 Thread Richard Biener
On Thu, Feb 1, 2024 at 4:26 PM Jakub Jelinek wrote: > > On Thu, Feb 01, 2024 at 03:55:51PM +0100, Jakub Jelinek wrote: > > No, besides the formatting being incorrect both in ChangeLog and in the > > patch, this pessimizes ILP32 hosts unnecessarily. > > So like this instead? OK. Thanks, Richard.

Re: [PATCH] Change gcc/ira-conflicts.cc build_conflict_bit_table to use size_t/%zu

2024-02-02 Thread Jakub Jelinek
On Fri, Feb 02, 2024 at 11:43:21PM +, Jonathan Yong wrote: > On 2/1/24 15:33, Jonathan Yong wrote: > > On 2/1/24 15:25, Jakub Jelinek wrote: > > > On Thu, Feb 01, 2024 at 03:55:51PM +0100, Jakub Jelinek wrote: > > > > No, besides the formatting being incorrect both in ChangeLog and in the > >

Re: [PATCH] Change gcc/ira-conflicts.cc build_conflict_bit_table to use size_t/%zu

2024-02-02 Thread Jonathan Yong
On 2/1/24 15:33, Jonathan Yong wrote: On 2/1/24 15:25, Jakub Jelinek wrote: On Thu, Feb 01, 2024 at 03:55:51PM +0100, Jakub Jelinek wrote: No, besides the formatting being incorrect both in ChangeLog and in the patch, this pessimizes ILP32 hosts unnecessarily. So like this instead?

Re: [PATCH] Change gcc/ira-conflicts.cc build_conflict_bit_table to use size_t/%zu

2024-02-01 Thread Jonathan Yong
On 2/1/24 15:25, Jakub Jelinek wrote: On Thu, Feb 01, 2024 at 03:55:51PM +0100, Jakub Jelinek wrote: No, besides the formatting being incorrect both in ChangeLog and in the patch, this pessimizes ILP32 hosts unnecessarily. So like this instead? 2024-02-01 Jakub Jelinek * hwint.h

Re: [PATCH] Change gcc/ira-conflicts.cc build_conflict_bit_table to use size_t/%zu

2024-02-01 Thread Jakub Jelinek
On Thu, Feb 01, 2024 at 03:55:51PM +0100, Jakub Jelinek wrote: > No, besides the formatting being incorrect both in ChangeLog and in the > patch, this pessimizes ILP32 hosts unnecessarily. So like this instead? 2024-02-01 Jakub Jelinek * hwint.h (GCC_PRISZ, fmt_size_t,

Re: [PATCH] Change gcc/ira-conflicts.cc build_conflict_bit_table to use size_t/%zu

2024-02-01 Thread Jakub Jelinek
On Thu, Feb 01, 2024 at 02:53:47PM +, Jonathan Yong wrote: > On 2/1/24 14:33, Xi Ruoyao wrote: > > > > I mean if you are casting it to unsigned HOST_WIDE_INT, you should use > > HOST_WIDE_INT_PRINT_UNSIGNED, If you are casting it to size_t you > > cannot use it (as Jakub has explained). > >

Re: [PATCH] Change gcc/ira-conflicts.cc build_conflict_bit_table to use size_t/%zu

2024-02-01 Thread Jakub Jelinek
On Thu, Feb 01, 2024 at 02:13:11PM +0100, Jakub Jelinek wrote: > Or hwint.h could define PRIusize_t etc. macros and some corresponding type > to be used in casts, something like > #if SIZE_MAX == LONG_LONG_MAX > #define PRIusize_t HOST_LONG_LONG_FORMAT "u" > #define fmt_size_t unsigned long long >

Re: [PATCH] Change gcc/ira-conflicts.cc build_conflict_bit_table to use size_t/%zu

2024-02-01 Thread Jonathan Yong
On 2/1/24 14:33, Xi Ruoyao wrote: I mean if you are casting it to unsigned HOST_WIDE_INT, you should use HOST_WIDE_INT_PRINT_UNSIGNED, If you are casting it to size_t you cannot use it (as Jakub has explained). When you use printf-like things you have to keep the correspondence between format

Re: [PATCH] Change gcc/ira-conflicts.cc build_conflict_bit_table to use size_t/%zu

2024-02-01 Thread Xi Ruoyao
On Thu, 2024-02-01 at 14:55 +0100, Jakub Jelinek wrote: > On Thu, Feb 01, 2024 at 01:42:03PM +, Jonathan Yong wrote: > > On 2/1/24 13:06, Xi Ruoyao wrote: > > > On Thu, 2024-02-01 at 14:01 +0100, Jakub Jelinek wrote: > > > > On Thu, Feb 01, 2024 at 12:45:31PM +, Jonathan Yong wrote: > > >

Re: [PATCH] Change gcc/ira-conflicts.cc build_conflict_bit_table to use size_t/%zu

2024-02-01 Thread Jakub Jelinek
On Thu, Feb 01, 2024 at 01:42:03PM +, Jonathan Yong wrote: > On 2/1/24 13:06, Xi Ruoyao wrote: > > On Thu, 2024-02-01 at 14:01 +0100, Jakub Jelinek wrote: > > > On Thu, Feb 01, 2024 at 12:45:31PM +, Jonathan Yong wrote: > > > > Attached patch OK? Copied inline for review convenience. > > >

Re: [PATCH] Change gcc/ira-conflicts.cc build_conflict_bit_table to use size_t/%zu

2024-02-01 Thread Jonathan Yong
On 2/1/24 13:06, Xi Ruoyao wrote: On Thu, 2024-02-01 at 14:01 +0100, Jakub Jelinek wrote: On Thu, Feb 01, 2024 at 12:45:31PM +, Jonathan Yong wrote: Attached patch OK? Copied inline for review convenience. No, I think e.g. AIX doesn't support the z modifier. I don't see %zd or %zu used

Re: [PATCH] Change gcc/ira-conflicts.cc build_conflict_bit_table to use size_t/%zu

2024-02-01 Thread Jakub Jelinek
On Thu, Feb 01, 2024 at 02:01:17PM +0100, Jakub Jelinek wrote: > On Thu, Feb 01, 2024 at 12:45:31PM +, Jonathan Yong wrote: > > Attached patch OK? Copied inline for review convenience. > > No, I think e.g. AIX doesn't support the z modifier. > I don't see %zd or %zu used anywhere except in

Re: [PATCH] Change gcc/ira-conflicts.cc build_conflict_bit_table to use size_t/%zu

2024-02-01 Thread Xi Ruoyao
On Thu, 2024-02-01 at 14:01 +0100, Jakub Jelinek wrote: > On Thu, Feb 01, 2024 at 12:45:31PM +, Jonathan Yong wrote: > > Attached patch OK? Copied inline for review convenience. > > No, I think e.g. AIX doesn't support the z modifier. > I don't see %zd or %zu used anywhere except in gcc/jit/

Re: [PATCH] Change gcc/ira-conflicts.cc build_conflict_bit_table to use size_t/%zu

2024-02-01 Thread Jakub Jelinek
On Thu, Feb 01, 2024 at 12:45:31PM +, Jonathan Yong wrote: > Attached patch OK? Copied inline for review convenience. No, I think e.g. AIX doesn't support the z modifier. I don't see %zd or %zu used anywhere except in gcc/jit/ which presumably doesn't work on AIX. If you really want to avoid

[PATCH] Change gcc/ira-conflicts.cc build_conflict_bit_table to use size_t/%zu

2024-02-01 Thread Jonathan Yong
Attached patch OK? Copied inline for review convenience. diff --git a/gcc/ira-conflicts.cc b/gcc/ira-conflicts.cc index 671b4e42b6f..e966afe6cdc 100644 --- a/gcc/ira-conflicts.cc +++ b/gcc/ira-conflicts.cc @@ -150,9 +150,9 @@ build_conflict_bit_table (void) if (internal_flag_ira_verbose > 0