--- a/hotspot/src/share/vm/opto/compile.cpp Thu Oct 30 17:08:48 2008 -0700
+++ b/hotspot/src/share/vm/opto/compile.cpp Thu Nov 06 14:59:10 2008 -0800
@@ -822,6 +822,7 @@
Copy::zero_to_bytes(_trap_hist, sizeof(_trap_hist));
set_decompile_count(0);
+ set_do_freq_based_layout(BlockLayoutByFrequency || method_has_option("BlockLayoutByFrequency"));
// Compilation level related initialization
if (env()->comp_level() == CompLevel_fast_compile) {
set_num_loop_opts(Tier1LoopOptsCount);
@@ -1701,8 +1702,14 @@
// are not adding any new instructions. If any basic block is empty, we
// can now safely remove it.
{
- NOT_PRODUCT( TracePhase t2("removeEmpty", &_t_removeEmptyBlocks, TimeCompiler); )
- cfg.RemoveEmpty();
+ NOT_PRODUCT( TracePhase t2("blockOrdering", &_t_blockOrdering, TimeCompiler); )
+ cfg.remove_empty();
+ if (do_freq_based_layout()) {
+ PhaseBlockLayout layout(cfg);
+ } else {
+ cfg.set_loop_alignment();
+ }
+ cfg.fixup_flow();
}
// Perform any platform dependent postallocation verifications.