Related articles |
---|
Register allocation sumesh_uk@hotmail.com (2003-07-04) |
Re: Register allocation touati@prism.uvsq.fr (TOUATI Sid) (2003-07-15) |
Register allocation robert.thorpe@antenova.com (Rob Thorpe) (2003-07-21) |
Re: Register allocation sumesh_uk@hotmail.com (2003-07-21) |
Re: Register allocation lindahl@pbm.com (2003-07-21) |
Re: Register allocation dany42NOSPAM@free.fr (Dan) (2003-07-21) |
Re: Register allocation sumesh_uk@hotmail.com (2003-07-31) |
Register allocation avizit@gmail.com (2004-07-15) |
Re: Register allocation gopi@sankhya.com (2004-07-28) |
Re: Register allocation rajaram@acmet.com (Rajaram) (2004-08-04) |
[25 later articles] |
From: | sumesh_uk@hotmail.com (sumesh) |
Newsgroups: | comp.compilers |
Date: | 21 Jul 2003 21:33:10 -0400 |
Organization: | http://groups.google.com/ |
References: | 03-07-058 03-07-097 |
Keywords: | registers, optimize |
Posted-Date: | 21 Jul 2003 21:33:10 EDT |
Hi
My question was more about knowing if any register promotion pass
is needed to remove such redundant load/stores of induction variables.
Or would standard optimizations like strength reduction/ code motion
be good enough.
When comparing between gcc for sparc and the code produced by
gcc cross compiler for MCORE, I found the former doing a better job.
The example was a simple loop with an assignment A[i] = i, 'A' being
an array and i being the induction vsriable. ideally it should be
possible to do this using just one store inside the loop but that
doesnt happen. gcc-sparc uses 2 loads/stores, gcc-MCORE uses 3. Is
there any exisiting technique which can be used to eliminate the
redundant store of the induction variable in the loop.
regards
Sumesh
TOUATI Sid <touati@prism.uvsq.fr> wrote
> It is hard to say why a compiler didn't make this or that optimization.
> Maybe the number of free registers isn't sufficient (I am not familiar
> with the MCORE platform).
> However, be sure that gcc isn't the most efficient compiler in terms of
> code optimization, especially with backend opptimization. Maybe by using
> the keywork "register" for your global variables, you can help gcc to
> decide.
Return to the
comp.compilers page.
Search the
comp.compilers archives again.