Mercurial > hg > graal-compiler
comparison src/share/vm/opto/compile.cpp @ 10111:8373c19be854
8011621: live_ranges_in_separate_class.patch
Reviewed-by: kvn, roland
Contributed-by: niclas.adlertz@oracle.com
author | neliasso |
---|---|
date | Tue, 16 Apr 2013 10:08:41 +0200 |
parents | cc32ccaaf47f |
children | 6f3fd5150b67 |
comparison
equal
deleted
inserted
replaced
10109:1c6887c9afaa | 10111:8373c19be854 |
---|---|
2125 | 2125 |
2126 debug_only( cfg.verify(); ) | 2126 debug_only( cfg.verify(); ) |
2127 } | 2127 } |
2128 NOT_PRODUCT( verify_graph_edges(); ) | 2128 NOT_PRODUCT( verify_graph_edges(); ) |
2129 | 2129 |
2130 PhaseChaitin regalloc(unique(),cfg,m); | 2130 PhaseChaitin regalloc(unique(), cfg, m); |
2131 _regalloc = ®alloc; | 2131 _regalloc = ®alloc; |
2132 { | 2132 { |
2133 TracePhase t2("regalloc", &_t_registerAllocation, true); | 2133 TracePhase t2("regalloc", &_t_registerAllocation, true); |
2134 // Perform any platform dependent preallocation actions. This is used, | |
2135 // for example, to avoid taking an implicit null pointer exception | |
2136 // using the frame pointer on win95. | |
2137 _regalloc->pd_preallocate_hook(); | |
2138 | |
2139 // Perform register allocation. After Chaitin, use-def chains are | 2134 // Perform register allocation. After Chaitin, use-def chains are |
2140 // no longer accurate (at spill code) and so must be ignored. | 2135 // no longer accurate (at spill code) and so must be ignored. |
2141 // Node->LRG->reg mappings are still accurate. | 2136 // Node->LRG->reg mappings are still accurate. |
2142 _regalloc->Register_Allocate(); | 2137 _regalloc->Register_Allocate(); |
2143 | 2138 |
2144 // Bail out if the allocator builds too many nodes | 2139 // Bail out if the allocator builds too many nodes |
2145 if (failing()) return; | 2140 if (failing()) { |
2141 return; | |
2142 } | |
2146 } | 2143 } |
2147 | 2144 |
2148 // Prior to register allocation we kept empty basic blocks in case the | 2145 // Prior to register allocation we kept empty basic blocks in case the |
2149 // the allocator needed a place to spill. After register allocation we | 2146 // the allocator needed a place to spill. After register allocation we |
2150 // are not adding any new instructions. If any basic block is empty, we | 2147 // are not adding any new instructions. If any basic block is empty, we |
2157 } else { | 2154 } else { |
2158 cfg.set_loop_alignment(); | 2155 cfg.set_loop_alignment(); |
2159 } | 2156 } |
2160 cfg.fixup_flow(); | 2157 cfg.fixup_flow(); |
2161 } | 2158 } |
2162 | |
2163 // Perform any platform dependent postallocation verifications. | |
2164 debug_only( _regalloc->pd_postallocate_verify_hook(); ) | |
2165 | 2159 |
2166 // Apply peephole optimizations | 2160 // Apply peephole optimizations |
2167 if( OptoPeephole ) { | 2161 if( OptoPeephole ) { |
2168 NOT_PRODUCT( TracePhase t2("peephole", &_t_peephole, TimeCompiler); ) | 2162 NOT_PRODUCT( TracePhase t2("peephole", &_t_peephole, TimeCompiler); ) |
2169 PhasePeephole peep( _regalloc, cfg); | 2163 PhasePeephole peep( _regalloc, cfg); |