public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* How to compress the size of a field in a structure?
@ 2024-01-13  7:45 Hanke Zhang
  2024-01-13  9:15 ` Iain Sandoe
  2024-01-15  9:16 ` Richard Biener
  0 siblings, 2 replies; 4+ messages in thread
From: Hanke Zhang @ 2024-01-13  7:45 UTC (permalink / raw)
  To: 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 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-01-15  9:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-13  7:45 How to compress the size of a field in a structure? Hanke Zhang
2024-01-13  9:15 ` Iain Sandoe
2024-01-14  7:43   ` Hanke Zhang
2024-01-15  9:16 ` Richard Biener

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).