As far as I have been able to tell, g++ is a frontend to the GCC backend, but also there is several other languages that are made for the GCC backend, and the front end of the language will compile it to a sort of intermediate language that gets fed into GCC and made into an executable. However what I have not been able to find out is weather it is the front end that must do the optimizations to get a more optimised assembly output, or weather it is the backend. I am pretty sure it is the backend that does the optimizing but I just wanted to make sure.
Frontend or Backend doing optimization
Started by Termana, Jan 09 2009 05:09 AM
4 replies to this topic
#1
Posted 09 January 2009 - 05:09 AM
Interested in participating in community events?
Want to harness your programming skill and turn it into absolute prowess?
Come join our programming events!
|
|
|
#2
Posted 09 January 2009 - 06:39 AM
First of, I think you have misunderstood something. GCC is simply a collection of tools, which its name also says, GNU Compiler Collection. gcc, gcl, g++, and so on are just tools in this collection.
#3
Posted 09 January 2009 - 06:46 AM
The GNU Compiler Collection (usually shortened to GCC) is a compiler system supporting various programming languages produced by the GNU Project.I think you'll find that GCC is a compiler backend.
Later in the same article I think I've found my answer anyway:
The behavior of GCC's back end is partly specified by preprocessor macros and functions specific to a target architecture, for instance to define the endianness, word size, and calling conventions. The front part of the back end uses these to help decide RTL generation, so although GCC's RTL is nominally processor-independent, the initial sequence of abstract instructions is already adapted to the target. The exact set of GCC optimizations varies from release to release as it develops, but includes the standard algorithms, such as loop optimization, jump threading, common subexpression elimination, instruction scheduling, and so forth. The RTL optimizations are of less importance with the recent addition of global SSA-based optimizations on GIMPLE trees, as RTL optimizations have a much more limited scope, and have less high-level information.
Interested in participating in community events?
Want to harness your programming skill and turn it into absolute prowess?
Come join our programming events!
#4
Posted 09 January 2009 - 06:48 AM
Cool.
#5
Posted 09 January 2009 - 06:52 AM
Edit: ignore this post
Edited by Termana, 10 January 2009 - 05:44 AM.
This post was accidently posted.


Sign In
Create Account


Back to top









