35
36 class PhaseMacroExpand : public Phase {
37 private:
38 PhaseIterGVN &_igvn;
39
40 // Helper methods roughly modelled after GraphKit:
41 Node* top() const { return C->top(); }
42 Node* intcon(jint con) const { return _igvn.intcon(con); }
43 Node* longcon(jlong con) const { return _igvn.longcon(con); }
44 Node* makecon(const Type *t) const { return _igvn.makecon(t); }
45 Node* basic_plus_adr(Node* base, int offset) {
46 return (offset == 0)? base: basic_plus_adr(base, MakeConX(offset));
47 }
48 Node* basic_plus_adr(Node* base, Node* ptr, int offset) {
49 return (offset == 0)? ptr: basic_plus_adr(base, ptr, MakeConX(offset));
50 }
51 Node* basic_plus_adr(Node* base, Node* offset) {
52 return basic_plus_adr(base, base, offset);
53 }
54 Node* basic_plus_adr(Node* base, Node* ptr, Node* offset) {
55 Node* adr = new (C) AddPNode(base, ptr, offset);
56 return transform_later(adr);
57 }
58 Node* transform_later(Node* n) {
59 // equivalent to _gvn.transform in GraphKit, Ideal, etc.
60 _igvn.register_new_node_with_optimizer(n);
61 return n;
62 }
63 void set_eden_pointers(Node* &eden_top_adr, Node* &eden_end_adr);
64 Node* make_load( Node* ctl, Node* mem, Node* base, int offset,
65 const Type* value_type, BasicType bt);
66 Node* make_store(Node* ctl, Node* mem, Node* base, int offset,
67 Node* value, BasicType bt);
68
69 // projections extracted from a call node
70 ProjNode *_fallthroughproj;
71 ProjNode *_fallthroughcatchproj;
72 ProjNode *_ioproj_fallthrough;
73 ProjNode *_ioproj_catchall;
74 ProjNode *_catchallcatchproj;
75 ProjNode *_memproj_fallthrough;
|
35
36 class PhaseMacroExpand : public Phase {
37 private:
38 PhaseIterGVN &_igvn;
39
40 // Helper methods roughly modelled after GraphKit:
41 Node* top() const { return C->top(); }
42 Node* intcon(jint con) const { return _igvn.intcon(con); }
43 Node* longcon(jlong con) const { return _igvn.longcon(con); }
44 Node* makecon(const Type *t) const { return _igvn.makecon(t); }
45 Node* basic_plus_adr(Node* base, int offset) {
46 return (offset == 0)? base: basic_plus_adr(base, MakeConX(offset));
47 }
48 Node* basic_plus_adr(Node* base, Node* ptr, int offset) {
49 return (offset == 0)? ptr: basic_plus_adr(base, ptr, MakeConX(offset));
50 }
51 Node* basic_plus_adr(Node* base, Node* offset) {
52 return basic_plus_adr(base, base, offset);
53 }
54 Node* basic_plus_adr(Node* base, Node* ptr, Node* offset) {
55 Node* adr = new AddPNode(base, ptr, offset);
56 return transform_later(adr);
57 }
58 Node* transform_later(Node* n) {
59 // equivalent to _gvn.transform in GraphKit, Ideal, etc.
60 _igvn.register_new_node_with_optimizer(n);
61 return n;
62 }
63 void set_eden_pointers(Node* &eden_top_adr, Node* &eden_end_adr);
64 Node* make_load( Node* ctl, Node* mem, Node* base, int offset,
65 const Type* value_type, BasicType bt);
66 Node* make_store(Node* ctl, Node* mem, Node* base, int offset,
67 Node* value, BasicType bt);
68
69 // projections extracted from a call node
70 ProjNode *_fallthroughproj;
71 ProjNode *_fallthroughcatchproj;
72 ProjNode *_ioproj_fallthrough;
73 ProjNode *_ioproj_catchall;
74 ProjNode *_catchallcatchproj;
75 ProjNode *_memproj_fallthrough;
|