30 #include "opto/runtime.hpp"
31
32 // Static initialization
33
34 // This declares the position where vars are kept in the cvstate
35 // For some degree of consistency we use the TypeFunc enum to
36 // soak up spots in the inputs even though we only use early Control
37 // and Memory slots. (So far.)
38 const uint IdealKit::first_var = TypeFunc::Parms + 1;
39
40 //----------------------------IdealKit-----------------------------------------
41 IdealKit::IdealKit(GraphKit* gkit, bool delay_all_transforms, bool has_declarations) :
42 _gvn(gkit->gvn()), C(gkit->C) {
43 _initial_ctrl = gkit->control();
44 _initial_memory = gkit->merged_memory();
45 _initial_i_o = gkit->i_o();
46 _delay_all_transforms = delay_all_transforms;
47 _var_ct = 0;
48 _cvstate = NULL;
49 // We can go memory state free or else we need the entire memory state
50 assert(_initial_memory == NULL || _initial_memory->Opcode() == Op_MergeMem, "memory must be pre-split");
51 assert(!_gvn.is_IterGVN(), "IdealKit can't be used during Optimize phase");
52 int init_size = 5;
53 _pending_cvstates = new (C->node_arena()) GrowableArray<Node*>(C->node_arena(), init_size, 0, 0);
54 DEBUG_ONLY(_state = new (C->node_arena()) GrowableArray<int>(C->node_arena(), init_size, 0, 0));
55 if (!has_declarations) {
56 declarations_done();
57 }
58 }
59
60 //----------------------------sync_kit-----------------------------------------
61 void IdealKit::sync_kit(GraphKit* gkit) {
62 set_all_memory(gkit->merged_memory());
63 set_i_o(gkit->i_o());
64 set_ctrl(gkit->control());
65 }
66
67 //-------------------------------if_then-------------------------------------
68 // Create: if(left relop right)
69 // / \
70 // iffalse iftrue
|
30 #include "opto/runtime.hpp"
31
32 // Static initialization
33
34 // This declares the position where vars are kept in the cvstate
35 // For some degree of consistency we use the TypeFunc enum to
36 // soak up spots in the inputs even though we only use early Control
37 // and Memory slots. (So far.)
38 const uint IdealKit::first_var = TypeFunc::Parms + 1;
39
40 //----------------------------IdealKit-----------------------------------------
41 IdealKit::IdealKit(GraphKit* gkit, bool delay_all_transforms, bool has_declarations) :
42 _gvn(gkit->gvn()), C(gkit->C) {
43 _initial_ctrl = gkit->control();
44 _initial_memory = gkit->merged_memory();
45 _initial_i_o = gkit->i_o();
46 _delay_all_transforms = delay_all_transforms;
47 _var_ct = 0;
48 _cvstate = NULL;
49 // We can go memory state free or else we need the entire memory state
50 assert(_initial_memory == NULL || _initial_memory->Opcode() == Opcodes::Op_MergeMem, "memory must be pre-split");
51 assert(!_gvn.is_IterGVN(), "IdealKit can't be used during Optimize phase");
52 int init_size = 5;
53 _pending_cvstates = new (C->node_arena()) GrowableArray<Node*>(C->node_arena(), init_size, 0, 0);
54 DEBUG_ONLY(_state = new (C->node_arena()) GrowableArray<int>(C->node_arena(), init_size, 0, 0));
55 if (!has_declarations) {
56 declarations_done();
57 }
58 }
59
60 //----------------------------sync_kit-----------------------------------------
61 void IdealKit::sync_kit(GraphKit* gkit) {
62 set_all_memory(gkit->merged_memory());
63 set_i_o(gkit->i_o());
64 set_ctrl(gkit->control());
65 }
66
67 //-------------------------------if_then-------------------------------------
68 // Create: if(left relop right)
69 // / \
70 // iffalse iftrue
|