Profile-based compile optimization
junsu has pointed out that gcc has the ablity to do profile, record the data and optimize the generated code according to the data. The nearest compiler guru I can visit is Prof. Husheng LIAO (sorry, the link here is not available to the Internet at the time writing, but this is hopefully to be changed soon) who recently concentrate his research in optimization for the Java Language Compiling process.
Further information will be available here soon.