This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
doubts in gimple code
- From: Virender Kashyap <virenk at cse dot iitb dot ac dot in>
- To: gcc at gcc dot gnu dot org
- Cc: GCC HELP <gcc-help at gcc dot gnu dot org>
- Date: Sun, 1 May 2005 22:45:15 +0530 (IST)
- Subject: doubts in gimple code
Hi,
In GIMPLE IR, variables that need to live in memory are to be first
loaded into temporaries and then used in expressions. The memory here
referes here to data area i guess. Because for local variables which
reside on stack , this rule does not apply, as an expression like
c = a + b ; where a,b are local variabes remain as it is in GIMPLE.
while same expression, if a, b are global variabes, becomes :
T1 = a ;
T2 = b ;
c = T1 + T2 ;
thereby loading a, b first into temporaries and then using them in
expressions.
the assignments differ in global and local variables :
for a , b global :
a = b , become
T1 = b ;
a = T1
while for a, b local
a = b , remains as
a = b
Also what exactly happens in a = b + c (b,c local) ?
--
Regards.
Virender