mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 11:04:34 +02:00
8054033: Remove unused references to Compile*
Removed unused references to Compile* missed by JDK-8034812. Reviewed-by: kvn, roland
This commit is contained in:
parent
6292295da2
commit
70a55eac34
34 changed files with 171 additions and 180 deletions
|
@ -1283,8 +1283,6 @@ int Compile::ConstantTable::calculate_table_base_offset() const {
|
||||||
|
|
||||||
bool MachConstantBaseNode::requires_postalloc_expand() const { return true; }
|
bool MachConstantBaseNode::requires_postalloc_expand() const { return true; }
|
||||||
void MachConstantBaseNode::postalloc_expand(GrowableArray <Node *> *nodes, PhaseRegAlloc *ra_) {
|
void MachConstantBaseNode::postalloc_expand(GrowableArray <Node *> *nodes, PhaseRegAlloc *ra_) {
|
||||||
Compile *C = ra_->C;
|
|
||||||
|
|
||||||
iRegPdstOper *op_dst = new iRegPdstOper();
|
iRegPdstOper *op_dst = new iRegPdstOper();
|
||||||
MachNode *m1 = new loadToc_hiNode();
|
MachNode *m1 = new loadToc_hiNode();
|
||||||
MachNode *m2 = new loadToc_loNode();
|
MachNode *m2 = new loadToc_loNode();
|
||||||
|
@ -2229,7 +2227,7 @@ const bool Matcher::isSimpleConstant64(jlong value) {
|
||||||
}
|
}
|
||||||
/* TODO: PPC port
|
/* TODO: PPC port
|
||||||
// Make a new machine dependent decode node (with its operands).
|
// Make a new machine dependent decode node (with its operands).
|
||||||
MachTypeNode *Matcher::make_decode_node(Compile *C) {
|
MachTypeNode *Matcher::make_decode_node() {
|
||||||
assert(Universe::narrow_oop_base() == NULL && Universe::narrow_oop_shift() == 0,
|
assert(Universe::narrow_oop_base() == NULL && Universe::narrow_oop_shift() == 0,
|
||||||
"This method is only implemented for unscaled cOops mode so far");
|
"This method is only implemented for unscaled cOops mode so far");
|
||||||
MachTypeNode *decode = new decodeN_unscaledNode();
|
MachTypeNode *decode = new decodeN_unscaledNode();
|
||||||
|
@ -2593,7 +2591,7 @@ typedef struct {
|
||||||
MachNode *_last;
|
MachNode *_last;
|
||||||
} loadConLNodesTuple;
|
} loadConLNodesTuple;
|
||||||
|
|
||||||
loadConLNodesTuple loadConLNodesTuple_create(Compile *C, PhaseRegAlloc *ra_, Node *toc, immLOper *immSrc,
|
loadConLNodesTuple loadConLNodesTuple_create(PhaseRegAlloc *ra_, Node *toc, immLOper *immSrc,
|
||||||
OptoReg::Name reg_second, OptoReg::Name reg_first) {
|
OptoReg::Name reg_second, OptoReg::Name reg_first) {
|
||||||
loadConLNodesTuple nodes;
|
loadConLNodesTuple nodes;
|
||||||
|
|
||||||
|
@ -2669,7 +2667,7 @@ encode %{
|
||||||
enc_class postalloc_expand_load_long_constant(iRegLdst dst, immL src, iRegLdst toc) %{
|
enc_class postalloc_expand_load_long_constant(iRegLdst dst, immL src, iRegLdst toc) %{
|
||||||
// Create new nodes.
|
// Create new nodes.
|
||||||
loadConLNodesTuple loadConLNodes =
|
loadConLNodesTuple loadConLNodes =
|
||||||
loadConLNodesTuple_create(C, ra_, n_toc, op_src,
|
loadConLNodesTuple_create(ra_, n_toc, op_src,
|
||||||
ra_->get_reg_second(this), ra_->get_reg_first(this));
|
ra_->get_reg_second(this), ra_->get_reg_first(this));
|
||||||
|
|
||||||
// Push new nodes.
|
// Push new nodes.
|
||||||
|
@ -3391,7 +3389,7 @@ encode %{
|
||||||
immLOper *op_repl = new immLOper((jlong)replicate_immF(op_src->constantF()));
|
immLOper *op_repl = new immLOper((jlong)replicate_immF(op_src->constantF()));
|
||||||
|
|
||||||
loadConLNodesTuple loadConLNodes =
|
loadConLNodesTuple loadConLNodes =
|
||||||
loadConLNodesTuple_create(C, ra_, n_toc, op_repl,
|
loadConLNodesTuple_create(ra_, n_toc, op_repl,
|
||||||
ra_->get_reg_second(this), ra_->get_reg_first(this));
|
ra_->get_reg_second(this), ra_->get_reg_first(this));
|
||||||
|
|
||||||
// Push new nodes.
|
// Push new nodes.
|
||||||
|
@ -3611,7 +3609,7 @@ encode %{
|
||||||
|
|
||||||
// Create the nodes for loading the IC from the TOC.
|
// Create the nodes for loading the IC from the TOC.
|
||||||
loadConLNodesTuple loadConLNodes_IC =
|
loadConLNodesTuple loadConLNodes_IC =
|
||||||
loadConLNodesTuple_create(C, ra_, n_toc, new immLOper((jlong)Universe::non_oop_word()),
|
loadConLNodesTuple_create(ra_, n_toc, new immLOper((jlong)Universe::non_oop_word()),
|
||||||
OptoReg::Name(R19_H_num), OptoReg::Name(R19_num));
|
OptoReg::Name(R19_H_num), OptoReg::Name(R19_num));
|
||||||
|
|
||||||
// Create the call node.
|
// Create the call node.
|
||||||
|
@ -3765,7 +3763,7 @@ encode %{
|
||||||
#if defined(ABI_ELFv2)
|
#if defined(ABI_ELFv2)
|
||||||
jlong entry_address = (jlong) this->entry_point();
|
jlong entry_address = (jlong) this->entry_point();
|
||||||
assert(entry_address, "need address here");
|
assert(entry_address, "need address here");
|
||||||
loadConLNodes_Entry = loadConLNodesTuple_create(C, ra_, n_toc, new immLOper(entry_address),
|
loadConLNodes_Entry = loadConLNodesTuple_create(ra_, n_toc, new immLOper(entry_address),
|
||||||
OptoReg::Name(R12_H_num), OptoReg::Name(R12_num));
|
OptoReg::Name(R12_H_num), OptoReg::Name(R12_num));
|
||||||
#else
|
#else
|
||||||
// Get the struct that describes the function we are about to call.
|
// Get the struct that describes the function we are about to call.
|
||||||
|
@ -3777,13 +3775,13 @@ encode %{
|
||||||
loadConLNodesTuple loadConLNodes_Toc;
|
loadConLNodesTuple loadConLNodes_Toc;
|
||||||
|
|
||||||
// Create nodes and operands for loading the entry point.
|
// Create nodes and operands for loading the entry point.
|
||||||
loadConLNodes_Entry = loadConLNodesTuple_create(C, ra_, n_toc, new immLOper(entry_address),
|
loadConLNodes_Entry = loadConLNodesTuple_create(ra_, n_toc, new immLOper(entry_address),
|
||||||
OptoReg::Name(R12_H_num), OptoReg::Name(R12_num));
|
OptoReg::Name(R12_H_num), OptoReg::Name(R12_num));
|
||||||
|
|
||||||
|
|
||||||
// Create nodes and operands for loading the env pointer.
|
// Create nodes and operands for loading the env pointer.
|
||||||
if (fd->env() != NULL) {
|
if (fd->env() != NULL) {
|
||||||
loadConLNodes_Env = loadConLNodesTuple_create(C, ra_, n_toc, new immLOper((jlong) fd->env()),
|
loadConLNodes_Env = loadConLNodesTuple_create(ra_, n_toc, new immLOper((jlong) fd->env()),
|
||||||
OptoReg::Name(R11_H_num), OptoReg::Name(R11_num));
|
OptoReg::Name(R11_H_num), OptoReg::Name(R11_num));
|
||||||
} else {
|
} else {
|
||||||
loadConLNodes_Env._large_hi = NULL;
|
loadConLNodes_Env._large_hi = NULL;
|
||||||
|
@ -3796,7 +3794,7 @@ encode %{
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create nodes and operands for loading the Toc point.
|
// Create nodes and operands for loading the Toc point.
|
||||||
loadConLNodes_Toc = loadConLNodesTuple_create(C, ra_, n_toc, new immLOper((jlong) fd->toc()),
|
loadConLNodes_Toc = loadConLNodesTuple_create(ra_, n_toc, new immLOper((jlong) fd->toc()),
|
||||||
OptoReg::Name(R2_H_num), OptoReg::Name(R2_num));
|
OptoReg::Name(R2_H_num), OptoReg::Name(R2_num));
|
||||||
#endif // ABI_ELFv2
|
#endif // ABI_ELFv2
|
||||||
// mtctr node
|
// mtctr node
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -997,7 +997,7 @@ void ArchDesc::build_pipe_classes(FILE *fp_cpp) {
|
||||||
int nopcnt = 0;
|
int nopcnt = 0;
|
||||||
for ( _pipeline->_noplist.reset(); (nop = _pipeline->_noplist.iter()) != NULL; nopcnt++ );
|
for ( _pipeline->_noplist.reset(); (nop = _pipeline->_noplist.iter()) != NULL; nopcnt++ );
|
||||||
|
|
||||||
fprintf(fp_cpp, "void Bundle::initialize_nops(MachNode * nop_list[%d], Compile *C) {\n", nopcnt);
|
fprintf(fp_cpp, "void Bundle::initialize_nops(MachNode * nop_list[%d]) {\n", nopcnt);
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for ( _pipeline->_noplist.reset(); (nop = _pipeline->_noplist.iter()) != NULL; i++ ) {
|
for ( _pipeline->_noplist.reset(); (nop = _pipeline->_noplist.iter()) != NULL; i++ ) {
|
||||||
fprintf(fp_cpp, " nop_list[%d] = (MachNode *) new %sNode();\n", i, nop);
|
fprintf(fp_cpp, " nop_list[%d] = (MachNode *) new %sNode();\n", i, nop);
|
||||||
|
@ -1369,7 +1369,7 @@ static void generate_peepreplace( FILE *fp, FormDict &globals, PeepMatch *pmatch
|
||||||
fprintf(fp, " ra_->add_reference(root, inst%d);\n", inst_num);
|
fprintf(fp, " ra_->add_reference(root, inst%d);\n", inst_num);
|
||||||
fprintf(fp, " ra_->set_oop (root, ra_->is_oop(inst%d));\n", inst_num);
|
fprintf(fp, " ra_->set_oop (root, ra_->is_oop(inst%d));\n", inst_num);
|
||||||
fprintf(fp, " ra_->set_pair(root->_idx, ra_->get_reg_second(inst%d), ra_->get_reg_first(inst%d));\n", inst_num, inst_num);
|
fprintf(fp, " ra_->set_pair(root->_idx, ra_->get_reg_second(inst%d), ra_->get_reg_first(inst%d));\n", inst_num, inst_num);
|
||||||
fprintf(fp, " root->_opnds[0] = inst%d->_opnds[0]->clone(C); // result\n", inst_num);
|
fprintf(fp, " root->_opnds[0] = inst%d->_opnds[0]->clone(); // result\n", inst_num);
|
||||||
fprintf(fp, " // ----- Done with initial setup -----\n");
|
fprintf(fp, " // ----- Done with initial setup -----\n");
|
||||||
} else {
|
} else {
|
||||||
if( (op_form == NULL) || (op_form->is_base_constant(globals) == Form::none) ) {
|
if( (op_form == NULL) || (op_form->is_base_constant(globals) == Form::none) ) {
|
||||||
|
@ -1382,7 +1382,7 @@ static void generate_peepreplace( FILE *fp, FormDict &globals, PeepMatch *pmatch
|
||||||
} else {
|
} else {
|
||||||
fprintf(fp, " // no ideal edge for constants after matching\n");
|
fprintf(fp, " // no ideal edge for constants after matching\n");
|
||||||
}
|
}
|
||||||
fprintf(fp, " root->_opnds[%d] = inst%d->_opnds[%d]->clone(C);\n",
|
fprintf(fp, " root->_opnds[%d] = inst%d->_opnds[%d]->clone();\n",
|
||||||
opnds_index, inst_num, inst_op_num );
|
opnds_index, inst_num, inst_op_num );
|
||||||
}
|
}
|
||||||
++opnds_index;
|
++opnds_index;
|
||||||
|
@ -1402,7 +1402,7 @@ static void generate_peepreplace( FILE *fp, FormDict &globals, PeepMatch *pmatch
|
||||||
// Define the Peephole method for an instruction node
|
// Define the Peephole method for an instruction node
|
||||||
void ArchDesc::definePeephole(FILE *fp, InstructForm *node) {
|
void ArchDesc::definePeephole(FILE *fp, InstructForm *node) {
|
||||||
// Generate Peephole function header
|
// Generate Peephole function header
|
||||||
fprintf(fp, "MachNode *%sNode::peephole( Block *block, int block_index, PhaseRegAlloc *ra_, int &deleted, Compile* C ) {\n", node->_ident);
|
fprintf(fp, "MachNode *%sNode::peephole(Block *block, int block_index, PhaseRegAlloc *ra_, int &deleted) {\n", node->_ident);
|
||||||
fprintf(fp, " bool matches = true;\n");
|
fprintf(fp, " bool matches = true;\n");
|
||||||
|
|
||||||
// Identify the maximum instruction position,
|
// Identify the maximum instruction position,
|
||||||
|
@ -1593,7 +1593,7 @@ void ArchDesc::defineExpand(FILE *fp, InstructForm *node) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *resultOper = new_inst->reduce_result();
|
const char *resultOper = new_inst->reduce_result();
|
||||||
fprintf(fp," n%d->set_opnd_array(0, state->MachOperGenerator( %s, C ));\n",
|
fprintf(fp," n%d->set_opnd_array(0, state->MachOperGenerator(%s));\n",
|
||||||
cnt, machOperEnum(resultOper));
|
cnt, machOperEnum(resultOper));
|
||||||
|
|
||||||
// get the formal operand NameList
|
// get the formal operand NameList
|
||||||
|
@ -1634,7 +1634,7 @@ void ArchDesc::defineExpand(FILE *fp, InstructForm *node) {
|
||||||
// If there is no use of the created operand, just skip it
|
// If there is no use of the created operand, just skip it
|
||||||
if (new_pos != NameList::Not_in_list) {
|
if (new_pos != NameList::Not_in_list) {
|
||||||
//Copy the operand from the original made above
|
//Copy the operand from the original made above
|
||||||
fprintf(fp," n%d->set_opnd_array(%d, op%d->clone(C)); // %s\n",
|
fprintf(fp," n%d->set_opnd_array(%d, op%d->clone()); // %s\n",
|
||||||
cnt, new_pos, exp_pos-node->num_opnds(), opid);
|
cnt, new_pos, exp_pos-node->num_opnds(), opid);
|
||||||
// Check for who defines this operand & add edge if needed
|
// Check for who defines this operand & add edge if needed
|
||||||
fprintf(fp," if(tmp%d != NULL)\n", exp_pos);
|
fprintf(fp," if(tmp%d != NULL)\n", exp_pos);
|
||||||
|
@ -1662,7 +1662,7 @@ void ArchDesc::defineExpand(FILE *fp, InstructForm *node) {
|
||||||
new_pos = new_inst->operand_position(parameter,Component::USE);
|
new_pos = new_inst->operand_position(parameter,Component::USE);
|
||||||
if (new_pos != -1) {
|
if (new_pos != -1) {
|
||||||
// Copy the operand from the ExpandNode to the new node
|
// Copy the operand from the ExpandNode to the new node
|
||||||
fprintf(fp," n%d->set_opnd_array(%d, opnd_array(%d)->clone(C)); // %s\n",
|
fprintf(fp," n%d->set_opnd_array(%d, opnd_array(%d)->clone()); // %s\n",
|
||||||
cnt, new_pos, exp_pos, opid);
|
cnt, new_pos, exp_pos, opid);
|
||||||
// For each operand add appropriate input edges by looking at tmp's
|
// For each operand add appropriate input edges by looking at tmp's
|
||||||
fprintf(fp," if(tmp%d == this) {\n", exp_pos);
|
fprintf(fp," if(tmp%d == this) {\n", exp_pos);
|
||||||
|
@ -1729,14 +1729,14 @@ void ArchDesc::defineExpand(FILE *fp, InstructForm *node) {
|
||||||
declared_def = true;
|
declared_def = true;
|
||||||
}
|
}
|
||||||
if (op && op->_interface && op->_interface->is_RegInterface()) {
|
if (op && op->_interface && op->_interface->is_RegInterface()) {
|
||||||
fprintf(fp," def = new MachTempNode(state->MachOperGenerator( %s, C ));\n",
|
fprintf(fp," def = new MachTempNode(state->MachOperGenerator(%s));\n",
|
||||||
machOperEnum(op->_ident));
|
machOperEnum(op->_ident));
|
||||||
fprintf(fp," add_req(def);\n");
|
fprintf(fp," add_req(def);\n");
|
||||||
// The operand for TEMP is already constructed during
|
// The operand for TEMP is already constructed during
|
||||||
// this mach node construction, see buildMachNode().
|
// this mach node construction, see buildMachNode().
|
||||||
//
|
//
|
||||||
// int idx = node->operand_position_format(comp->_name);
|
// int idx = node->operand_position_format(comp->_name);
|
||||||
// fprintf(fp," set_opnd_array(%d, state->MachOperGenerator( %s, C ));\n",
|
// fprintf(fp," set_opnd_array(%d, state->MachOperGenerator(%s));\n",
|
||||||
// idx, machOperEnum(op->_ident));
|
// idx, machOperEnum(op->_ident));
|
||||||
} else {
|
} else {
|
||||||
assert(false, "can't have temps which aren't registers");
|
assert(false, "can't have temps which aren't registers");
|
||||||
|
@ -1802,7 +1802,7 @@ void ArchDesc::defineExpand(FILE *fp, InstructForm *node) {
|
||||||
uint j = node->unique_opnds_idx(i);
|
uint j = node->unique_opnds_idx(i);
|
||||||
// unique_opnds_idx(i) is unique if unique_opnds_idx(j) is not unique.
|
// unique_opnds_idx(i) is unique if unique_opnds_idx(j) is not unique.
|
||||||
if( j != node->unique_opnds_idx(j) ) {
|
if( j != node->unique_opnds_idx(j) ) {
|
||||||
fprintf(fp," set_opnd_array(%d, opnd_array(%d)->clone(C)); // %s\n",
|
fprintf(fp," set_opnd_array(%d, opnd_array(%d)->clone()); // %s\n",
|
||||||
new_num_opnds, i, comp->_name);
|
new_num_opnds, i, comp->_name);
|
||||||
// delete not unique edges here
|
// delete not unique edges here
|
||||||
fprintf(fp," for(unsigned i = 0; i < num%d; i++) {\n", i);
|
fprintf(fp," for(unsigned i = 0; i < num%d; i++) {\n", i);
|
||||||
|
@ -2839,12 +2839,12 @@ static void defineIn_RegMask(FILE *fp, FormDict &globals, OperandForm &oper) {
|
||||||
|
|
||||||
// generate code to create a clone for a class derived from MachOper
|
// generate code to create a clone for a class derived from MachOper
|
||||||
//
|
//
|
||||||
// (0) MachOper *MachOperXOper::clone(Compile* C) const {
|
// (0) MachOper *MachOperXOper::clone() const {
|
||||||
// (1) return new MachXOper( _ccode, _c0, _c1, ..., _cn);
|
// (1) return new MachXOper( _ccode, _c0, _c1, ..., _cn);
|
||||||
// (2) }
|
// (2) }
|
||||||
//
|
//
|
||||||
static void defineClone(FILE *fp, FormDict &globalNames, OperandForm &oper) {
|
static void defineClone(FILE *fp, FormDict &globalNames, OperandForm &oper) {
|
||||||
fprintf(fp,"MachOper *%sOper::clone(Compile* C) const {\n", oper._ident);
|
fprintf(fp,"MachOper *%sOper::clone() const {\n", oper._ident);
|
||||||
// Check for constants that need to be copied over
|
// Check for constants that need to be copied over
|
||||||
const int num_consts = oper.num_consts(globalNames);
|
const int num_consts = oper.num_consts(globalNames);
|
||||||
const bool is_ideal_bool = oper.is_ideal_bool();
|
const bool is_ideal_bool = oper.is_ideal_bool();
|
||||||
|
@ -3043,7 +3043,7 @@ void ArchDesc::define_oper_interface(FILE *fp, OperandForm &oper, FormDict &glob
|
||||||
static void define_fill_new_machnode(bool used, FILE *fp_cpp) {
|
static void define_fill_new_machnode(bool used, FILE *fp_cpp) {
|
||||||
fprintf(fp_cpp, "\n");
|
fprintf(fp_cpp, "\n");
|
||||||
fprintf(fp_cpp, "// Copy _idx, inputs and operands to new node\n");
|
fprintf(fp_cpp, "// Copy _idx, inputs and operands to new node\n");
|
||||||
fprintf(fp_cpp, "void MachNode::fill_new_machnode( MachNode* node, Compile* C) const {\n");
|
fprintf(fp_cpp, "void MachNode::fill_new_machnode(MachNode* node) const {\n");
|
||||||
if( !used ) {
|
if( !used ) {
|
||||||
fprintf(fp_cpp, " // This architecture does not have cisc or short branch instructions\n");
|
fprintf(fp_cpp, " // This architecture does not have cisc or short branch instructions\n");
|
||||||
fprintf(fp_cpp, " ShouldNotCallThis();\n");
|
fprintf(fp_cpp, " ShouldNotCallThis();\n");
|
||||||
|
@ -3064,7 +3064,7 @@ static void define_fill_new_machnode(bool used, FILE *fp_cpp) {
|
||||||
fprintf(fp_cpp, " MachOper **to = node->_opnds;\n");
|
fprintf(fp_cpp, " MachOper **to = node->_opnds;\n");
|
||||||
fprintf(fp_cpp, " for( int i = 0; i < nopnds; i++ ) {\n");
|
fprintf(fp_cpp, " for( int i = 0; i < nopnds; i++ ) {\n");
|
||||||
fprintf(fp_cpp, " if( i != cisc_operand() ) \n");
|
fprintf(fp_cpp, " if( i != cisc_operand() ) \n");
|
||||||
fprintf(fp_cpp, " to[i] = _opnds[i]->clone(C);\n");
|
fprintf(fp_cpp, " to[i] = _opnds[i]->clone();\n");
|
||||||
fprintf(fp_cpp, " }\n");
|
fprintf(fp_cpp, " }\n");
|
||||||
fprintf(fp_cpp, "}\n");
|
fprintf(fp_cpp, "}\n");
|
||||||
}
|
}
|
||||||
|
@ -3105,7 +3105,7 @@ void ArchDesc::defineClasses(FILE *fp) {
|
||||||
if ( strcmp(oper->_ident,"label") == 0 ) {
|
if ( strcmp(oper->_ident,"label") == 0 ) {
|
||||||
defineIn_RegMask(_CPP_MISC_file._fp, _globalNames, *oper);
|
defineIn_RegMask(_CPP_MISC_file._fp, _globalNames, *oper);
|
||||||
|
|
||||||
fprintf(fp,"MachOper *%sOper::clone(Compile* C) const {\n", oper->_ident);
|
fprintf(fp,"MachOper *%sOper::clone() const {\n", oper->_ident);
|
||||||
fprintf(fp," return new %sOper(_label, _block_num);\n", oper->_ident);
|
fprintf(fp," return new %sOper(_label, _block_num);\n", oper->_ident);
|
||||||
fprintf(fp,"}\n");
|
fprintf(fp,"}\n");
|
||||||
|
|
||||||
|
@ -3124,7 +3124,7 @@ void ArchDesc::defineClasses(FILE *fp) {
|
||||||
if ( strcmp(oper->_ident,"method") == 0 ) {
|
if ( strcmp(oper->_ident,"method") == 0 ) {
|
||||||
defineIn_RegMask(_CPP_MISC_file._fp, _globalNames, *oper);
|
defineIn_RegMask(_CPP_MISC_file._fp, _globalNames, *oper);
|
||||||
|
|
||||||
fprintf(fp,"MachOper *%sOper::clone(Compile* C) const {\n", oper->_ident);
|
fprintf(fp,"MachOper *%sOper::clone() const {\n", oper->_ident);
|
||||||
fprintf(fp," return new %sOper(_method);\n", oper->_ident);
|
fprintf(fp," return new %sOper(_method);\n", oper->_ident);
|
||||||
fprintf(fp,"}\n");
|
fprintf(fp,"}\n");
|
||||||
|
|
||||||
|
@ -3845,7 +3845,7 @@ void ArchDesc::buildMachOperGenerator(FILE *fp_cpp) {
|
||||||
"// that invokes 'new' on the corresponding class constructor.\n");
|
"// that invokes 'new' on the corresponding class constructor.\n");
|
||||||
fprintf(fp_cpp, "\n");
|
fprintf(fp_cpp, "\n");
|
||||||
fprintf(fp_cpp, "MachOper *State::MachOperGenerator");
|
fprintf(fp_cpp, "MachOper *State::MachOperGenerator");
|
||||||
fprintf(fp_cpp, "(int opcode, Compile* C)");
|
fprintf(fp_cpp, "(int opcode)");
|
||||||
fprintf(fp_cpp, "{\n");
|
fprintf(fp_cpp, "{\n");
|
||||||
fprintf(fp_cpp, "\n");
|
fprintf(fp_cpp, "\n");
|
||||||
fprintf(fp_cpp, " switch(opcode) {\n");
|
fprintf(fp_cpp, " switch(opcode) {\n");
|
||||||
|
@ -3921,7 +3921,7 @@ void ArchDesc::buildMachNode(FILE *fp_cpp, InstructForm *inst, const char *inden
|
||||||
int index = clist.operand_position(comp->_name, comp->_usedef, inst);
|
int index = clist.operand_position(comp->_name, comp->_usedef, inst);
|
||||||
const char *opcode = machOperEnum(comp->_type);
|
const char *opcode = machOperEnum(comp->_type);
|
||||||
fprintf(fp_cpp, "%s node->set_opnd_array(%d, ", indent, index);
|
fprintf(fp_cpp, "%s node->set_opnd_array(%d, ", indent, index);
|
||||||
fprintf(fp_cpp, "MachOperGenerator(%s, C));\n", opcode);
|
fprintf(fp_cpp, "MachOperGenerator(%s));\n", opcode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( inst->is_chain_of_constant(_globalNames, opType) ) {
|
else if ( inst->is_chain_of_constant(_globalNames, opType) ) {
|
||||||
|
@ -3978,7 +3978,7 @@ void InstructForm::declare_cisc_version(ArchDesc &AD, FILE *fp_hpp) {
|
||||||
InstructForm *inst_cisc = cisc_spill_alternate();
|
InstructForm *inst_cisc = cisc_spill_alternate();
|
||||||
if (inst_cisc != NULL) {
|
if (inst_cisc != NULL) {
|
||||||
fprintf(fp_hpp, " virtual int cisc_operand() const { return %d; }\n", cisc_spill_operand());
|
fprintf(fp_hpp, " virtual int cisc_operand() const { return %d; }\n", cisc_spill_operand());
|
||||||
fprintf(fp_hpp, " virtual MachNode *cisc_version(int offset, Compile* C);\n");
|
fprintf(fp_hpp, " virtual MachNode *cisc_version(int offset);\n");
|
||||||
fprintf(fp_hpp, " virtual void use_cisc_RegMask();\n");
|
fprintf(fp_hpp, " virtual void use_cisc_RegMask();\n");
|
||||||
fprintf(fp_hpp, " virtual const RegMask *cisc_RegMask() const { return _cisc_RegMask; }\n");
|
fprintf(fp_hpp, " virtual const RegMask *cisc_RegMask() const { return _cisc_RegMask; }\n");
|
||||||
}
|
}
|
||||||
|
@ -4008,7 +4008,7 @@ bool InstructForm::define_cisc_version(ArchDesc &AD, FILE *fp_cpp) {
|
||||||
// Construct CISC version of this instruction
|
// Construct CISC version of this instruction
|
||||||
fprintf(fp_cpp, "\n");
|
fprintf(fp_cpp, "\n");
|
||||||
fprintf(fp_cpp, "// Build CISC version of this instruction\n");
|
fprintf(fp_cpp, "// Build CISC version of this instruction\n");
|
||||||
fprintf(fp_cpp, "MachNode *%sNode::cisc_version( int offset, Compile* C ) {\n", this->_ident);
|
fprintf(fp_cpp, "MachNode *%sNode::cisc_version(int offset) {\n", this->_ident);
|
||||||
// Create the MachNode object
|
// Create the MachNode object
|
||||||
fprintf(fp_cpp, " %sNode *node = new %sNode();\n", name, name);
|
fprintf(fp_cpp, " %sNode *node = new %sNode();\n", name, name);
|
||||||
// Fill in the bottom_type where requested
|
// Fill in the bottom_type where requested
|
||||||
|
@ -4023,7 +4023,7 @@ bool InstructForm::define_cisc_version(ArchDesc &AD, FILE *fp_cpp) {
|
||||||
|
|
||||||
fprintf(fp_cpp, "\n");
|
fprintf(fp_cpp, "\n");
|
||||||
fprintf(fp_cpp, " // Copy _idx, inputs and operands to new node\n");
|
fprintf(fp_cpp, " // Copy _idx, inputs and operands to new node\n");
|
||||||
fprintf(fp_cpp, " fill_new_machnode(node, C);\n");
|
fprintf(fp_cpp, " fill_new_machnode(node);\n");
|
||||||
// Construct operand to access [stack_pointer + offset]
|
// Construct operand to access [stack_pointer + offset]
|
||||||
fprintf(fp_cpp, " // Construct operand to access [stack_pointer + offset]\n");
|
fprintf(fp_cpp, " // Construct operand to access [stack_pointer + offset]\n");
|
||||||
fprintf(fp_cpp, " node->set_opnd_array(cisc_operand(), new %sOper(offset));\n", cisc_oper_name);
|
fprintf(fp_cpp, " node->set_opnd_array(cisc_operand(), new %sOper(offset));\n", cisc_oper_name);
|
||||||
|
@ -4042,7 +4042,7 @@ bool InstructForm::define_cisc_version(ArchDesc &AD, FILE *fp_cpp) {
|
||||||
// Build prototypes for short branch methods
|
// Build prototypes for short branch methods
|
||||||
void InstructForm::declare_short_branch_methods(FILE *fp_hpp) {
|
void InstructForm::declare_short_branch_methods(FILE *fp_hpp) {
|
||||||
if (has_short_branch_form()) {
|
if (has_short_branch_form()) {
|
||||||
fprintf(fp_hpp, " virtual MachNode *short_branch_version(Compile* C);\n");
|
fprintf(fp_hpp, " virtual MachNode *short_branch_version();\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4055,7 +4055,7 @@ bool InstructForm::define_short_branch_methods(ArchDesc &AD, FILE *fp_cpp) {
|
||||||
|
|
||||||
// Construct short_branch_version() method.
|
// Construct short_branch_version() method.
|
||||||
fprintf(fp_cpp, "// Build short branch version of this instruction\n");
|
fprintf(fp_cpp, "// Build short branch version of this instruction\n");
|
||||||
fprintf(fp_cpp, "MachNode *%sNode::short_branch_version(Compile* C) {\n", this->_ident);
|
fprintf(fp_cpp, "MachNode *%sNode::short_branch_version() {\n", this->_ident);
|
||||||
// Create the MachNode object
|
// Create the MachNode object
|
||||||
fprintf(fp_cpp, " %sNode *node = new %sNode();\n", name, name);
|
fprintf(fp_cpp, " %sNode *node = new %sNode();\n", name, name);
|
||||||
if( is_ideal_if() ) {
|
if( is_ideal_if() ) {
|
||||||
|
@ -4071,7 +4071,7 @@ bool InstructForm::define_short_branch_methods(ArchDesc &AD, FILE *fp_cpp) {
|
||||||
// Short branch version must use same node index for access
|
// Short branch version must use same node index for access
|
||||||
// through allocator's tables
|
// through allocator's tables
|
||||||
fprintf(fp_cpp, " // Copy _idx, inputs and operands to new node\n");
|
fprintf(fp_cpp, " // Copy _idx, inputs and operands to new node\n");
|
||||||
fprintf(fp_cpp, " fill_new_machnode(node, C);\n");
|
fprintf(fp_cpp, " fill_new_machnode(node);\n");
|
||||||
|
|
||||||
// Return result and exit scope
|
// Return result and exit scope
|
||||||
fprintf(fp_cpp, " return node;\n");
|
fprintf(fp_cpp, " return node;\n");
|
||||||
|
@ -4097,7 +4097,7 @@ void ArchDesc::buildMachNodeGenerator(FILE *fp_cpp) {
|
||||||
"// that invokes 'new' on the corresponding class constructor.\n");
|
"// that invokes 'new' on the corresponding class constructor.\n");
|
||||||
fprintf(fp_cpp, "\n");
|
fprintf(fp_cpp, "\n");
|
||||||
fprintf(fp_cpp, "MachNode *State::MachNodeGenerator");
|
fprintf(fp_cpp, "MachNode *State::MachNodeGenerator");
|
||||||
fprintf(fp_cpp, "(int opcode, Compile* C)");
|
fprintf(fp_cpp, "(int opcode)");
|
||||||
fprintf(fp_cpp, "{\n");
|
fprintf(fp_cpp, "{\n");
|
||||||
fprintf(fp_cpp, " switch(opcode) {\n");
|
fprintf(fp_cpp, " switch(opcode) {\n");
|
||||||
|
|
||||||
|
|
|
@ -1119,7 +1119,7 @@ void ArchDesc::declare_pipe_classes(FILE *fp_hpp) {
|
||||||
fprintf(fp_hpp, " _nop_count = %d\n",
|
fprintf(fp_hpp, " _nop_count = %d\n",
|
||||||
_pipeline->_nopcnt);
|
_pipeline->_nopcnt);
|
||||||
fprintf(fp_hpp, " };\n\n");
|
fprintf(fp_hpp, " };\n\n");
|
||||||
fprintf(fp_hpp, " static void initialize_nops(MachNode *nop_list[%d], Compile* C);\n\n",
|
fprintf(fp_hpp, " static void initialize_nops(MachNode *nop_list[%d]);\n\n",
|
||||||
_pipeline->_nopcnt);
|
_pipeline->_nopcnt);
|
||||||
fprintf(fp_hpp, "#ifndef PRODUCT\n");
|
fprintf(fp_hpp, "#ifndef PRODUCT\n");
|
||||||
fprintf(fp_hpp, " void dump(outputStream *st = tty) const;\n");
|
fprintf(fp_hpp, " void dump(outputStream *st = tty) const;\n");
|
||||||
|
@ -1240,7 +1240,7 @@ void ArchDesc::declareClasses(FILE *fp) {
|
||||||
constant_type, _globalNames);
|
constant_type, _globalNames);
|
||||||
|
|
||||||
// Clone function
|
// Clone function
|
||||||
fprintf(fp," virtual MachOper *clone(Compile* C) const;\n");
|
fprintf(fp," virtual MachOper *clone() const;\n");
|
||||||
|
|
||||||
// Support setting a spill offset into a constant operand.
|
// Support setting a spill offset into a constant operand.
|
||||||
// We only support setting an 'int' offset, while in the
|
// We only support setting an 'int' offset, while in the
|
||||||
|
@ -1718,7 +1718,7 @@ void ArchDesc::declareClasses(FILE *fp) {
|
||||||
|
|
||||||
// If there is an explicit peephole rule, build it
|
// If there is an explicit peephole rule, build it
|
||||||
if ( instr->peepholes() != NULL ) {
|
if ( instr->peepholes() != NULL ) {
|
||||||
fprintf(fp," virtual MachNode *peephole(Block *block, int block_index, PhaseRegAlloc *ra_, int &deleted, Compile *C);\n");
|
fprintf(fp," virtual MachNode *peephole(Block *block, int block_index, PhaseRegAlloc *ra_, int &deleted);\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Output the declaration for number of relocation entries
|
// Output the declaration for number of relocation entries
|
||||||
|
@ -1863,7 +1863,7 @@ void ArchDesc::declareClasses(FILE *fp) {
|
||||||
}
|
}
|
||||||
if ( instr->num_post_match_opnds() != 0
|
if ( instr->num_post_match_opnds() != 0
|
||||||
|| instr->is_chain_of_constant(_globalNames) ) {
|
|| instr->is_chain_of_constant(_globalNames) ) {
|
||||||
fprintf(fp," friend MachNode *State::MachNodeGenerator(int opcode, Compile* C);\n");
|
fprintf(fp," friend MachNode *State::MachNodeGenerator(int opcode);\n");
|
||||||
}
|
}
|
||||||
if ( instr->rematerialize(_globalNames, get_registers()) ) {
|
if ( instr->rematerialize(_globalNames, get_registers()) ) {
|
||||||
fprintf(fp," // Rematerialize %s\n", instr->_ident);
|
fprintf(fp," // Rematerialize %s\n", instr->_ident);
|
||||||
|
@ -2071,8 +2071,8 @@ void ArchDesc::defineStateClass(FILE *fp) {
|
||||||
fprintf(fp," DEBUG_ONLY( ~State(void); ) // Destructor\n");
|
fprintf(fp," DEBUG_ONLY( ~State(void); ) // Destructor\n");
|
||||||
fprintf(fp,"\n");
|
fprintf(fp,"\n");
|
||||||
fprintf(fp," // Methods created by ADLC and invoked by Reduce\n");
|
fprintf(fp," // Methods created by ADLC and invoked by Reduce\n");
|
||||||
fprintf(fp," MachOper *MachOperGenerator( int opcode, Compile* C );\n");
|
fprintf(fp," MachOper *MachOperGenerator(int opcode);\n");
|
||||||
fprintf(fp," MachNode *MachNodeGenerator( int opcode, Compile* C );\n");
|
fprintf(fp," MachNode *MachNodeGenerator(int opcode);\n");
|
||||||
fprintf(fp,"\n");
|
fprintf(fp,"\n");
|
||||||
fprintf(fp," // Assign a state to a node, definition of method produced by ADLC\n");
|
fprintf(fp," // Assign a state to a node, definition of method produced by ADLC\n");
|
||||||
fprintf(fp," bool DFA( int opcode, const Node *ideal );\n");
|
fprintf(fp," bool DFA( int opcode, const Node *ideal );\n");
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -357,7 +357,7 @@ void LateInlineCallGenerator::do_late_inline() {
|
||||||
|
|
||||||
// Make sure the state is a MergeMem for parsing.
|
// Make sure the state is a MergeMem for parsing.
|
||||||
if (!map->in(TypeFunc::Memory)->is_MergeMem()) {
|
if (!map->in(TypeFunc::Memory)->is_MergeMem()) {
|
||||||
Node* mem = MergeMemNode::make(C, map->in(TypeFunc::Memory));
|
Node* mem = MergeMemNode::make(map->in(TypeFunc::Memory));
|
||||||
C->initial_gvn()->set_type_bottom(mem);
|
C->initial_gvn()->set_type_bottom(mem);
|
||||||
map->set_req(TypeFunc::Memory, mem);
|
map->set_req(TypeFunc::Memory, mem);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -1876,7 +1876,7 @@ Node *PhiNode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
||||||
igvn->register_new_node_with_optimizer(new_base);
|
igvn->register_new_node_with_optimizer(new_base);
|
||||||
hook->add_req(new_base);
|
hook->add_req(new_base);
|
||||||
}
|
}
|
||||||
MergeMemNode* result = MergeMemNode::make(phase->C, new_base);
|
MergeMemNode* result = MergeMemNode::make(new_base);
|
||||||
for (uint i = 1; i < req(); ++i) {
|
for (uint i = 1; i < req(); ++i) {
|
||||||
Node *ii = in(i);
|
Node *ii = in(i);
|
||||||
if (ii->is_MergeMem()) {
|
if (ii->is_MergeMem()) {
|
||||||
|
|
|
@ -1620,7 +1620,7 @@ void PhaseChaitin::fixup_spills() {
|
||||||
C->check_node_count(0, "out of nodes fixing spills");
|
C->check_node_count(0, "out of nodes fixing spills");
|
||||||
if (C->failing()) return;
|
if (C->failing()) return;
|
||||||
// Transform node
|
// Transform node
|
||||||
MachNode *cisc = mach->cisc_version(stk_offset, C)->as_Mach();
|
MachNode *cisc = mach->cisc_version(stk_offset)->as_Mach();
|
||||||
cisc->set_req(inp,fp); // Base register is frame pointer
|
cisc->set_req(inp,fp); // Base register is frame pointer
|
||||||
if( cisc->oper_input_base() > 1 && mach->oper_input_base() <= 1 ) {
|
if( cisc->oper_input_base() > 1 && mach->oper_input_base() <= 1 ) {
|
||||||
assert( cisc->oper_input_base() == 2, "Only adding one edge");
|
assert( cisc->oper_input_base() == 2, "Only adding one edge");
|
||||||
|
|
|
@ -2842,7 +2842,7 @@ void Compile::final_graph_reshaping_impl( Node *n, Final_Reshape_Counts &frc) {
|
||||||
// oops implicit null check is not generated.
|
// oops implicit null check is not generated.
|
||||||
// This will allow to generate normal oop implicit null check.
|
// This will allow to generate normal oop implicit null check.
|
||||||
if (Matcher::gen_narrow_oop_implicit_null_checks())
|
if (Matcher::gen_narrow_oop_implicit_null_checks())
|
||||||
new_in2 = ConNode::make(this, TypeNarrowOop::NULL_PTR);
|
new_in2 = ConNode::make(TypeNarrowOop::NULL_PTR);
|
||||||
//
|
//
|
||||||
// This transformation together with CastPP transformation above
|
// This transformation together with CastPP transformation above
|
||||||
// will generated code for implicit NULL checks for compressed oops.
|
// will generated code for implicit NULL checks for compressed oops.
|
||||||
|
@ -2881,9 +2881,9 @@ void Compile::final_graph_reshaping_impl( Node *n, Final_Reshape_Counts &frc) {
|
||||||
// NullCheck base_reg
|
// NullCheck base_reg
|
||||||
//
|
//
|
||||||
} else if (t->isa_oopptr()) {
|
} else if (t->isa_oopptr()) {
|
||||||
new_in2 = ConNode::make(this, t->make_narrowoop());
|
new_in2 = ConNode::make(t->make_narrowoop());
|
||||||
} else if (t->isa_klassptr()) {
|
} else if (t->isa_klassptr()) {
|
||||||
new_in2 = ConNode::make(this, t->make_narrowklass());
|
new_in2 = ConNode::make(t->make_narrowklass());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (new_in2 != NULL) {
|
if (new_in2 != NULL) {
|
||||||
|
@ -2916,11 +2916,11 @@ void Compile::final_graph_reshaping_impl( Node *n, Final_Reshape_Counts &frc) {
|
||||||
const Type* t = in1->bottom_type();
|
const Type* t = in1->bottom_type();
|
||||||
if (t == TypePtr::NULL_PTR) {
|
if (t == TypePtr::NULL_PTR) {
|
||||||
assert(t->isa_oopptr(), "null klass?");
|
assert(t->isa_oopptr(), "null klass?");
|
||||||
n->subsume_by(ConNode::make(this, TypeNarrowOop::NULL_PTR), this);
|
n->subsume_by(ConNode::make(TypeNarrowOop::NULL_PTR), this);
|
||||||
} else if (t->isa_oopptr()) {
|
} else if (t->isa_oopptr()) {
|
||||||
n->subsume_by(ConNode::make(this, t->make_narrowoop()), this);
|
n->subsume_by(ConNode::make(t->make_narrowoop()), this);
|
||||||
} else if (t->isa_klassptr()) {
|
} else if (t->isa_klassptr()) {
|
||||||
n->subsume_by(ConNode::make(this, t->make_narrowklass()), this);
|
n->subsume_by(ConNode::make(t->make_narrowklass()), this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (in1->outcnt() == 0) {
|
if (in1->outcnt() == 0) {
|
||||||
|
@ -2981,7 +2981,7 @@ void Compile::final_graph_reshaping_impl( Node *n, Final_Reshape_Counts &frc) {
|
||||||
if (d) {
|
if (d) {
|
||||||
// Replace them with a fused divmod if supported
|
// Replace them with a fused divmod if supported
|
||||||
if (Matcher::has_match_rule(Op_DivModI)) {
|
if (Matcher::has_match_rule(Op_DivModI)) {
|
||||||
DivModINode* divmod = DivModINode::make(this, n);
|
DivModINode* divmod = DivModINode::make(n);
|
||||||
d->subsume_by(divmod->div_proj(), this);
|
d->subsume_by(divmod->div_proj(), this);
|
||||||
n->subsume_by(divmod->mod_proj(), this);
|
n->subsume_by(divmod->mod_proj(), this);
|
||||||
} else {
|
} else {
|
||||||
|
@ -3001,7 +3001,7 @@ void Compile::final_graph_reshaping_impl( Node *n, Final_Reshape_Counts &frc) {
|
||||||
if (d) {
|
if (d) {
|
||||||
// Replace them with a fused divmod if supported
|
// Replace them with a fused divmod if supported
|
||||||
if (Matcher::has_match_rule(Op_DivModL)) {
|
if (Matcher::has_match_rule(Op_DivModL)) {
|
||||||
DivModLNode* divmod = DivModLNode::make(this, n);
|
DivModLNode* divmod = DivModLNode::make(n);
|
||||||
d->subsume_by(divmod->div_proj(), this);
|
d->subsume_by(divmod->div_proj(), this);
|
||||||
n->subsume_by(divmod->mod_proj(), this);
|
n->subsume_by(divmod->mod_proj(), this);
|
||||||
} else {
|
} else {
|
||||||
|
@ -3027,7 +3027,7 @@ void Compile::final_graph_reshaping_impl( Node *n, Final_Reshape_Counts &frc) {
|
||||||
if (n->req()-1 > 2) {
|
if (n->req()-1 > 2) {
|
||||||
// Replace many operand PackNodes with a binary tree for matching
|
// Replace many operand PackNodes with a binary tree for matching
|
||||||
PackNode* p = (PackNode*) n;
|
PackNode* p = (PackNode*) n;
|
||||||
Node* btp = p->binary_tree_pack(this, 1, n->req());
|
Node* btp = p->binary_tree_pack(1, n->req());
|
||||||
n->subsume_by(btp, this);
|
n->subsume_by(btp, this);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -3052,11 +3052,11 @@ void Compile::final_graph_reshaping_impl( Node *n, Final_Reshape_Counts &frc) {
|
||||||
if (t != NULL && t->is_con()) {
|
if (t != NULL && t->is_con()) {
|
||||||
juint shift = t->get_con();
|
juint shift = t->get_con();
|
||||||
if (shift > mask) { // Unsigned cmp
|
if (shift > mask) { // Unsigned cmp
|
||||||
n->set_req(2, ConNode::make(this, TypeInt::make(shift & mask)));
|
n->set_req(2, ConNode::make(TypeInt::make(shift & mask)));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (t == NULL || t->_lo < 0 || t->_hi > (int)mask) {
|
if (t == NULL || t->_lo < 0 || t->_hi > (int)mask) {
|
||||||
Node* shift = new AndINode(in2, ConNode::make(this, TypeInt::make(mask)));
|
Node* shift = new AndINode(in2, ConNode::make(TypeInt::make(mask)));
|
||||||
n->set_req(2, shift);
|
n->set_req(2, shift);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -43,7 +43,7 @@ uint ConNode::hash() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------make-------------------------------------------
|
//------------------------------make-------------------------------------------
|
||||||
ConNode *ConNode::make( Compile* C, const Type *t ) {
|
ConNode *ConNode::make(const Type *t) {
|
||||||
switch( t->basic_type() ) {
|
switch( t->basic_type() ) {
|
||||||
case T_INT: return new ConINode( t->is_int() );
|
case T_INT: return new ConINode( t->is_int() );
|
||||||
case T_LONG: return new ConLNode( t->is_long() );
|
case T_LONG: return new ConLNode( t->is_long() );
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -46,7 +46,7 @@ public:
|
||||||
virtual const RegMask &in_RegMask(uint) const { return RegMask::Empty; }
|
virtual const RegMask &in_RegMask(uint) const { return RegMask::Empty; }
|
||||||
|
|
||||||
// Polymorphic factory method:
|
// Polymorphic factory method:
|
||||||
static ConNode* make( Compile* C, const Type *t );
|
static ConNode* make(const Type *t);
|
||||||
};
|
};
|
||||||
|
|
||||||
//------------------------------ConINode---------------------------------------
|
//------------------------------ConINode---------------------------------------
|
||||||
|
@ -57,7 +57,7 @@ public:
|
||||||
virtual int Opcode() const;
|
virtual int Opcode() const;
|
||||||
|
|
||||||
// Factory method:
|
// Factory method:
|
||||||
static ConINode* make( Compile* C, int con ) {
|
static ConINode* make(int con) {
|
||||||
return new ConINode( TypeInt::make(con) );
|
return new ConINode( TypeInt::make(con) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ public:
|
||||||
virtual int Opcode() const;
|
virtual int Opcode() const;
|
||||||
|
|
||||||
// Factory methods:
|
// Factory methods:
|
||||||
static ConPNode* make( Compile *C ,address con ) {
|
static ConPNode* make(address con) {
|
||||||
if (con == NULL)
|
if (con == NULL)
|
||||||
return new ConPNode( TypePtr::NULL_PTR ) ;
|
return new ConPNode( TypePtr::NULL_PTR ) ;
|
||||||
else
|
else
|
||||||
|
@ -105,7 +105,7 @@ public:
|
||||||
virtual int Opcode() const;
|
virtual int Opcode() const;
|
||||||
|
|
||||||
// Factory method:
|
// Factory method:
|
||||||
static ConLNode* make( Compile *C ,jlong con ) {
|
static ConLNode* make(jlong con) {
|
||||||
return new ConLNode( TypeLong::make(con) );
|
return new ConLNode( TypeLong::make(con) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@ public:
|
||||||
virtual int Opcode() const;
|
virtual int Opcode() const;
|
||||||
|
|
||||||
// Factory method:
|
// Factory method:
|
||||||
static ConFNode* make( Compile *C, float con ) {
|
static ConFNode* make(float con) {
|
||||||
return new ConFNode( TypeF::make(con) );
|
return new ConFNode( TypeF::make(con) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -133,7 +133,7 @@ public:
|
||||||
virtual int Opcode() const;
|
virtual int Opcode() const;
|
||||||
|
|
||||||
// Factory method:
|
// Factory method:
|
||||||
static ConDNode* make( Compile *C, double con ) {
|
static ConDNode* make(double con) {
|
||||||
return new ConDNode( TypeD::make(con) );
|
return new ConDNode( TypeD::make(con) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1280,7 +1280,7 @@ DivModNode::DivModNode( Node *c, Node *dividend, Node *divisor ) : MultiNode(3)
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------make------------------------------------------
|
//------------------------------make------------------------------------------
|
||||||
DivModINode* DivModINode::make(Compile* C, Node* div_or_mod) {
|
DivModINode* DivModINode::make(Node* div_or_mod) {
|
||||||
Node* n = div_or_mod;
|
Node* n = div_or_mod;
|
||||||
assert(n->Opcode() == Op_DivI || n->Opcode() == Op_ModI,
|
assert(n->Opcode() == Op_DivI || n->Opcode() == Op_ModI,
|
||||||
"only div or mod input pattern accepted");
|
"only div or mod input pattern accepted");
|
||||||
|
@ -1292,7 +1292,7 @@ DivModINode* DivModINode::make(Compile* C, Node* div_or_mod) {
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------make------------------------------------------
|
//------------------------------make------------------------------------------
|
||||||
DivModLNode* DivModLNode::make(Compile* C, Node* div_or_mod) {
|
DivModLNode* DivModLNode::make(Node* div_or_mod) {
|
||||||
Node* n = div_or_mod;
|
Node* n = div_or_mod;
|
||||||
assert(n->Opcode() == Op_DivL || n->Opcode() == Op_ModL,
|
assert(n->Opcode() == Op_DivL || n->Opcode() == Op_ModL,
|
||||||
"only div or mod input pattern accepted");
|
"only div or mod input pattern accepted");
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -168,7 +168,7 @@ public:
|
||||||
virtual Node *match( const ProjNode *proj, const Matcher *m );
|
virtual Node *match( const ProjNode *proj, const Matcher *m );
|
||||||
|
|
||||||
// Make a divmod and associated projections from a div or mod.
|
// Make a divmod and associated projections from a div or mod.
|
||||||
static DivModINode* make(Compile* C, Node* div_or_mod);
|
static DivModINode* make(Node* div_or_mod);
|
||||||
};
|
};
|
||||||
|
|
||||||
//------------------------------DivModLNode---------------------------------------
|
//------------------------------DivModLNode---------------------------------------
|
||||||
|
@ -181,7 +181,7 @@ public:
|
||||||
virtual Node *match( const ProjNode *proj, const Matcher *m );
|
virtual Node *match( const ProjNode *proj, const Matcher *m );
|
||||||
|
|
||||||
// Make a divmod and associated projections from a div or mod.
|
// Make a divmod and associated projections from a div or mod.
|
||||||
static DivModLNode* make(Compile* C, Node* div_or_mod);
|
static DivModLNode* make(Node* div_or_mod);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // SHARE_VM_OPTO_DIVNODE_HPP
|
#endif // SHARE_VM_OPTO_DIVNODE_HPP
|
||||||
|
|
|
@ -1452,7 +1452,6 @@ int ConnectionGraph::find_init_values(JavaObjectNode* pta, PointsToNode* init_va
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
InitializeNode* ini = alloc->as_Allocate()->initialization();
|
InitializeNode* ini = alloc->as_Allocate()->initialization();
|
||||||
Compile* C = _compile;
|
|
||||||
bool visited_bottom_offset = false;
|
bool visited_bottom_offset = false;
|
||||||
GrowableArray<int> offsets_worklist;
|
GrowableArray<int> offsets_worklist;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -591,7 +591,7 @@ void GraphKit::builtin_throw(Deoptimization::DeoptReason reason, Node* arg) {
|
||||||
C->log()->elem("hot_throw preallocated='1' reason='%s'",
|
C->log()->elem("hot_throw preallocated='1' reason='%s'",
|
||||||
Deoptimization::trap_reason_name(reason));
|
Deoptimization::trap_reason_name(reason));
|
||||||
const TypeInstPtr* ex_con = TypeInstPtr::make(ex_obj);
|
const TypeInstPtr* ex_con = TypeInstPtr::make(ex_obj);
|
||||||
Node* ex_node = _gvn.transform( ConNode::make(C, ex_con) );
|
Node* ex_node = _gvn.transform(ConNode::make(ex_con));
|
||||||
|
|
||||||
// Clear the detail message of the preallocated exception object.
|
// Clear the detail message of the preallocated exception object.
|
||||||
// Weblogic sometimes mutates the detail message of exceptions
|
// Weblogic sometimes mutates the detail message of exceptions
|
||||||
|
@ -706,7 +706,7 @@ SafePointNode* GraphKit::clone_map() {
|
||||||
if (map() == NULL) return NULL;
|
if (map() == NULL) return NULL;
|
||||||
|
|
||||||
// Clone the memory edge first
|
// Clone the memory edge first
|
||||||
Node* mem = MergeMemNode::make(C, map()->memory());
|
Node* mem = MergeMemNode::make(map()->memory());
|
||||||
gvn().set_type_bottom(mem);
|
gvn().set_type_bottom(mem);
|
||||||
|
|
||||||
SafePointNode *clonemap = (SafePointNode*)map()->clone();
|
SafePointNode *clonemap = (SafePointNode*)map()->clone();
|
||||||
|
@ -1135,7 +1135,7 @@ Node* GraphKit::ConvI2UL(Node* offset) {
|
||||||
return longcon((julong) offset_con);
|
return longcon((julong) offset_con);
|
||||||
}
|
}
|
||||||
Node* conv = _gvn.transform( new ConvI2LNode(offset));
|
Node* conv = _gvn.transform( new ConvI2LNode(offset));
|
||||||
Node* mask = _gvn.transform( ConLNode::make(C, (julong) max_juint) );
|
Node* mask = _gvn.transform(ConLNode::make((julong) max_juint));
|
||||||
return _gvn.transform( new AndLNode(conv, mask) );
|
return _gvn.transform( new AndLNode(conv, mask) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1435,7 +1435,7 @@ Node* GraphKit::reset_memory() {
|
||||||
|
|
||||||
//------------------------------set_all_memory---------------------------------
|
//------------------------------set_all_memory---------------------------------
|
||||||
void GraphKit::set_all_memory(Node* newmem) {
|
void GraphKit::set_all_memory(Node* newmem) {
|
||||||
Node* mergemem = MergeMemNode::make(C, newmem);
|
Node* mergemem = MergeMemNode::make(newmem);
|
||||||
gvn().set_type_bottom(mergemem);
|
gvn().set_type_bottom(mergemem);
|
||||||
map()->set_memory(mergemem);
|
map()->set_memory(mergemem);
|
||||||
}
|
}
|
||||||
|
@ -1464,9 +1464,9 @@ Node* GraphKit::make_load(Node* ctl, Node* adr, const Type* t, BasicType bt,
|
||||||
Node* mem = memory(adr_idx);
|
Node* mem = memory(adr_idx);
|
||||||
Node* ld;
|
Node* ld;
|
||||||
if (require_atomic_access && bt == T_LONG) {
|
if (require_atomic_access && bt == T_LONG) {
|
||||||
ld = LoadLNode::make_atomic(C, ctl, mem, adr, adr_type, t, mo);
|
ld = LoadLNode::make_atomic(ctl, mem, adr, adr_type, t, mo);
|
||||||
} else if (require_atomic_access && bt == T_DOUBLE) {
|
} else if (require_atomic_access && bt == T_DOUBLE) {
|
||||||
ld = LoadDNode::make_atomic(C, ctl, mem, adr, adr_type, t, mo);
|
ld = LoadDNode::make_atomic(ctl, mem, adr, adr_type, t, mo);
|
||||||
} else {
|
} else {
|
||||||
ld = LoadNode::make(_gvn, ctl, mem, adr, adr_type, t, bt, mo);
|
ld = LoadNode::make(_gvn, ctl, mem, adr, adr_type, t, bt, mo);
|
||||||
}
|
}
|
||||||
|
@ -1488,9 +1488,9 @@ Node* GraphKit::store_to_memory(Node* ctl, Node* adr, Node *val, BasicType bt,
|
||||||
Node *mem = memory(adr_idx);
|
Node *mem = memory(adr_idx);
|
||||||
Node* st;
|
Node* st;
|
||||||
if (require_atomic_access && bt == T_LONG) {
|
if (require_atomic_access && bt == T_LONG) {
|
||||||
st = StoreLNode::make_atomic(C, ctl, mem, adr, adr_type, val, mo);
|
st = StoreLNode::make_atomic(ctl, mem, adr, adr_type, val, mo);
|
||||||
} else if (require_atomic_access && bt == T_DOUBLE) {
|
} else if (require_atomic_access && bt == T_DOUBLE) {
|
||||||
st = StoreDNode::make_atomic(C, ctl, mem, adr, adr_type, val, mo);
|
st = StoreDNode::make_atomic(ctl, mem, adr, adr_type, val, mo);
|
||||||
} else {
|
} else {
|
||||||
st = StoreNode::make(_gvn, ctl, mem, adr, adr_type, val, bt, mo);
|
st = StoreNode::make(_gvn, ctl, mem, adr, adr_type, val, bt, mo);
|
||||||
}
|
}
|
||||||
|
@ -3364,7 +3364,7 @@ Node* GraphKit::set_output_for_allocation(AllocateNode* alloc,
|
||||||
// This will allow us to observe initializations when they occur,
|
// This will allow us to observe initializations when they occur,
|
||||||
// and link them properly (as a group) to the InitializeNode.
|
// and link them properly (as a group) to the InitializeNode.
|
||||||
assert(init->in(InitializeNode::Memory) == malloc, "");
|
assert(init->in(InitializeNode::Memory) == malloc, "");
|
||||||
MergeMemNode* minit_in = MergeMemNode::make(C, malloc);
|
MergeMemNode* minit_in = MergeMemNode::make(malloc);
|
||||||
init->set_req(InitializeNode::Memory, minit_in);
|
init->set_req(InitializeNode::Memory, minit_in);
|
||||||
record_for_igvn(minit_in); // fold it up later, if possible
|
record_for_igvn(minit_in); // fold it up later, if possible
|
||||||
Node* minit_out = memory(rawidx);
|
Node* minit_out = memory(rawidx);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -320,7 +320,7 @@ Node* IdealKit::copy_cvstate() {
|
||||||
Node* ns = new_cvstate();
|
Node* ns = new_cvstate();
|
||||||
for (uint i = 0; i < ns->req(); i++) ns->init_req(i, _cvstate->in(i));
|
for (uint i = 0; i < ns->req(); i++) ns->init_req(i, _cvstate->in(i));
|
||||||
// We must clone memory since it will be updated as we do stores.
|
// We must clone memory since it will be updated as we do stores.
|
||||||
ns->set_req(TypeFunc::Memory, MergeMemNode::make(C, ns->in(TypeFunc::Memory)));
|
ns->set_req(TypeFunc::Memory, MergeMemNode::make(ns->in(TypeFunc::Memory)));
|
||||||
return ns;
|
return ns;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -359,7 +359,7 @@ Node* IdealKit::load(Node* ctl,
|
||||||
Node* mem = memory(adr_idx);
|
Node* mem = memory(adr_idx);
|
||||||
Node* ld;
|
Node* ld;
|
||||||
if (require_atomic_access && bt == T_LONG) {
|
if (require_atomic_access && bt == T_LONG) {
|
||||||
ld = LoadLNode::make_atomic(C, ctl, mem, adr, adr_type, t, MemNode::unordered);
|
ld = LoadLNode::make_atomic(ctl, mem, adr, adr_type, t, MemNode::unordered);
|
||||||
} else {
|
} else {
|
||||||
ld = LoadNode::make(_gvn, ctl, mem, adr, adr_type, t, bt, MemNode::unordered);
|
ld = LoadNode::make(_gvn, ctl, mem, adr, adr_type, t, bt, MemNode::unordered);
|
||||||
}
|
}
|
||||||
|
@ -375,7 +375,7 @@ Node* IdealKit::store(Node* ctl, Node* adr, Node *val, BasicType bt,
|
||||||
Node *mem = memory(adr_idx);
|
Node *mem = memory(adr_idx);
|
||||||
Node* st;
|
Node* st;
|
||||||
if (require_atomic_access && bt == T_LONG) {
|
if (require_atomic_access && bt == T_LONG) {
|
||||||
st = StoreLNode::make_atomic(C, ctl, mem, adr, adr_type, val, mo);
|
st = StoreLNode::make_atomic(ctl, mem, adr, adr_type, val, mo);
|
||||||
} else {
|
} else {
|
||||||
st = StoreNode::make(_gvn, ctl, mem, adr, adr_type, val, bt, mo);
|
st = StoreNode::make(_gvn, ctl, mem, adr, adr_type, val, bt, mo);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1905,7 +1905,7 @@ bool LibraryCallKit::inline_pow() {
|
||||||
Node *bolyplus1 = _gvn.transform(new BoolNode( cmpyplus1, BoolTest::eq ));
|
Node *bolyplus1 = _gvn.transform(new BoolNode( cmpyplus1, BoolTest::eq ));
|
||||||
Node* correctedsign = NULL;
|
Node* correctedsign = NULL;
|
||||||
if (ConditionalMoveLimit != 0) {
|
if (ConditionalMoveLimit != 0) {
|
||||||
correctedsign = _gvn.transform( CMoveNode::make(C, NULL, bolyplus1, signnode, longcon(0), TypeLong::LONG));
|
correctedsign = _gvn.transform(CMoveNode::make(NULL, bolyplus1, signnode, longcon(0), TypeLong::LONG));
|
||||||
} else {
|
} else {
|
||||||
IfNode *ifyplus1 = create_and_xform_if(ylong_path,bolyplus1, PROB_FAIR, COUNT_UNKNOWN);
|
IfNode *ifyplus1 = create_and_xform_if(ylong_path,bolyplus1, PROB_FAIR, COUNT_UNKNOWN);
|
||||||
RegionNode *r = new RegionNode(3);
|
RegionNode *r = new RegionNode(3);
|
||||||
|
@ -1934,7 +1934,7 @@ bool LibraryCallKit::inline_pow() {
|
||||||
// (1&(long)y)==1?-DPow(abs(x), y):DPow(abs(x), y)
|
// (1&(long)y)==1?-DPow(abs(x), y):DPow(abs(x), y)
|
||||||
Node *signresult = NULL;
|
Node *signresult = NULL;
|
||||||
if (ConditionalMoveLimit != 0) {
|
if (ConditionalMoveLimit != 0) {
|
||||||
signresult = _gvn.transform( CMoveNode::make(C, NULL, bol3, absxpowy, negabsxpowy, Type::DOUBLE));
|
signresult = _gvn.transform(CMoveNode::make(NULL, bol3, absxpowy, negabsxpowy, Type::DOUBLE));
|
||||||
} else {
|
} else {
|
||||||
IfNode *ifyeven = create_and_xform_if(ylong_path,bol3, PROB_FAIR, COUNT_UNKNOWN);
|
IfNode *ifyeven = create_and_xform_if(ylong_path,bol3, PROB_FAIR, COUNT_UNKNOWN);
|
||||||
RegionNode *r = new RegionNode(3);
|
RegionNode *r = new RegionNode(3);
|
||||||
|
@ -2268,7 +2268,7 @@ LibraryCallKit::generate_min_max(vmIntrinsics::ID id, Node* x0, Node* y0) {
|
||||||
// which could hinder other optimizations.
|
// which could hinder other optimizations.
|
||||||
// Since Math.min/max is often used with arraycopy, we want
|
// Since Math.min/max is often used with arraycopy, we want
|
||||||
// tightly_coupled_allocation to be able to see beyond min/max expressions.
|
// tightly_coupled_allocation to be able to see beyond min/max expressions.
|
||||||
Node* cmov = CMoveNode::make(C, NULL, best_bol,
|
Node* cmov = CMoveNode::make(NULL, best_bol,
|
||||||
answer_if_false, answer_if_true,
|
answer_if_false, answer_if_true,
|
||||||
TypeInt::make(lo, hi, widen));
|
TypeInt::make(lo, hi, widen));
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -625,7 +625,7 @@ Node *PhaseIdealLoop::conditional_move( Node *region ) {
|
||||||
set_ctrl(inp, cmov_ctrl);
|
set_ctrl(inp, cmov_ctrl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Node *cmov = CMoveNode::make( C, cmov_ctrl, iff->in(1), phi->in(1+flip), phi->in(2-flip), _igvn.type(phi) );
|
Node *cmov = CMoveNode::make(cmov_ctrl, iff->in(1), phi->in(1+flip), phi->in(2-flip), _igvn.type(phi));
|
||||||
register_new_node( cmov, cmov_ctrl );
|
register_new_node( cmov, cmov_ctrl );
|
||||||
_igvn.replace_node( phi, cmov );
|
_igvn.replace_node( phi, cmov );
|
||||||
#ifndef PRODUCT
|
#ifndef PRODUCT
|
||||||
|
|
|
@ -178,7 +178,7 @@ uint MachNode::cmp( const Node &node ) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return an equivalent instruction using memory for cisc_operand position
|
// Return an equivalent instruction using memory for cisc_operand position
|
||||||
MachNode *MachNode::cisc_version(int offset, Compile* C) {
|
MachNode *MachNode::cisc_version(int offset) {
|
||||||
ShouldNotCallThis();
|
ShouldNotCallThis();
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -411,7 +411,7 @@ int MachNode::operand_index(const MachOper *oper) const {
|
||||||
|
|
||||||
//------------------------------peephole---------------------------------------
|
//------------------------------peephole---------------------------------------
|
||||||
// Apply peephole rule(s) to this instruction
|
// Apply peephole rule(s) to this instruction
|
||||||
MachNode *MachNode::peephole( Block *block, int block_index, PhaseRegAlloc *ra_, int &deleted, Compile* C ) {
|
MachNode *MachNode::peephole(Block *block, int block_index, PhaseRegAlloc *ra_, int &deleted) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -152,7 +152,7 @@ public:
|
||||||
virtual uint cmp( const MachOper &oper ) const;
|
virtual uint cmp( const MachOper &oper ) const;
|
||||||
|
|
||||||
// Virtual clone, since I do not know how big the MachOper is.
|
// Virtual clone, since I do not know how big the MachOper is.
|
||||||
virtual MachOper *clone(Compile* C) const = 0;
|
virtual MachOper *clone() const = 0;
|
||||||
|
|
||||||
// Return ideal Type from simple operands. Fail for complex operands.
|
// Return ideal Type from simple operands. Fail for complex operands.
|
||||||
virtual const Type *type() const;
|
virtual const Type *type() const;
|
||||||
|
@ -202,10 +202,10 @@ public:
|
||||||
// Copy inputs and operands to new node of instruction.
|
// Copy inputs and operands to new node of instruction.
|
||||||
// Called from cisc_version() and short_branch_version().
|
// Called from cisc_version() and short_branch_version().
|
||||||
// !!!! The method's body is defined in ad_<arch>.cpp file.
|
// !!!! The method's body is defined in ad_<arch>.cpp file.
|
||||||
void fill_new_machnode(MachNode *n, Compile* C) const;
|
void fill_new_machnode(MachNode *n) const;
|
||||||
|
|
||||||
// Return an equivalent instruction using memory for cisc_operand position
|
// Return an equivalent instruction using memory for cisc_operand position
|
||||||
virtual MachNode *cisc_version(int offset, Compile* C);
|
virtual MachNode *cisc_version(int offset);
|
||||||
// Modify this instruction's register mask to use stack version for cisc_operand
|
// Modify this instruction's register mask to use stack version for cisc_operand
|
||||||
virtual void use_cisc_RegMask();
|
virtual void use_cisc_RegMask();
|
||||||
|
|
||||||
|
@ -317,7 +317,7 @@ public:
|
||||||
virtual const class TypePtr *adr_type() const;
|
virtual const class TypePtr *adr_type() const;
|
||||||
|
|
||||||
// Apply peephole rule(s) to this instruction
|
// Apply peephole rule(s) to this instruction
|
||||||
virtual MachNode *peephole( Block *block, int block_index, PhaseRegAlloc *ra_, int &deleted, Compile* C );
|
virtual MachNode *peephole(Block *block, int block_index, PhaseRegAlloc *ra_, int &deleted);
|
||||||
|
|
||||||
// Top-level ideal Opcode matched
|
// Top-level ideal Opcode matched
|
||||||
virtual int ideal_Opcode() const { return Op_Node; }
|
virtual int ideal_Opcode() const { return Op_Node; }
|
||||||
|
@ -627,7 +627,7 @@ public:
|
||||||
virtual void save_label(Label** label, uint* block_num) = 0;
|
virtual void save_label(Label** label, uint* block_num) = 0;
|
||||||
|
|
||||||
// Support for short branches
|
// Support for short branches
|
||||||
virtual MachNode *short_branch_version(Compile* C) { return NULL; }
|
virtual MachNode *short_branch_version() { return NULL; }
|
||||||
|
|
||||||
virtual bool pinned() const { return true; };
|
virtual bool pinned() const { return true; };
|
||||||
};
|
};
|
||||||
|
@ -985,7 +985,7 @@ public:
|
||||||
|
|
||||||
labelOper(labelOper* l) : _label(l->_label) , _block_num(l->_block_num) {}
|
labelOper(labelOper* l) : _label(l->_label) , _block_num(l->_block_num) {}
|
||||||
|
|
||||||
virtual MachOper *clone(Compile* C) const;
|
virtual MachOper *clone() const;
|
||||||
|
|
||||||
virtual Label *label() const { assert(_label != NULL, "need Label"); return _label; }
|
virtual Label *label() const { assert(_label != NULL, "need Label"); return _label; }
|
||||||
|
|
||||||
|
@ -1012,7 +1012,7 @@ public:
|
||||||
methodOper() : _method(0) {}
|
methodOper() : _method(0) {}
|
||||||
methodOper(intptr_t method) : _method(method) {}
|
methodOper(intptr_t method) : _method(method) {}
|
||||||
|
|
||||||
virtual MachOper *clone(Compile* C) const;
|
virtual MachOper *clone() const;
|
||||||
|
|
||||||
virtual intptr_t method() const { return _method; }
|
virtual intptr_t method() const { return _method; }
|
||||||
|
|
||||||
|
|
|
@ -305,7 +305,7 @@ void Matcher::match( ) {
|
||||||
// to avoid false sharing if the corresponding mach node is not used.
|
// to avoid false sharing if the corresponding mach node is not used.
|
||||||
// The corresponding mach node is only used in rare cases for derived
|
// The corresponding mach node is only used in rare cases for derived
|
||||||
// pointers.
|
// pointers.
|
||||||
Node* new_ideal_null = ConNode::make(C, TypePtr::NULL_PTR);
|
Node* new_ideal_null = ConNode::make(TypePtr::NULL_PTR);
|
||||||
|
|
||||||
// Swap out to old-space; emptying new-space
|
// Swap out to old-space; emptying new-space
|
||||||
Arena *old = C->node_arena()->move_contents(C->old_arena());
|
Arena *old = C->node_arena()->move_contents(C->old_arena());
|
||||||
|
@ -1643,8 +1643,8 @@ MachNode *Matcher::ReduceInst( State *s, int rule, Node *&mem ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build the object to represent this state & prepare for recursive calls
|
// Build the object to represent this state & prepare for recursive calls
|
||||||
MachNode *mach = s->MachNodeGenerator( rule, C );
|
MachNode *mach = s->MachNodeGenerator(rule);
|
||||||
mach->_opnds[0] = s->MachOperGenerator( _reduceOp[rule], C );
|
mach->_opnds[0] = s->MachOperGenerator(_reduceOp[rule]);
|
||||||
assert( mach->_opnds[0] != NULL, "Missing result operand" );
|
assert( mach->_opnds[0] != NULL, "Missing result operand" );
|
||||||
Node *leaf = s->_leaf;
|
Node *leaf = s->_leaf;
|
||||||
// Check for instruction or instruction chain rule
|
// Check for instruction or instruction chain rule
|
||||||
|
@ -1756,13 +1756,13 @@ void Matcher::ReduceInst_Chain_Rule( State *s, int rule, Node *&mem, MachNode *m
|
||||||
assert( 0 <= opnd_class_instance && opnd_class_instance < NUM_OPERANDS,
|
assert( 0 <= opnd_class_instance && opnd_class_instance < NUM_OPERANDS,
|
||||||
"Bad AD file: Instruction chain rule must chain from operand");
|
"Bad AD file: Instruction chain rule must chain from operand");
|
||||||
// Insert operand into array of operands for this instruction
|
// Insert operand into array of operands for this instruction
|
||||||
mach->_opnds[1] = s->MachOperGenerator( opnd_class_instance, C );
|
mach->_opnds[1] = s->MachOperGenerator(opnd_class_instance);
|
||||||
|
|
||||||
ReduceOper( s, newrule, mem, mach );
|
ReduceOper( s, newrule, mem, mach );
|
||||||
} else {
|
} else {
|
||||||
// Chain from the result of an instruction
|
// Chain from the result of an instruction
|
||||||
assert( newrule >= _LAST_MACH_OPER, "Do NOT chain from internal operand");
|
assert( newrule >= _LAST_MACH_OPER, "Do NOT chain from internal operand");
|
||||||
mach->_opnds[1] = s->MachOperGenerator( _reduceOp[catch_op], C );
|
mach->_opnds[1] = s->MachOperGenerator(_reduceOp[catch_op]);
|
||||||
Node *mem1 = (Node*)1;
|
Node *mem1 = (Node*)1;
|
||||||
debug_only(Node *save_mem_node = _mem_node;)
|
debug_only(Node *save_mem_node = _mem_node;)
|
||||||
mach->add_req( ReduceInst(s, newrule, mem1) );
|
mach->add_req( ReduceInst(s, newrule, mem1) );
|
||||||
|
@ -1807,7 +1807,7 @@ uint Matcher::ReduceInst_Interior( State *s, int rule, Node *&mem, MachNode *mac
|
||||||
if( newrule < NUM_OPERANDS ) { // Operand/operandClass or internalOp/instruction?
|
if( newrule < NUM_OPERANDS ) { // Operand/operandClass or internalOp/instruction?
|
||||||
// Operand/operandClass
|
// Operand/operandClass
|
||||||
// Insert operand into array of operands for this instruction
|
// Insert operand into array of operands for this instruction
|
||||||
mach->_opnds[num_opnds++] = newstate->MachOperGenerator( opnd_class_instance, C );
|
mach->_opnds[num_opnds++] = newstate->MachOperGenerator(opnd_class_instance);
|
||||||
ReduceOper( newstate, newrule, mem, mach );
|
ReduceOper( newstate, newrule, mem, mach );
|
||||||
|
|
||||||
} else { // Child is internal operand or new instruction
|
} else { // Child is internal operand or new instruction
|
||||||
|
@ -1818,7 +1818,7 @@ uint Matcher::ReduceInst_Interior( State *s, int rule, Node *&mem, MachNode *mac
|
||||||
} else {
|
} else {
|
||||||
// instruction --> call build operand( ) to catch result
|
// instruction --> call build operand( ) to catch result
|
||||||
// --> ReduceInst( newrule )
|
// --> ReduceInst( newrule )
|
||||||
mach->_opnds[num_opnds++] = s->MachOperGenerator( _reduceOp[catch_op], C );
|
mach->_opnds[num_opnds++] = s->MachOperGenerator(_reduceOp[catch_op]);
|
||||||
Node *mem1 = (Node*)1;
|
Node *mem1 = (Node*)1;
|
||||||
debug_only(Node *save_mem_node = _mem_node;)
|
debug_only(Node *save_mem_node = _mem_node;)
|
||||||
mach->add_req( ReduceInst( newstate, newrule, mem1 ) );
|
mach->add_req( ReduceInst( newstate, newrule, mem1 ) );
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -191,7 +191,7 @@ struct IdealHelper {
|
||||||
NativeType val1 = TypeClass::as_self(type1)->get_con();
|
NativeType val1 = TypeClass::as_self(type1)->get_con();
|
||||||
NativeType val2 = TypeClass::as_self(type2)->get_con();
|
NativeType val2 = TypeClass::as_self(type2)->get_con();
|
||||||
if (node->will_overflow(val1, val2) == false) {
|
if (node->will_overflow(val1, val2) == false) {
|
||||||
Node* con_result = ConINode::make(phase->C, 0);
|
Node* con_result = ConINode::make(0);
|
||||||
return con_result;
|
return con_result;
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -933,12 +933,12 @@ Node *LoadNode::make(PhaseGVN& gvn, Node *ctl, Node *mem, Node *adr, const TypeP
|
||||||
return (LoadNode*)NULL;
|
return (LoadNode*)NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
LoadLNode* LoadLNode::make_atomic(Compile *C, Node* ctl, Node* mem, Node* adr, const TypePtr* adr_type, const Type* rt, MemOrd mo) {
|
LoadLNode* LoadLNode::make_atomic(Node* ctl, Node* mem, Node* adr, const TypePtr* adr_type, const Type* rt, MemOrd mo) {
|
||||||
bool require_atomic = true;
|
bool require_atomic = true;
|
||||||
return new LoadLNode(ctl, mem, adr, adr_type, rt->is_long(), mo, require_atomic);
|
return new LoadLNode(ctl, mem, adr, adr_type, rt->is_long(), mo, require_atomic);
|
||||||
}
|
}
|
||||||
|
|
||||||
LoadDNode* LoadDNode::make_atomic(Compile *C, Node* ctl, Node* mem, Node* adr, const TypePtr* adr_type, const Type* rt, MemOrd mo) {
|
LoadDNode* LoadDNode::make_atomic(Node* ctl, Node* mem, Node* adr, const TypePtr* adr_type, const Type* rt, MemOrd mo) {
|
||||||
bool require_atomic = true;
|
bool require_atomic = true;
|
||||||
return new LoadDNode(ctl, mem, adr, adr_type, rt, mo, require_atomic);
|
return new LoadDNode(ctl, mem, adr, adr_type, rt, mo, require_atomic);
|
||||||
}
|
}
|
||||||
|
@ -2017,7 +2017,6 @@ const Type* LoadSNode::Value(PhaseTransform *phase) const {
|
||||||
//----------------------------LoadKlassNode::make------------------------------
|
//----------------------------LoadKlassNode::make------------------------------
|
||||||
// Polymorphic factory method:
|
// Polymorphic factory method:
|
||||||
Node *LoadKlassNode::make( PhaseGVN& gvn, Node *mem, Node *adr, const TypePtr* at, const TypeKlassPtr *tk ) {
|
Node *LoadKlassNode::make( PhaseGVN& gvn, Node *mem, Node *adr, const TypePtr* at, const TypeKlassPtr *tk ) {
|
||||||
Compile* C = gvn.C;
|
|
||||||
Node *ctl = NULL;
|
Node *ctl = NULL;
|
||||||
// sanity check the alias category against the created node type
|
// sanity check the alias category against the created node type
|
||||||
const TypePtr *adr_type = adr->bottom_type()->isa_ptr();
|
const TypePtr *adr_type = adr->bottom_type()->isa_ptr();
|
||||||
|
@ -2382,12 +2381,12 @@ StoreNode* StoreNode::make(PhaseGVN& gvn, Node* ctl, Node* mem, Node* adr, const
|
||||||
return (StoreNode*)NULL;
|
return (StoreNode*)NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
StoreLNode* StoreLNode::make_atomic(Compile *C, Node* ctl, Node* mem, Node* adr, const TypePtr* adr_type, Node* val, MemOrd mo) {
|
StoreLNode* StoreLNode::make_atomic(Node* ctl, Node* mem, Node* adr, const TypePtr* adr_type, Node* val, MemOrd mo) {
|
||||||
bool require_atomic = true;
|
bool require_atomic = true;
|
||||||
return new StoreLNode(ctl, mem, adr, adr_type, val, mo, require_atomic);
|
return new StoreLNode(ctl, mem, adr, adr_type, val, mo, require_atomic);
|
||||||
}
|
}
|
||||||
|
|
||||||
StoreDNode* StoreDNode::make_atomic(Compile *C, Node* ctl, Node* mem, Node* adr, const TypePtr* adr_type, Node* val, MemOrd mo) {
|
StoreDNode* StoreDNode::make_atomic(Node* ctl, Node* mem, Node* adr, const TypePtr* adr_type, Node* val, MemOrd mo) {
|
||||||
bool require_atomic = true;
|
bool require_atomic = true;
|
||||||
return new StoreDNode(ctl, mem, adr, adr_type, val, mo, require_atomic);
|
return new StoreDNode(ctl, mem, adr, adr_type, val, mo, require_atomic);
|
||||||
}
|
}
|
||||||
|
@ -2463,7 +2462,7 @@ Node *StoreNode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
||||||
// and I need to disappear.
|
// and I need to disappear.
|
||||||
if (moved != NULL) {
|
if (moved != NULL) {
|
||||||
// %%% hack to ensure that Ideal returns a new node:
|
// %%% hack to ensure that Ideal returns a new node:
|
||||||
mem = MergeMemNode::make(phase->C, mem);
|
mem = MergeMemNode::make(mem);
|
||||||
return mem; // fold me away
|
return mem; // fold me away
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2823,7 +2822,6 @@ Node* ClearArrayNode::clear_memory(Node* ctl, Node* mem, Node* dest,
|
||||||
intptr_t start_offset,
|
intptr_t start_offset,
|
||||||
Node* end_offset,
|
Node* end_offset,
|
||||||
PhaseGVN* phase) {
|
PhaseGVN* phase) {
|
||||||
Compile* C = phase->C;
|
|
||||||
intptr_t offset = start_offset;
|
intptr_t offset = start_offset;
|
||||||
|
|
||||||
int unit = BytesPerLong;
|
int unit = BytesPerLong;
|
||||||
|
@ -2850,7 +2848,6 @@ Node* ClearArrayNode::clear_memory(Node* ctl, Node* mem, Node* dest,
|
||||||
return mem;
|
return mem;
|
||||||
}
|
}
|
||||||
|
|
||||||
Compile* C = phase->C;
|
|
||||||
int unit = BytesPerLong;
|
int unit = BytesPerLong;
|
||||||
Node* zbase = start_offset;
|
Node* zbase = start_offset;
|
||||||
Node* zend = end_offset;
|
Node* zend = end_offset;
|
||||||
|
@ -2878,7 +2875,6 @@ Node* ClearArrayNode::clear_memory(Node* ctl, Node* mem, Node* dest,
|
||||||
return mem;
|
return mem;
|
||||||
}
|
}
|
||||||
|
|
||||||
Compile* C = phase->C;
|
|
||||||
assert((end_offset % BytesPerInt) == 0, "odd end offset");
|
assert((end_offset % BytesPerInt) == 0, "odd end offset");
|
||||||
intptr_t done_offset = end_offset;
|
intptr_t done_offset = end_offset;
|
||||||
if ((done_offset % BytesPerLong) != 0) {
|
if ((done_offset % BytesPerLong) != 0) {
|
||||||
|
@ -4132,7 +4128,7 @@ MergeMemNode::MergeMemNode(Node *new_base) : Node(1+Compile::AliasIdxRaw) {
|
||||||
|
|
||||||
// Make a new, untransformed MergeMem with the same base as 'mem'.
|
// Make a new, untransformed MergeMem with the same base as 'mem'.
|
||||||
// If mem is itself a MergeMem, populate the result with the same edges.
|
// If mem is itself a MergeMem, populate the result with the same edges.
|
||||||
MergeMemNode* MergeMemNode::make(Compile* C, Node* mem) {
|
MergeMemNode* MergeMemNode::make(Node* mem) {
|
||||||
return new MergeMemNode(mem);
|
return new MergeMemNode(mem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -333,7 +333,7 @@ public:
|
||||||
virtual int store_Opcode() const { return Op_StoreL; }
|
virtual int store_Opcode() const { return Op_StoreL; }
|
||||||
virtual BasicType memory_type() const { return T_LONG; }
|
virtual BasicType memory_type() const { return T_LONG; }
|
||||||
bool require_atomic_access() const { return _require_atomic_access; }
|
bool require_atomic_access() const { return _require_atomic_access; }
|
||||||
static LoadLNode* make_atomic(Compile *C, Node* ctl, Node* mem, Node* adr, const TypePtr* adr_type,
|
static LoadLNode* make_atomic(Node* ctl, Node* mem, Node* adr, const TypePtr* adr_type,
|
||||||
const Type* rt, MemOrd mo);
|
const Type* rt, MemOrd mo);
|
||||||
#ifndef PRODUCT
|
#ifndef PRODUCT
|
||||||
virtual void dump_spec(outputStream *st) const {
|
virtual void dump_spec(outputStream *st) const {
|
||||||
|
@ -384,7 +384,7 @@ public:
|
||||||
virtual int store_Opcode() const { return Op_StoreD; }
|
virtual int store_Opcode() const { return Op_StoreD; }
|
||||||
virtual BasicType memory_type() const { return T_DOUBLE; }
|
virtual BasicType memory_type() const { return T_DOUBLE; }
|
||||||
bool require_atomic_access() const { return _require_atomic_access; }
|
bool require_atomic_access() const { return _require_atomic_access; }
|
||||||
static LoadDNode* make_atomic(Compile *C, Node* ctl, Node* mem, Node* adr, const TypePtr* adr_type,
|
static LoadDNode* make_atomic(Node* ctl, Node* mem, Node* adr, const TypePtr* adr_type,
|
||||||
const Type* rt, MemOrd mo);
|
const Type* rt, MemOrd mo);
|
||||||
#ifndef PRODUCT
|
#ifndef PRODUCT
|
||||||
virtual void dump_spec(outputStream *st) const {
|
virtual void dump_spec(outputStream *st) const {
|
||||||
|
@ -593,7 +593,7 @@ public:
|
||||||
virtual int Opcode() const;
|
virtual int Opcode() const;
|
||||||
virtual BasicType memory_type() const { return T_LONG; }
|
virtual BasicType memory_type() const { return T_LONG; }
|
||||||
bool require_atomic_access() const { return _require_atomic_access; }
|
bool require_atomic_access() const { return _require_atomic_access; }
|
||||||
static StoreLNode* make_atomic(Compile *C, Node* ctl, Node* mem, Node* adr, const TypePtr* adr_type, Node* val, MemOrd mo);
|
static StoreLNode* make_atomic(Node* ctl, Node* mem, Node* adr, const TypePtr* adr_type, Node* val, MemOrd mo);
|
||||||
#ifndef PRODUCT
|
#ifndef PRODUCT
|
||||||
virtual void dump_spec(outputStream *st) const {
|
virtual void dump_spec(outputStream *st) const {
|
||||||
StoreNode::dump_spec(st);
|
StoreNode::dump_spec(st);
|
||||||
|
@ -629,7 +629,7 @@ public:
|
||||||
virtual int Opcode() const;
|
virtual int Opcode() const;
|
||||||
virtual BasicType memory_type() const { return T_DOUBLE; }
|
virtual BasicType memory_type() const { return T_DOUBLE; }
|
||||||
bool require_atomic_access() const { return _require_atomic_access; }
|
bool require_atomic_access() const { return _require_atomic_access; }
|
||||||
static StoreDNode* make_atomic(Compile *C, Node* ctl, Node* mem, Node* adr, const TypePtr* adr_type, Node* val, MemOrd mo);
|
static StoreDNode* make_atomic(Node* ctl, Node* mem, Node* adr, const TypePtr* adr_type, Node* val, MemOrd mo);
|
||||||
#ifndef PRODUCT
|
#ifndef PRODUCT
|
||||||
virtual void dump_spec(outputStream *st) const {
|
virtual void dump_spec(outputStream *st) const {
|
||||||
StoreNode::dump_spec(st);
|
StoreNode::dump_spec(st);
|
||||||
|
@ -1138,7 +1138,7 @@ public:
|
||||||
// If the input is a whole memory state, clone it with all its slices intact.
|
// If the input is a whole memory state, clone it with all its slices intact.
|
||||||
// Otherwise, make a new memory state with just that base memory input.
|
// Otherwise, make a new memory state with just that base memory input.
|
||||||
// In either case, the result is a newly created MergeMem.
|
// In either case, the result is a newly created MergeMem.
|
||||||
static MergeMemNode* make(Compile* C, Node* base_memory);
|
static MergeMemNode* make(Node* base_memory);
|
||||||
|
|
||||||
virtual int Opcode() const;
|
virtual int Opcode() const;
|
||||||
virtual Node *Identity( PhaseTransform *phase );
|
virtual Node *Identity( PhaseTransform *phase );
|
||||||
|
|
|
@ -88,7 +88,7 @@ Node *CMoveNode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
||||||
if( in(Condition)->is_Bool() ) {
|
if( in(Condition)->is_Bool() ) {
|
||||||
BoolNode* b = in(Condition)->as_Bool();
|
BoolNode* b = in(Condition)->as_Bool();
|
||||||
BoolNode* b2 = b->negate(phase);
|
BoolNode* b2 = b->negate(phase);
|
||||||
return make( phase->C, in(Control), phase->transform(b2), in(IfTrue), in(IfFalse), _type );
|
return make(in(Control), phase->transform(b2), in(IfTrue), in(IfFalse), _type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -158,7 +158,7 @@ const Type *CMoveNode::Value( PhaseTransform *phase ) const {
|
||||||
//------------------------------make-------------------------------------------
|
//------------------------------make-------------------------------------------
|
||||||
// Make a correctly-flavored CMove. Since _type is directly determined
|
// Make a correctly-flavored CMove. Since _type is directly determined
|
||||||
// from the inputs we do not need to specify it here.
|
// from the inputs we do not need to specify it here.
|
||||||
CMoveNode *CMoveNode::make( Compile *C, Node *c, Node *bol, Node *left, Node *right, const Type *t ) {
|
CMoveNode *CMoveNode::make(Node *c, Node *bol, Node *left, Node *right, const Type *t) {
|
||||||
switch( t->basic_type() ) {
|
switch( t->basic_type() ) {
|
||||||
case T_INT: return new CMoveINode( bol, left, right, t->is_int() );
|
case T_INT: return new CMoveINode( bol, left, right, t->is_int() );
|
||||||
case T_FLOAT: return new CMoveFNode( bol, left, right, t );
|
case T_FLOAT: return new CMoveFNode( bol, left, right, t );
|
||||||
|
@ -196,7 +196,7 @@ Node *CMoveINode::Ideal(PhaseGVN *phase, bool can_reshape) {
|
||||||
if( in(Condition)->is_Bool() ) {
|
if( in(Condition)->is_Bool() ) {
|
||||||
BoolNode* b = in(Condition)->as_Bool();
|
BoolNode* b = in(Condition)->as_Bool();
|
||||||
BoolNode* b2 = b->negate(phase);
|
BoolNode* b2 = b->negate(phase);
|
||||||
return make( phase->C, in(Control), phase->transform(b2), in(IfTrue), in(IfFalse), _type );
|
return make(in(Control), phase->transform(b2), in(IfTrue), in(IfFalse), _type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ class CMoveNode : public TypeNode {
|
||||||
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
|
||||||
virtual const Type *Value( PhaseTransform *phase ) const;
|
virtual const Type *Value( PhaseTransform *phase ) const;
|
||||||
virtual Node *Identity( PhaseTransform *phase );
|
virtual Node *Identity( PhaseTransform *phase );
|
||||||
static CMoveNode *make( Compile *C, Node *c, Node *bol, Node *left, Node *right, const Type *t );
|
static CMoveNode *make(Node *c, Node *bol, Node *left, Node *right, const Type *t);
|
||||||
// Helper function to spot cmove graph shapes
|
// Helper function to spot cmove graph shapes
|
||||||
static Node *is_cmove_id( PhaseTransform *phase, Node *cmp, Node *t, Node *f, BoolNode *b );
|
static Node *is_cmove_id( PhaseTransform *phase, Node *cmp, Node *t, Node *f, BoolNode *b );
|
||||||
};
|
};
|
||||||
|
|
|
@ -507,7 +507,7 @@ Node *Node::clone() const {
|
||||||
(const void*)(&mthis->_opnds), 1));
|
(const void*)(&mthis->_opnds), 1));
|
||||||
mach->_opnds = to;
|
mach->_opnds = to;
|
||||||
for ( uint i = 0; i < nopnds; ++i ) {
|
for ( uint i = 0; i < nopnds; ++i ) {
|
||||||
to[i] = from[i]->clone(C);
|
to[i] = from[i]->clone();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// cloning CallNode may need to clone JVMState
|
// cloning CallNode may need to clone JVMState
|
||||||
|
|
|
@ -526,7 +526,7 @@ void Compile::shorten_branches(uint* blk_starts, int& code_size, int& reloc_size
|
||||||
|
|
||||||
if (_matcher->is_short_branch_offset(mach->rule(), br_size, offset)) {
|
if (_matcher->is_short_branch_offset(mach->rule(), br_size, offset)) {
|
||||||
// We've got a winner. Replace this branch.
|
// We've got a winner. Replace this branch.
|
||||||
MachNode* replacement = mach->as_MachBranch()->short_branch_version(this);
|
MachNode* replacement = mach->as_MachBranch()->short_branch_version();
|
||||||
|
|
||||||
// Update the jmp_size.
|
// Update the jmp_size.
|
||||||
int new_size = replacement->size(_regalloc);
|
int new_size = replacement->size(_regalloc);
|
||||||
|
@ -1176,7 +1176,7 @@ CodeBuffer* Compile::init_buffer(uint* blk_starts) {
|
||||||
|
|
||||||
// fill in the nop array for bundling computations
|
// fill in the nop array for bundling computations
|
||||||
MachNode *_nop_list[Bundle::_nop_count];
|
MachNode *_nop_list[Bundle::_nop_count];
|
||||||
Bundle::initialize_nops(_nop_list, this);
|
Bundle::initialize_nops(_nop_list);
|
||||||
|
|
||||||
return cb;
|
return cb;
|
||||||
}
|
}
|
||||||
|
@ -1410,7 +1410,7 @@ void Compile::fill_buffer(CodeBuffer* cb, uint* blk_starts) {
|
||||||
|
|
||||||
if (_matcher->is_short_branch_offset(mach->rule(), br_size, offset)) {
|
if (_matcher->is_short_branch_offset(mach->rule(), br_size, offset)) {
|
||||||
// We've got a winner. Replace this branch.
|
// We've got a winner. Replace this branch.
|
||||||
MachNode* replacement = mach->as_MachBranch()->short_branch_version(this);
|
MachNode* replacement = mach->as_MachBranch()->short_branch_version();
|
||||||
|
|
||||||
// Update the jmp_size.
|
// Update the jmp_size.
|
||||||
int new_size = replacement->size(_regalloc);
|
int new_size = replacement->size(_regalloc);
|
||||||
|
|
|
@ -1757,7 +1757,7 @@ void Parse::merge_memory_edges(MergeMemNode* n, int pnum, bool nophi) {
|
||||||
if (remerge == NULL) {
|
if (remerge == NULL) {
|
||||||
assert(base != NULL, "");
|
assert(base != NULL, "");
|
||||||
assert(base->in(0) != NULL, "should not be xformed away");
|
assert(base->in(0) != NULL, "should not be xformed away");
|
||||||
remerge = MergeMemNode::make(C, base->in(pnum));
|
remerge = MergeMemNode::make(base->in(pnum));
|
||||||
gvn().set_type(remerge, Type::MEMORY);
|
gvn().set_type(remerge, Type::MEMORY);
|
||||||
base->set_req(pnum, remerge);
|
base->set_req(pnum, remerge);
|
||||||
}
|
}
|
||||||
|
@ -2200,7 +2200,7 @@ void Parse::add_safepoint() {
|
||||||
// down below a SafePoint.
|
// down below a SafePoint.
|
||||||
|
|
||||||
// Clone the current memory state
|
// Clone the current memory state
|
||||||
Node* mem = MergeMemNode::make(C, map()->memory());
|
Node* mem = MergeMemNode::make(map()->memory());
|
||||||
|
|
||||||
mem = _gvn.transform(mem);
|
mem = _gvn.transform(mem);
|
||||||
|
|
||||||
|
@ -2214,7 +2214,7 @@ void Parse::add_safepoint() {
|
||||||
|
|
||||||
// Create a node for the polling address
|
// Create a node for the polling address
|
||||||
if( add_poll_param ) {
|
if( add_poll_param ) {
|
||||||
Node *polladr = ConPNode::make(C, (address)os::get_polling_page());
|
Node *polladr = ConPNode::make((address)os::get_polling_page());
|
||||||
sfpnt->init_req(TypeFunc::Parms+0, _gvn.transform(polladr));
|
sfpnt->init_req(TypeFunc::Parms+0, _gvn.transform(polladr));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -47,7 +47,7 @@ void GraphKit::make_dtrace_method_entry_exit(ciMethod* method, bool is_entry) {
|
||||||
|
|
||||||
// Get method
|
// Get method
|
||||||
const TypePtr* method_type = TypeMetadataPtr::make(method);
|
const TypePtr* method_type = TypeMetadataPtr::make(method);
|
||||||
Node *method_node = _gvn.transform( ConNode::make(C, method_type) );
|
Node *method_node = _gvn.transform(ConNode::make(method_type));
|
||||||
|
|
||||||
kill_dead_locals();
|
kill_dead_locals();
|
||||||
|
|
||||||
|
|
|
@ -615,7 +615,7 @@ ConNode* PhaseTransform::makecon(const Type *t) {
|
||||||
// Make an idealized constant - one of ConINode, ConPNode, etc.
|
// Make an idealized constant - one of ConINode, ConPNode, etc.
|
||||||
ConNode* PhaseValues::uncached_makecon(const Type *t) {
|
ConNode* PhaseValues::uncached_makecon(const Type *t) {
|
||||||
assert(t->singleton(), "must be a constant");
|
assert(t->singleton(), "must be a constant");
|
||||||
ConNode* x = ConNode::make(C, t);
|
ConNode* x = ConNode::make(t);
|
||||||
ConNode* k = (ConNode*)hash_find_insert(x); // Value numbering
|
ConNode* k = (ConNode*)hash_find_insert(x); // Value numbering
|
||||||
if (k == NULL) {
|
if (k == NULL) {
|
||||||
set_type(x, t); // Missed, provide type mapping
|
set_type(x, t); // Missed, provide type mapping
|
||||||
|
@ -1628,7 +1628,7 @@ Node *PhaseCCP::transform_once( Node *n ) {
|
||||||
if( t == Type::TOP ) {
|
if( t == Type::TOP ) {
|
||||||
// cache my top node on the Compile instance
|
// cache my top node on the Compile instance
|
||||||
if( C->cached_top_node() == NULL || C->cached_top_node()->in(0) == NULL ) {
|
if( C->cached_top_node() == NULL || C->cached_top_node()->in(0) == NULL ) {
|
||||||
C->set_cached_top_node( ConNode::make(C, Type::TOP) );
|
C->set_cached_top_node(ConNode::make(Type::TOP));
|
||||||
set_type(C->top(), Type::TOP);
|
set_type(C->top(), Type::TOP);
|
||||||
}
|
}
|
||||||
nn = C->top();
|
nn = C->top();
|
||||||
|
@ -1754,7 +1754,7 @@ void PhasePeephole::do_transform() {
|
||||||
MachNode *m = n->as_Mach();
|
MachNode *m = n->as_Mach();
|
||||||
int deleted_count = 0;
|
int deleted_count = 0;
|
||||||
// check for peephole opportunities
|
// check for peephole opportunities
|
||||||
MachNode *m2 = m->peephole( block, instruction_index, _regalloc, deleted_count, C );
|
MachNode *m2 = m->peephole(block, instruction_index, _regalloc, deleted_count);
|
||||||
if( m2 != NULL ) {
|
if( m2 != NULL ) {
|
||||||
#ifndef PRODUCT
|
#ifndef PRODUCT
|
||||||
if( PrintOptoPeephole ) {
|
if( PrintOptoPeephole ) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -1438,7 +1438,7 @@ void PhaseStringOpts::replace_string_concat(StringConcat* sc) {
|
||||||
}
|
}
|
||||||
// Make sure the memory state is a MergeMem for parsing.
|
// Make sure the memory state is a MergeMem for parsing.
|
||||||
if (!map->in(TypeFunc::Memory)->is_MergeMem()) {
|
if (!map->in(TypeFunc::Memory)->is_MergeMem()) {
|
||||||
map->set_req(TypeFunc::Memory, MergeMemNode::make(C, map->in(TypeFunc::Memory)));
|
map->set_req(TypeFunc::Memory, MergeMemNode::make(map->in(TypeFunc::Memory)));
|
||||||
}
|
}
|
||||||
|
|
||||||
jvms->set_map(map);
|
jvms->set_map(map);
|
||||||
|
|
|
@ -1168,7 +1168,6 @@ uint BoolNode::cmp( const Node &n ) const {
|
||||||
Node* BoolNode::make_predicate(Node* test_value, PhaseGVN* phase) {
|
Node* BoolNode::make_predicate(Node* test_value, PhaseGVN* phase) {
|
||||||
if (test_value->is_Con()) return test_value;
|
if (test_value->is_Con()) return test_value;
|
||||||
if (test_value->is_Bool()) return test_value;
|
if (test_value->is_Bool()) return test_value;
|
||||||
Compile* C = phase->C;
|
|
||||||
if (test_value->is_CMove() &&
|
if (test_value->is_CMove() &&
|
||||||
test_value->in(CMoveNode::Condition)->is_Bool()) {
|
test_value->in(CMoveNode::Condition)->is_Bool()) {
|
||||||
BoolNode* bol = test_value->in(CMoveNode::Condition)->as_Bool();
|
BoolNode* bol = test_value->in(CMoveNode::Condition)->as_Bool();
|
||||||
|
@ -1191,7 +1190,7 @@ Node* BoolNode::make_predicate(Node* test_value, PhaseGVN* phase) {
|
||||||
//--------------------------------as_int_value---------------------------------
|
//--------------------------------as_int_value---------------------------------
|
||||||
Node* BoolNode::as_int_value(PhaseGVN* phase) {
|
Node* BoolNode::as_int_value(PhaseGVN* phase) {
|
||||||
// Inverse to make_predicate. The CMove probably boils down to a Conv2B.
|
// Inverse to make_predicate. The CMove probably boils down to a Conv2B.
|
||||||
Node* cmov = CMoveNode::make(phase->C, NULL, this,
|
Node* cmov = CMoveNode::make(NULL, this,
|
||||||
phase->intcon(0), phase->intcon(1),
|
phase->intcon(0), phase->intcon(1),
|
||||||
TypeInt::BOOL);
|
TypeInt::BOOL);
|
||||||
return phase->transform(cmov);
|
return phase->transform(cmov);
|
||||||
|
@ -1199,7 +1198,6 @@ Node* BoolNode::as_int_value(PhaseGVN* phase) {
|
||||||
|
|
||||||
//----------------------------------negate-------------------------------------
|
//----------------------------------negate-------------------------------------
|
||||||
BoolNode* BoolNode::negate(PhaseGVN* phase) {
|
BoolNode* BoolNode::negate(PhaseGVN* phase) {
|
||||||
Compile* C = phase->C;
|
|
||||||
return new BoolNode(in(1), _test.negate());
|
return new BoolNode(in(1), _test.negate());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -1380,7 +1380,7 @@ void SuperWord::output() {
|
||||||
Node* mem = first->in(MemNode::Memory);
|
Node* mem = first->in(MemNode::Memory);
|
||||||
Node* adr = low_adr->in(MemNode::Address);
|
Node* adr = low_adr->in(MemNode::Address);
|
||||||
const TypePtr* atyp = n->adr_type();
|
const TypePtr* atyp = n->adr_type();
|
||||||
vn = LoadVectorNode::make(C, opc, ctl, mem, adr, atyp, vlen, velt_basic_type(n));
|
vn = LoadVectorNode::make(opc, ctl, mem, adr, atyp, vlen, velt_basic_type(n));
|
||||||
vlen_in_bytes = vn->as_LoadVector()->memory_size();
|
vlen_in_bytes = vn->as_LoadVector()->memory_size();
|
||||||
} else if (n->is_Store()) {
|
} else if (n->is_Store()) {
|
||||||
// Promote value to be stored to vector
|
// Promote value to be stored to vector
|
||||||
|
@ -1389,7 +1389,7 @@ void SuperWord::output() {
|
||||||
Node* mem = first->in(MemNode::Memory);
|
Node* mem = first->in(MemNode::Memory);
|
||||||
Node* adr = low_adr->in(MemNode::Address);
|
Node* adr = low_adr->in(MemNode::Address);
|
||||||
const TypePtr* atyp = n->adr_type();
|
const TypePtr* atyp = n->adr_type();
|
||||||
vn = StoreVectorNode::make(C, opc, ctl, mem, adr, atyp, val, vlen);
|
vn = StoreVectorNode::make(opc, ctl, mem, adr, atyp, val, vlen);
|
||||||
vlen_in_bytes = vn->as_StoreVector()->memory_size();
|
vlen_in_bytes = vn->as_StoreVector()->memory_size();
|
||||||
} else if (n->req() == 3) {
|
} else if (n->req() == 3) {
|
||||||
// Promote operands to vector
|
// Promote operands to vector
|
||||||
|
@ -1401,7 +1401,7 @@ void SuperWord::output() {
|
||||||
in1 = in2;
|
in1 = in2;
|
||||||
in2 = tmp;
|
in2 = tmp;
|
||||||
}
|
}
|
||||||
vn = VectorNode::make(C, opc, in1, in2, vlen, velt_basic_type(n));
|
vn = VectorNode::make(opc, in1, in2, vlen, velt_basic_type(n));
|
||||||
vlen_in_bytes = vn->as_Vector()->length_in_bytes();
|
vlen_in_bytes = vn->as_Vector()->length_in_bytes();
|
||||||
} else {
|
} else {
|
||||||
ShouldNotReachHere();
|
ShouldNotReachHere();
|
||||||
|
@ -1450,11 +1450,11 @@ Node* SuperWord::vector_opd(Node_List* p, int opd_idx) {
|
||||||
if (t != NULL && t->is_con()) {
|
if (t != NULL && t->is_con()) {
|
||||||
juint shift = t->get_con();
|
juint shift = t->get_con();
|
||||||
if (shift > mask) { // Unsigned cmp
|
if (shift > mask) { // Unsigned cmp
|
||||||
cnt = ConNode::make(C, TypeInt::make(shift & mask));
|
cnt = ConNode::make(TypeInt::make(shift & mask));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (t == NULL || t->_lo < 0 || t->_hi > (int)mask) {
|
if (t == NULL || t->_lo < 0 || t->_hi > (int)mask) {
|
||||||
cnt = ConNode::make(C, TypeInt::make(mask));
|
cnt = ConNode::make(TypeInt::make(mask));
|
||||||
_igvn.register_new_node_with_optimizer(cnt);
|
_igvn.register_new_node_with_optimizer(cnt);
|
||||||
cnt = new AndINode(opd, cnt);
|
cnt = new AndINode(opd, cnt);
|
||||||
_igvn.register_new_node_with_optimizer(cnt);
|
_igvn.register_new_node_with_optimizer(cnt);
|
||||||
|
@ -1462,7 +1462,7 @@ Node* SuperWord::vector_opd(Node_List* p, int opd_idx) {
|
||||||
}
|
}
|
||||||
assert(opd->bottom_type()->isa_int(), "int type only");
|
assert(opd->bottom_type()->isa_int(), "int type only");
|
||||||
// Move non constant shift count into vector register.
|
// Move non constant shift count into vector register.
|
||||||
cnt = VectorNode::shift_count(C, p0, cnt, vlen, velt_basic_type(p0));
|
cnt = VectorNode::shift_count(p0, cnt, vlen, velt_basic_type(p0));
|
||||||
}
|
}
|
||||||
if (cnt != opd) {
|
if (cnt != opd) {
|
||||||
_igvn.register_new_node_with_optimizer(cnt);
|
_igvn.register_new_node_with_optimizer(cnt);
|
||||||
|
@ -1475,7 +1475,7 @@ Node* SuperWord::vector_opd(Node_List* p, int opd_idx) {
|
||||||
// p0's vector. Use p0's type because size of operand's container in
|
// p0's vector. Use p0's type because size of operand's container in
|
||||||
// vector should match p0's size regardless operand's size.
|
// vector should match p0's size regardless operand's size.
|
||||||
const Type* p0_t = velt_type(p0);
|
const Type* p0_t = velt_type(p0);
|
||||||
VectorNode* vn = VectorNode::scalar2vector(_phase->C, opd, vlen, p0_t);
|
VectorNode* vn = VectorNode::scalar2vector(opd, vlen, p0_t);
|
||||||
|
|
||||||
_igvn.register_new_node_with_optimizer(vn);
|
_igvn.register_new_node_with_optimizer(vn);
|
||||||
_phase->set_ctrl(vn, _phase->get_ctrl(opd));
|
_phase->set_ctrl(vn, _phase->get_ctrl(opd));
|
||||||
|
@ -1490,7 +1490,7 @@ Node* SuperWord::vector_opd(Node_List* p, int opd_idx) {
|
||||||
|
|
||||||
// Insert pack operation
|
// Insert pack operation
|
||||||
BasicType bt = velt_basic_type(p0);
|
BasicType bt = velt_basic_type(p0);
|
||||||
PackNode* pk = PackNode::make(_phase->C, opd, vlen, bt);
|
PackNode* pk = PackNode::make(opd, vlen, bt);
|
||||||
DEBUG_ONLY( const BasicType opd_bt = opd->bottom_type()->basic_type(); )
|
DEBUG_ONLY( const BasicType opd_bt = opd->bottom_type()->basic_type(); )
|
||||||
|
|
||||||
for (uint i = 1; i < vlen; i++) {
|
for (uint i = 1; i < vlen; i++) {
|
||||||
|
@ -1546,7 +1546,7 @@ void SuperWord::insert_extracts(Node_List* p) {
|
||||||
_igvn.hash_delete(def);
|
_igvn.hash_delete(def);
|
||||||
int def_pos = alignment(def) / data_size(def);
|
int def_pos = alignment(def) / data_size(def);
|
||||||
|
|
||||||
Node* ex = ExtractNode::make(_phase->C, def, def_pos, velt_basic_type(def));
|
Node* ex = ExtractNode::make(def, def_pos, velt_basic_type(def));
|
||||||
_igvn.register_new_node_with_optimizer(ex);
|
_igvn.register_new_node_with_optimizer(ex);
|
||||||
_phase->set_ctrl(ex, _phase->get_ctrl(def));
|
_phase->set_ctrl(ex, _phase->get_ctrl(def));
|
||||||
_igvn.replace_input_of(use, idx, ex);
|
_igvn.replace_input_of(use, idx, ex);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -245,7 +245,7 @@ void VectorNode::vector_operands(Node* n, uint* start, uint* end) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return the vector version of a scalar operation node.
|
// Return the vector version of a scalar operation node.
|
||||||
VectorNode* VectorNode::make(Compile* C, int opc, Node* n1, Node* n2, uint vlen, BasicType bt) {
|
VectorNode* VectorNode::make(int opc, Node* n1, Node* n2, uint vlen, BasicType bt) {
|
||||||
const TypeVect* vt = TypeVect::make(bt, vlen);
|
const TypeVect* vt = TypeVect::make(bt, vlen);
|
||||||
int vopc = VectorNode::opcode(opc, bt);
|
int vopc = VectorNode::opcode(opc, bt);
|
||||||
// This method should not be called for unimplemented vectors.
|
// This method should not be called for unimplemented vectors.
|
||||||
|
@ -299,7 +299,7 @@ VectorNode* VectorNode::make(Compile* C, int opc, Node* n1, Node* n2, uint vlen,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Scalar promotion
|
// Scalar promotion
|
||||||
VectorNode* VectorNode::scalar2vector(Compile* C, Node* s, uint vlen, const Type* opd_t) {
|
VectorNode* VectorNode::scalar2vector(Node* s, uint vlen, const Type* opd_t) {
|
||||||
BasicType bt = opd_t->array_element_basic_type();
|
BasicType bt = opd_t->array_element_basic_type();
|
||||||
const TypeVect* vt = opd_t->singleton() ? TypeVect::make(opd_t, vlen)
|
const TypeVect* vt = opd_t->singleton() ? TypeVect::make(opd_t, vlen)
|
||||||
: TypeVect::make(bt, vlen);
|
: TypeVect::make(bt, vlen);
|
||||||
|
@ -323,7 +323,7 @@ VectorNode* VectorNode::scalar2vector(Compile* C, Node* s, uint vlen, const Type
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
VectorNode* VectorNode::shift_count(Compile* C, Node* shift, Node* cnt, uint vlen, BasicType bt) {
|
VectorNode* VectorNode::shift_count(Node* shift, Node* cnt, uint vlen, BasicType bt) {
|
||||||
assert(VectorNode::is_shift(shift) && !cnt->is_Con(), "only variable shift count");
|
assert(VectorNode::is_shift(shift) && !cnt->is_Con(), "only variable shift count");
|
||||||
// Match shift count type with shift vector type.
|
// Match shift count type with shift vector type.
|
||||||
const TypeVect* vt = TypeVect::make(bt, vlen);
|
const TypeVect* vt = TypeVect::make(bt, vlen);
|
||||||
|
@ -342,7 +342,7 @@ VectorNode* VectorNode::shift_count(Compile* C, Node* shift, Node* cnt, uint vle
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return initial Pack node. Additional operands added with add_opd() calls.
|
// Return initial Pack node. Additional operands added with add_opd() calls.
|
||||||
PackNode* PackNode::make(Compile* C, Node* s, uint vlen, BasicType bt) {
|
PackNode* PackNode::make(Node* s, uint vlen, BasicType bt) {
|
||||||
const TypeVect* vt = TypeVect::make(bt, vlen);
|
const TypeVect* vt = TypeVect::make(bt, vlen);
|
||||||
switch (bt) {
|
switch (bt) {
|
||||||
case T_BOOLEAN:
|
case T_BOOLEAN:
|
||||||
|
@ -365,18 +365,18 @@ PackNode* PackNode::make(Compile* C, Node* s, uint vlen, BasicType bt) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create a binary tree form for Packs. [lo, hi) (half-open) range
|
// Create a binary tree form for Packs. [lo, hi) (half-open) range
|
||||||
PackNode* PackNode::binary_tree_pack(Compile* C, int lo, int hi) {
|
PackNode* PackNode::binary_tree_pack(int lo, int hi) {
|
||||||
int ct = hi - lo;
|
int ct = hi - lo;
|
||||||
assert(is_power_of_2(ct), "power of 2");
|
assert(is_power_of_2(ct), "power of 2");
|
||||||
if (ct == 2) {
|
if (ct == 2) {
|
||||||
PackNode* pk = PackNode::make(C, in(lo), 2, vect_type()->element_basic_type());
|
PackNode* pk = PackNode::make(in(lo), 2, vect_type()->element_basic_type());
|
||||||
pk->add_opd(in(lo+1));
|
pk->add_opd(in(lo+1));
|
||||||
return pk;
|
return pk;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
int mid = lo + ct/2;
|
int mid = lo + ct/2;
|
||||||
PackNode* n1 = binary_tree_pack(C, lo, mid);
|
PackNode* n1 = binary_tree_pack(lo, mid);
|
||||||
PackNode* n2 = binary_tree_pack(C, mid, hi );
|
PackNode* n2 = binary_tree_pack(mid, hi );
|
||||||
|
|
||||||
BasicType bt = n1->vect_type()->element_basic_type();
|
BasicType bt = n1->vect_type()->element_basic_type();
|
||||||
assert(bt == n2->vect_type()->element_basic_type(), "should be the same");
|
assert(bt == n2->vect_type()->element_basic_type(), "should be the same");
|
||||||
|
@ -402,23 +402,23 @@ PackNode* PackNode::binary_tree_pack(Compile* C, int lo, int hi) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return the vector version of a scalar load node.
|
// Return the vector version of a scalar load node.
|
||||||
LoadVectorNode* LoadVectorNode::make(Compile* C, int opc, Node* ctl, Node* mem,
|
LoadVectorNode* LoadVectorNode::make(int opc, Node* ctl, Node* mem,
|
||||||
Node* adr, const TypePtr* atyp, uint vlen, BasicType bt) {
|
Node* adr, const TypePtr* atyp, uint vlen, BasicType bt) {
|
||||||
const TypeVect* vt = TypeVect::make(bt, vlen);
|
const TypeVect* vt = TypeVect::make(bt, vlen);
|
||||||
return new LoadVectorNode(ctl, mem, adr, atyp, vt);
|
return new LoadVectorNode(ctl, mem, adr, atyp, vt);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return the vector version of a scalar store node.
|
// Return the vector version of a scalar store node.
|
||||||
StoreVectorNode* StoreVectorNode::make(Compile* C, int opc, Node* ctl, Node* mem,
|
StoreVectorNode* StoreVectorNode::make(int opc, Node* ctl, Node* mem,
|
||||||
Node* adr, const TypePtr* atyp, Node* val,
|
Node* adr, const TypePtr* atyp, Node* val,
|
||||||
uint vlen) {
|
uint vlen) {
|
||||||
return new StoreVectorNode(ctl, mem, adr, atyp, val);
|
return new StoreVectorNode(ctl, mem, adr, atyp, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Extract a scalar element of vector.
|
// Extract a scalar element of vector.
|
||||||
Node* ExtractNode::make(Compile* C, Node* v, uint position, BasicType bt) {
|
Node* ExtractNode::make(Node* v, uint position, BasicType bt) {
|
||||||
assert((int)position < Matcher::max_vector_size(bt), "pos in range");
|
assert((int)position < Matcher::max_vector_size(bt), "pos in range");
|
||||||
ConINode* pos = ConINode::make(C, (int)position);
|
ConINode* pos = ConINode::make((int)position);
|
||||||
switch (bt) {
|
switch (bt) {
|
||||||
case T_BOOLEAN:
|
case T_BOOLEAN:
|
||||||
return new ExtractUBNode(v, pos);
|
return new ExtractUBNode(v, pos);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2007, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -52,9 +52,9 @@ class VectorNode : public TypeNode {
|
||||||
|
|
||||||
virtual uint ideal_reg() const { return Matcher::vector_ideal_reg(vect_type()->length_in_bytes()); }
|
virtual uint ideal_reg() const { return Matcher::vector_ideal_reg(vect_type()->length_in_bytes()); }
|
||||||
|
|
||||||
static VectorNode* scalar2vector(Compile* C, Node* s, uint vlen, const Type* opd_t);
|
static VectorNode* scalar2vector(Node* s, uint vlen, const Type* opd_t);
|
||||||
static VectorNode* shift_count(Compile* C, Node* shift, Node* cnt, uint vlen, BasicType bt);
|
static VectorNode* shift_count(Node* shift, Node* cnt, uint vlen, BasicType bt);
|
||||||
static VectorNode* make(Compile* C, int opc, Node* n1, Node* n2, uint vlen, BasicType bt);
|
static VectorNode* make(int opc, Node* n1, Node* n2, uint vlen, BasicType bt);
|
||||||
|
|
||||||
static int opcode(int opc, BasicType bt);
|
static int opcode(int opc, BasicType bt);
|
||||||
static bool implemented(int opc, uint vlen, BasicType bt);
|
static bool implemented(int opc, uint vlen, BasicType bt);
|
||||||
|
@ -371,7 +371,7 @@ class LoadVectorNode : public LoadNode {
|
||||||
|
|
||||||
virtual int store_Opcode() const { return Op_StoreVector; }
|
virtual int store_Opcode() const { return Op_StoreVector; }
|
||||||
|
|
||||||
static LoadVectorNode* make(Compile* C, int opc, Node* ctl, Node* mem,
|
static LoadVectorNode* make(int opc, Node* ctl, Node* mem,
|
||||||
Node* adr, const TypePtr* atyp, uint vlen, BasicType bt);
|
Node* adr, const TypePtr* atyp, uint vlen, BasicType bt);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -394,7 +394,7 @@ class StoreVectorNode : public StoreNode {
|
||||||
virtual BasicType memory_type() const { return T_VOID; }
|
virtual BasicType memory_type() const { return T_VOID; }
|
||||||
virtual int memory_size() const { return vect_type()->length_in_bytes(); }
|
virtual int memory_size() const { return vect_type()->length_in_bytes(); }
|
||||||
|
|
||||||
static StoreVectorNode* make(Compile* C, int opc, Node* ctl, Node* mem,
|
static StoreVectorNode* make(int opc, Node* ctl, Node* mem,
|
||||||
Node* adr, const TypePtr* atyp, Node* val,
|
Node* adr, const TypePtr* atyp, Node* val,
|
||||||
uint vlen);
|
uint vlen);
|
||||||
};
|
};
|
||||||
|
@ -465,9 +465,9 @@ class PackNode : public VectorNode {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create a binary tree form for Packs. [lo, hi) (half-open) range
|
// Create a binary tree form for Packs. [lo, hi) (half-open) range
|
||||||
PackNode* binary_tree_pack(Compile* C, int lo, int hi);
|
PackNode* binary_tree_pack(int lo, int hi);
|
||||||
|
|
||||||
static PackNode* make(Compile* C, Node* s, uint vlen, BasicType bt);
|
static PackNode* make(Node* s, uint vlen, BasicType bt);
|
||||||
};
|
};
|
||||||
|
|
||||||
//------------------------------PackBNode--------------------------------------
|
//------------------------------PackBNode--------------------------------------
|
||||||
|
@ -552,7 +552,7 @@ class ExtractNode : public Node {
|
||||||
virtual int Opcode() const;
|
virtual int Opcode() const;
|
||||||
uint pos() const { return in(2)->get_int(); }
|
uint pos() const { return in(2)->get_int(); }
|
||||||
|
|
||||||
static Node* make(Compile* C, Node* v, uint position, BasicType bt);
|
static Node* make(Node* v, uint position, BasicType bt);
|
||||||
};
|
};
|
||||||
|
|
||||||
//------------------------------ExtractBNode-----------------------------------
|
//------------------------------ExtractBNode-----------------------------------
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue