How to compress the size of a field in a structure?
Hanke Zhang
hkzhang455@gmail.com
Sat Jan 13 07:45:17 GMT 2024
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 structure Foo, I use `TREE_TYPE (field) =
integer_type_node` to compress the type of a1 from `long` to `int`.
But I don't know how to update its corresponding SSA variables,
because the number of them is huge. Is there any way to do it quickly?
Thanks
Hanke Zhang
More information about the Gcc
mailing list