LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-18-2013, 11:51 AM   #1
$u$hil_k$
LQ Newbie
 
Registered: Jan 2012
Posts: 23

Rep: Reputation: Disabled
Applying optimization recursively by compiling again using optimization flags


Hello guys, i wanted to know is there any possibilities of compiling the already compiled file from GCC in order to apply optimization on it. In other words suppose i compile a C file using GCC by applying certain optimization flags to generate a binary file and later can i compile it again using certain optimization flags again to generate even more optimized code and so on recursively???
 
Old 11-18-2013, 12:19 PM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
No possibility at all because once compiled, it does not need to be compiled again it is assembly code. Any further optimizations would have to be done in assembly code. What's the point of the question here? There are different things one optimizes for and depending on the processor architecture, you can benefit by instructions available. The best optimization is done by writing directly in assembly, providing the author does write correct, efficient code.
 
  


Reply

Tags
compiling, flags, gcc, optimization, recompile



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
-fprofile-generate in conjunction with additional optimization flags? jhwilliams Programming 0 12-06-2011 07:03 PM
GCC 3.4/3.3 Optimization Flags monohouse Linux - Software 0 10-28-2004 10:48 AM
Best Optimization Flags for a 512mb (ddr) equipped Athlon XP 1.8 ghz? haimeltjnfg Linux - Software 4 08-30-2004 12:52 AM
optimization flags and kernel compiling kpachopoulos Linux - Newbie 2 08-26-2004 07:29 AM
gcc optimization flags: rules of thumb elyk Linux - Software 3 08-04-2004 11:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration