26 #define SHARE_VM_OPTO_PHASE_HPP
27
28 #include "libadt/port.hpp"
29 #include "runtime/timer.hpp"
30
31 class Compile;
32
33 //------------------------------Phase------------------------------------------
34 // Most optimizations are done in Phases. Creating a phase does any long
35 // running analysis required, and caches the analysis in internal data
36 // structures. Later the analysis is queried using transform() calls to
37 // guide transforming the program. When the Phase is deleted, so is any
38 // cached analysis info. This basic Phase class mostly contains timing and
39 // memory management code.
40 class Phase : public StackObj {
41 public:
42 enum PhaseNumber {
43 Compiler, // Top-level compiler phase
44 Parser, // Parse bytecodes
45 Remove_Useless, // Remove useless nodes
46 Optimistic, // Optimistic analysis phase
47 GVN, // Pessimistic global value numbering phase
48 Ins_Select, // Instruction selection phase
49 CFG, // Build a CFG
50 BlockLayout, // Linear ordering of blocks
51 Register_Allocation, // Register allocation, duh
52 LIVE, // Dragon-book LIVE range problem
53 StringOpts, // StringBuilder related optimizations
54 Interference_Graph, // Building the IFG
55 Coalesce, // Coalescing copies
56 Ideal_Loop, // Find idealized trip-counted loops
57 Macro_Expand, // Expand macro nodes
58 Peephole, // Apply peephole optimizations
59 last_phase
60 };
61 protected:
62 enum PhaseNumber _pnum; // Phase number (for stat gathering)
63
64 #ifndef PRODUCT
65 static int _total_bytes_compiled;
|
26 #define SHARE_VM_OPTO_PHASE_HPP
27
28 #include "libadt/port.hpp"
29 #include "runtime/timer.hpp"
30
31 class Compile;
32
33 //------------------------------Phase------------------------------------------
34 // Most optimizations are done in Phases. Creating a phase does any long
35 // running analysis required, and caches the analysis in internal data
36 // structures. Later the analysis is queried using transform() calls to
37 // guide transforming the program. When the Phase is deleted, so is any
38 // cached analysis info. This basic Phase class mostly contains timing and
39 // memory management code.
40 class Phase : public StackObj {
41 public:
42 enum PhaseNumber {
43 Compiler, // Top-level compiler phase
44 Parser, // Parse bytecodes
45 Remove_Useless, // Remove useless nodes
46 Renumber_Live, // First, remove useless nodes from the graph. Then, renumber live nodes.
47 Optimistic, // Optimistic analysis phase
48 GVN, // Pessimistic global value numbering phase
49 Ins_Select, // Instruction selection phase
50 CFG, // Build a CFG
51 BlockLayout, // Linear ordering of blocks
52 Register_Allocation, // Register allocation, duh
53 LIVE, // Dragon-book LIVE range problem
54 StringOpts, // StringBuilder related optimizations
55 Interference_Graph, // Building the IFG
56 Coalesce, // Coalescing copies
57 Ideal_Loop, // Find idealized trip-counted loops
58 Macro_Expand, // Expand macro nodes
59 Peephole, // Apply peephole optimizations
60 last_phase
61 };
62 protected:
63 enum PhaseNumber _pnum; // Phase number (for stat gathering)
64
65 #ifndef PRODUCT
66 static int _total_bytes_compiled;
|