mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 19:14:38 +02:00
6743900: frequency based block layout
Post-register allocation pass that drives block layout by edge frequencies Reviewed-by: never, kvn
This commit is contained in:
parent
7bcfb5965d
commit
0e63b7609a
9 changed files with 1003 additions and 134 deletions
|
@ -822,6 +822,7 @@ void Compile::Init(int aliaslevel) {
|
|||
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 @@ void Compile::Code_Gen() {
|
|||
// 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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue