macro.cpp revision 4347
1472N/A * or visit www.oracle.com if you need additional information or have any
1879N/A#include "precompiled.hpp"
1879N/A#include "compiler/compileLog.hpp"
1879N/A#include "libadt/vectset.hpp"
1879N/A#include "opto/addnode.hpp"
1879N/A#include "opto/callnode.hpp"
1879N/A#include "opto/cfgnode.hpp"
1879N/A#include "opto/compile.hpp"
1879N/A#include "opto/connode.hpp"
1879N/A#include "opto/locknode.hpp"
1879N/A#include "opto/loopnode.hpp"
1879N/A#include "opto/memnode.hpp"
1879N/A#include "opto/phaseX.hpp"
1879N/A#include "opto/rootnode.hpp"
1879N/A#include "opto/runtime.hpp"
1879N/A#include "opto/subnode.hpp"
1879N/A#include "runtime/sharedRuntime.hpp"
0N/A int nreplacements = 0;
0N/A return nreplacements;
420N/ANode* PhaseMacroExpand::opt_bits_test(Node* ctrl, Node* region, int edge, Node* word, int mask, int bits, bool return_fast_path) {
420N/A if (return_fast_path) {
420N/A return fast_taken;
420N/A return slow_taken;
0N/Avoid PhaseMacroExpand::copy_predefined_input_for_runtime_call(Node * ctrl, CallNode* oldcall, CallNode* call) {
0N/ACallNode* PhaseMacroExpand::make_slow_call(CallNode *oldcall, const TypeFunc* slow_call_type, address slow_call, const char* leaf_name, Node* slow_path, Node* parm0, Node* parm1) {
4022N/A ? (CallNode*)new (C) CallLeafNode ( slow_call_type, slow_call, leaf_name, TypeRawPtr::BOTTOM )
4022N/A : (CallNode*)new (C) CallStaticJavaNode( slow_call_type, slow_call, OptoRuntime::stub_name(slow_call), oldcall->jvms()->bci(), TypeRawPtr::BOTTOM );
253N/Astatic Node *scan_mem_chain(Node *mem, int alias_idx, int offset, Node *start_mem, Node *alloc, PhaseGVN *phase) {
247N/ANode *PhaseMacroExpand::value_from_mem_phi(Node *mem, BasicType ft, const Type *phi_type, const TypeOopPtr *adr_t, Node *alloc, Node_Stack *value_phis, int level) {
73N/ANode *PhaseMacroExpand::value_from_mem(Node *sfpt_mem, BasicType ft, const Type *ftype, const TypeOopPtr *adr_t, Node *alloc) {
73N/A unique_input = n;
73N/A } else if (unique_input != n) {
253N/A Node * phi = value_from_mem_phi(mem, ft, ftype, adr_t, alloc, &value_phis, ValueSearchLimit);
73N/Abool PhaseMacroExpand::can_eliminate_allocation(AllocateNode *alloc, GrowableArray <SafePointNode *>& safepoints) {
73N/A bool can_eliminate = true;
73N/A can_eliminate = false;
73N/A can_eliminate = false;
73N/A can_eliminate = false;
73N/A can_eliminate = false;
73N/A can_eliminate = false;
73N/A can_eliminate = false;
73N/A can_eliminate = false;
73N/A can_eliminate = false;
73N/A if (PrintEliminateAllocations) {
73N/A if (can_eliminate) {
73N/A return can_eliminate;
73N/Abool PhaseMacroExpand::scalar_replacement(AllocateNode *alloc, GrowableArray <SafePointNode *>& safepoints) {
73N/A int array_base;
73N/A int element_size;
124N/A if (UseCompressedOops) {
73N/A if (PrintEliminateAllocations) {
4022N/A field_val = transform_later(new (C) DecodeNNode(field_val, field_val->bottom_type()->make_ptr()));
73N/A assert(init->in(TypeFunc::Control) == _fallthroughcatchproj, "allocation control projection");
1080N/A if (PrintEliminateAllocations) {
0N/ANode* PhaseMacroExpand::make_load(Node* ctl, Node* mem, Node* base, int offset, const Type* value_type, BasicType bt) {
0N/ANode* PhaseMacroExpand::make_store(Node* ctl, Node* mem, Node* base, int offset, Node* value, BasicType bt) {
0N/A// %%% Here is an old comment from parseHelper.cpp; is it outdated?
0N/A// coalesce.cpp about how this works. It depends critically on the exact
0N/A bool always_slow = false;
0N/A always_slow = true;
0N/A if (!always_slow) {
342N/A // See comment in memnode.hpp, around line 227 in class LoadPNode.
4022N/A ? new (C) LoadPNode (ctrl, contended_phi_rawmem, eden_top_adr, TypeRawPtr::BOTTOM, TypeRawPtr::BOTTOM)
4022N/A IfNode *needgc_iff = new (C) IfNode(contended_region, needgc_bol, PROB_UNLIKELY_MAG(4), COUNT_UNKNOWN);
1988N/A if (initial_slow_test) {
4022N/A IfNode *contention_iff = new (C) IfNode (needgc_false, contention_check, PROB_MIN, COUNT_UNKNOWN);
0N/A if (!always_slow) {
3047N/A if (always_slow) {
3042N/A mark_node = make_load(control, rawmem, klass_node, in_bytes(Klass::prototype_header_offset()), TypeRawPtr::BOTTOM, T_ADDRESS);
0N/A rawmem = make_store(control, rawmem, object, oopDesc::mark_offset_in_bytes(), mark_node, T_ADDRESS);
0N/A rawmem = make_store(control, rawmem, object, oopDesc::klass_offset_in_bytes(), klass_node, T_OBJECT);
0N/A rawmem = make_store(control, rawmem, object, arrayOopDesc::length_offset_in_bytes(), length, T_INT);
0N/A } else if( AllocatePrefetchStyle > 0 ) {
2797N/A k->is_type_array_klass()) {