Regarding profile-guided optimization, the compiler generates a dataset of performance-related information from using the application with representative workloads, which it then analyzes to find which parts of the application are executed more and less frequently. The compiler uses these data to organize application execution to optimize performance based on how the application is actually used. This is in contrast to IPO which optimizes applications according to the logical flow of the application independent of workloads. The two can be combined to provide workload-based optimizations within which the logical-flow is optimized. Thus, all optimizations can benefit from profile-guided feedback because they are less reliant on heuristics when making compilation decisions.