Re: code gen for C string literals

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



kevin diggs <diggskevin38@xxxxxxxxx> writes:

> "in GENERIC"??? Is this the initial RTL output?

GENERIC is the name for the tree representation used by the C frontend.
Since a string literal only appears in an operand, STRING_CST is what
you will see in GIMPLE as well.

> Assuming the size does not bust through a processors offset addressing
> capabilities, something similar should be doable for accessing things
> in any section (clustered section access optimization). I just figure
> that string literals are far more common. Off the top of your head do
> you know what I would search for for something like:
>
> int im_a_global_int;
>
> which would be treated similarly to a string literal (at least as far
> as how it is accessed), right?

That's a very general question and I'm not sure just how to answer it.
At the GENERIC/GIMPLE level that is just a variable.  At the RTL level
it will turn into a memory address (a MEM).

Ian


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux