This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]