src/share/vm/opto/macro.hpp

Thu, 06 Mar 2008 10:30:17 -0800

author
kvn
date
Thu, 06 Mar 2008 10:30:17 -0800
changeset 473
b789bcaf2dd9
parent 435
a61af66fc99e
child 501
6dbf1a175d6b
permissions
-rw-r--r--

6667610: (Escape Analysis) retry compilation without EA if it fails
Summary: During split unique types EA could exceed nodes limit and fail the method compilation.
Reviewed-by: rasbold

duke@435 1 /*
duke@435 2 * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved.
duke@435 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@435 4 *
duke@435 5 * This code is free software; you can redistribute it and/or modify it
duke@435 6 * under the terms of the GNU General Public License version 2 only, as
duke@435 7 * published by the Free Software Foundation.
duke@435 8 *
duke@435 9 * This code is distributed in the hope that it will be useful, but WITHOUT
duke@435 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@435 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@435 12 * version 2 for more details (a copy is included in the LICENSE file that
duke@435 13 * accompanied this code).
duke@435 14 *
duke@435 15 * You should have received a copy of the GNU General Public License version
duke@435 16 * 2 along with this work; if not, write to the Free Software Foundation,
duke@435 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@435 18 *
duke@435 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
duke@435 20 * CA 95054 USA or visit www.sun.com if you need additional information or
duke@435 21 * have any questions.
duke@435 22 *
duke@435 23 */
duke@435 24
duke@435 25 class AllocateNode;
duke@435 26 class AllocateArrayNode;
duke@435 27 class CallNode;
duke@435 28 class Node;
duke@435 29 class PhaseIterGVN;
duke@435 30
duke@435 31 class PhaseMacroExpand : public Phase {
duke@435 32 private:
duke@435 33 PhaseIterGVN &_igvn;
duke@435 34
duke@435 35 // Helper methods roughly modelled after GraphKit:
duke@435 36 Node* top() const { return C->top(); }
duke@435 37 Node* intcon(jint con) const { return _igvn.intcon(con); }
duke@435 38 Node* longcon(jlong con) const { return _igvn.longcon(con); }
duke@435 39 Node* makecon(const Type *t) const { return _igvn.makecon(t); }
duke@435 40 Node* basic_plus_adr(Node* base, int offset) {
duke@435 41 return (offset == 0)? base: basic_plus_adr(base, MakeConX(offset));
duke@435 42 }
duke@435 43 Node* basic_plus_adr(Node* base, Node* ptr, int offset) {
duke@435 44 return (offset == 0)? ptr: basic_plus_adr(base, ptr, MakeConX(offset));
duke@435 45 }
duke@435 46 Node* basic_plus_adr(Node* base, Node* offset) {
duke@435 47 return basic_plus_adr(base, base, offset);
duke@435 48 }
duke@435 49 Node* basic_plus_adr(Node* base, Node* ptr, Node* offset) {
duke@435 50 Node* adr = new (C, 4) AddPNode(base, ptr, offset);
duke@435 51 return transform_later(adr);
duke@435 52 }
duke@435 53 Node* transform_later(Node* n) {
duke@435 54 // equivalent to _gvn.transform in GraphKit, Ideal, etc.
duke@435 55 _igvn.register_new_node_with_optimizer(n);
duke@435 56 return n;
duke@435 57 }
duke@435 58 void set_eden_pointers(Node* &eden_top_adr, Node* &eden_end_adr);
duke@435 59 Node* make_load( Node* ctl, Node* mem, Node* base, int offset,
duke@435 60 const Type* value_type, BasicType bt);
duke@435 61 Node* make_store(Node* ctl, Node* mem, Node* base, int offset,
duke@435 62 Node* value, BasicType bt);
duke@435 63
duke@435 64 // projections extracted from a call node
duke@435 65 ProjNode *_fallthroughproj;
duke@435 66 ProjNode *_fallthroughcatchproj;
duke@435 67 ProjNode *_ioproj_fallthrough;
duke@435 68 ProjNode *_ioproj_catchall;
duke@435 69 ProjNode *_catchallcatchproj;
duke@435 70 ProjNode *_memproj_fallthrough;
duke@435 71 ProjNode *_memproj_catchall;
duke@435 72 ProjNode *_resproj;
duke@435 73
duke@435 74
duke@435 75 void expand_allocate(AllocateNode *alloc);
duke@435 76 void expand_allocate_array(AllocateArrayNode *alloc);
duke@435 77 void expand_allocate_common(AllocateNode* alloc,
duke@435 78 Node* length,
duke@435 79 const TypeFunc* slow_call_type,
duke@435 80 address slow_call_address);
duke@435 81 void eliminate_locking_node(AbstractLockNode *alock);
duke@435 82 void expand_lock_node(LockNode *lock);
duke@435 83 void expand_unlock_node(UnlockNode *unlock);
duke@435 84
duke@435 85 int replace_input(Node *use, Node *oldref, Node *newref);
duke@435 86 void copy_call_debug_info(CallNode *oldcall, CallNode * newcall);
duke@435 87 Node* opt_iff(Node* region, Node* iff);
duke@435 88 void copy_predefined_input_for_runtime_call(Node * ctrl, CallNode* oldcall, CallNode* call);
duke@435 89 CallNode* make_slow_call(CallNode *oldcall, const TypeFunc* slow_call_type, address slow_call,
duke@435 90 const char* leaf_name, Node* slow_path, Node* parm0, Node* parm1);
duke@435 91 void extract_call_projections(CallNode *call);
duke@435 92
duke@435 93 Node* initialize_object(AllocateNode* alloc,
duke@435 94 Node* control, Node* rawmem, Node* object,
duke@435 95 Node* klass_node, Node* length,
duke@435 96 Node* size_in_bytes);
duke@435 97
duke@435 98 Node* prefetch_allocation(Node* i_o,
duke@435 99 Node*& needgc_false, Node*& contended_phi_rawmem,
duke@435 100 Node* old_eden_top, Node* new_eden_top,
duke@435 101 Node* length);
duke@435 102
duke@435 103 public:
duke@435 104 PhaseMacroExpand(PhaseIterGVN &igvn) : Phase(Macro_Expand), _igvn(igvn) {}
duke@435 105 bool expand_macro_nodes();
duke@435 106
duke@435 107 };

mercurial