Re: How to compress the size of a field in a structure?

2024-01-15 Thread Richard Biener via Gcc
On Sat, Jan 13, 2024 at 8:46 AM Hanke Zhang via Gcc wrote: > > Hi, I'm attempting to compress the size of a field in a structure for > memory-friendly purposes. I created an IPA pass to achieve this, but I > ran into some issues as follows: > > // original > struct Foo { > long a1; > int a2;

Re: How to compress the size of a field in a structure?

2024-01-13 Thread Hanke Zhang via Gcc
Hi lain, Thanks for your thoughtful comments and concerns. The primary goal of compressing the structure fields is to achieve memory efficiency. I understand your points regarding potential issues with modifying the size and types of the structure. I guess rewriting all the corresponding

Re: How to compress the size of a field in a structure?

2024-01-13 Thread Iain Sandoe via Gcc
> On 13 Jan 2024, at 07:45, Hanke Zhang via Gcc wrote: > > Hi, I'm attempting to compress the size of a field in a structure for > memory-friendly purposes. I created an IPA pass to achieve this, but I > ran into some issues as follows: > > // original > struct Foo { > long a1; > int a2; >

How to compress the size of a field in a structure?

2024-01-12 Thread Hanke Zhang via Gcc
Hi, I'm attempting to compress the size of a field in a structure for memory-friendly purposes. I created an IPA pass to achieve this, but I ran into some issues as follows: // original struct Foo { long a1; int a2; }; // modified struct Foo_update { int a1; int a2; }; For the example