Re: code gen for C string literals

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

 



On Mon, Feb 14, 2011 at 11:46 AM, Ian Lance Taylor <iant@xxxxxxxxxx> wrote:
> 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.
>
>> 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).
>
I am asking if there is something like STRING_CST that the frontend
will return for for global'ish (i.e. non-auto stuff that is found from
locations other than the stack) data items that I can similarly search
the code for.

Thanks!

kevin

P.S.:  If you would be so kind as to jot down a sentence or two as to
what GIMPLE (some other frontends' tree?) is and how it relates to
SIMPLE (C frontend tree representation) I would REALLY appreciate it!
Ditto for something called SSA?

> 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