< prev index next >

src/share/vm/adlc/archDesc.cpp

Print this page

        

*** 148,158 **** _chainRules(cmpstr,hashstr, Form::arena), _cisc_spill_operand(NULL), _needs_clone_jvms(false) { // Initialize the opcode to MatchList table with NULLs ! for( int i=0; i<_last_opcode; ++i ) { _mlistab[i] = NULL; } // Set-up the global tables initKeywords(_globalNames); // Initialize the Name Table with keywords --- 148,158 ---- _chainRules(cmpstr,hashstr, Form::arena), _cisc_spill_operand(NULL), _needs_clone_jvms(false) { // Initialize the opcode to MatchList table with NULLs ! for(uint i = 0; i < static_cast<uint>(Opcodes::_last_opcode); ++i ) { _mlistab[i] = NULL; } // Set-up the global tables initKeywords(_globalNames); // Initialize the Name Table with keywords
*** 172,182 **** _internalOpCounter = 0; _cisc_spill_debug = false; _short_branch_debug = false; // Initialize match rule flags ! for (int i = 0; i < _last_opcode; i++) { _has_match_rule[i] = false; } // Error/Warning Counts _syntax_errs = 0; --- 172,182 ---- _internalOpCounter = 0; _cisc_spill_debug = false; _short_branch_debug = false; // Initialize match rule flags ! for (uint i = 0; i < static_cast<uint>(Opcodes::_last_opcode); i++) { _has_match_rule[i] = false; } // Error/Warning Counts _syntax_errs = 0;
*** 471,494 **** if ( mrule->is_chain_rule(_globalNames) ) { return; } // Identify index position among ideal operands ! intptr_t index = _last_opcode; const char *indexStr = getMatchListIndex(*mrule); index = (intptr_t)_idealIndex[indexStr]; if (index == 0) { fprintf(stderr, "Ideal node missing: %s\n", indexStr); assert(index != 0, "Failed lookup of ideal node\n"); } // Check that this will be placed appropriately in the DFA ! if (index >= _last_opcode) { fprintf(stderr, "Invalid match rule %s <-- ( %s )\n", resultStr ? resultStr : " ", rootOp ? rootOp : " "); ! assert(index < _last_opcode, "Matching item not in ideal graph\n"); return; } // Walk the MatchRule, generating MatchList entries for each level --- 471,495 ---- if ( mrule->is_chain_rule(_globalNames) ) { return; } // Identify index position among ideal operands ! intptr_t index = static_cast<intptr_t>(Opcodes::_last_opcode); const char *indexStr = getMatchListIndex(*mrule); index = (intptr_t)_idealIndex[indexStr]; if (index == 0) { fprintf(stderr, "Ideal node missing: %s\n", indexStr); assert(index != 0, "Failed lookup of ideal node\n"); } // Check that this will be placed appropriately in the DFA ! if (index >= static_cast<intptr_t>(Opcodes::_last_opcode)) { fprintf(stderr, "Invalid match rule %s <-- ( %s )\n", resultStr ? resultStr : " ", rootOp ? rootOp : " "); ! assert(index < static_cast<intptr_t>(Opcodes::_last_opcode), ! "Matching item not in ideal graph\n"); return; } // Walk the MatchRule, generating MatchList entries for each level
*** 541,551 **** (!form->ideal_only())) { return; } // Identify index position among ideal operands ! intptr_t index = _last_opcode; const char *indexStr = node ? node->_opType : (char *) " "; index = (intptr_t)_idealIndex[indexStr]; if (index == 0) { fprintf(stderr, "error: operand \"%s\" not found\n", indexStr); assert(0, "fatal error"); --- 542,552 ---- (!form->ideal_only())) { return; } // Identify index position among ideal operands ! intptr_t index = static_cast<intptr_t>(Opcodes::_last_opcode); const char *indexStr = node ? node->_opType : (char *) " "; index = (intptr_t)_idealIndex[indexStr]; if (index == 0) { fprintf(stderr, "error: operand \"%s\" not found\n", indexStr); assert(0, "fatal error");
*** 967,982 **** // Import predefined base types: Set = 1, RegI, RegP, ... void ArchDesc::initBaseOpTypes() { // Create OperandForm and assign type for each opcode. ! for (int i = 1; i < _last_machine_leaf; ++i) { char *ident = (char *)NodeClassNames[i]; constructOperand(ident, true); } // Create InstructForm and assign type for each ideal instruction. ! for (int j = _last_machine_leaf+1; j < _last_opcode; ++j) { char *ident = (char *)NodeClassNames[j]; if (!strcmp(ident, "ConI") || !strcmp(ident, "ConP") || !strcmp(ident, "ConN") || !strcmp(ident, "ConNKlass") || !strcmp(ident, "ConF") || !strcmp(ident, "ConD") || !strcmp(ident, "ConL") || !strcmp(ident, "Con" ) || --- 968,984 ---- // Import predefined base types: Set = 1, RegI, RegP, ... void ArchDesc::initBaseOpTypes() { // Create OperandForm and assign type for each opcode. ! for (uint i = 1; i < static_cast<uint>(Opcodes::_last_machine_leaf); ++i) { char *ident = (char *)NodeClassNames[i]; constructOperand(ident, true); } // Create InstructForm and assign type for each ideal instruction. ! for (uint j = static_cast<uint>(Opcodes::_last_machine_leaf) + 1; ! j < static_cast<uint>(Opcodes::_last_opcode); ++j) { char *ident = (char *)NodeClassNames[j]; if (!strcmp(ident, "ConI") || !strcmp(ident, "ConP") || !strcmp(ident, "ConN") || !strcmp(ident, "ConNKlass") || !strcmp(ident, "ConF") || !strcmp(ident, "ConD") || !strcmp(ident, "ConL") || !strcmp(ident, "Con" ) ||
*** 1046,1062 **** _globalNames.Insert(ident, eForm); } // // Build mapping from ideal names to ideal indices ! int idealIndex = 0; ! for (idealIndex = 1; idealIndex < _last_machine_leaf; ++idealIndex) { const char *idealName = NodeClassNames[idealIndex]; _idealIndex.Insert((void*) idealName, (void*) (intptr_t) idealIndex); } ! for (idealIndex = _last_machine_leaf+1; ! idealIndex < _last_opcode; ++idealIndex) { const char *idealName = NodeClassNames[idealIndex]; _idealIndex.Insert((void*) idealName, (void*) (intptr_t) idealIndex); } } --- 1048,1066 ---- _globalNames.Insert(ident, eForm); } // // Build mapping from ideal names to ideal indices ! uint idealIndex = 0; ! for (idealIndex = 1; ! idealIndex < static_cast<uint>(Opcodes::_last_machine_leaf); ! ++idealIndex) { const char *idealName = NodeClassNames[idealIndex]; _idealIndex.Insert((void*) idealName, (void*) (intptr_t) idealIndex); } ! for (idealIndex = static_cast<uint>(Opcodes::_last_machine_leaf) + 1; ! idealIndex < static_cast<uint>(Opcodes::_last_opcode); ++idealIndex) { const char *idealName = NodeClassNames[idealIndex]; _idealIndex.Insert((void*) idealName, (void*) (intptr_t) idealIndex); } }
*** 1153,1163 **** // Build mapping from ideal names to ideal indices fprintf(fp_cpp, "\n"); fprintf(fp_cpp, "// Mapping from machine-independent opcode to boolean\n"); fprintf(fp_cpp, "const char must_clone[] = {\n"); ! for (int idealIndex = 0; idealIndex < _last_opcode; ++idealIndex) { int must_clone = 0; const char *idealName = NodeClassNames[idealIndex]; // Previously selected constants for cloning // !!!!! // These are the current machine-dependent clones --- 1157,1168 ---- // Build mapping from ideal names to ideal indices fprintf(fp_cpp, "\n"); fprintf(fp_cpp, "// Mapping from machine-independent opcode to boolean\n"); fprintf(fp_cpp, "const char must_clone[] = {\n"); ! for (uint idealIndex = 0; ! idealIndex < static_cast<uint>(Opcodes::_last_opcode); ++idealIndex) { int must_clone = 0; const char *idealName = NodeClassNames[idealIndex]; // Previously selected constants for cloning // !!!!! // These are the current machine-dependent clones
*** 1183,1193 **** // instruction. The must_clone flag prevents the constant from // floating up out of loops. must_clone = 1; } fprintf(fp_cpp, " %d%s // %s: %d\n", must_clone, ! (idealIndex != (_last_opcode - 1)) ? "," : " // no trailing comma", idealName, idealIndex); } // Finish defining table fprintf(fp_cpp, "};\n"); } --- 1188,1198 ---- // instruction. The must_clone flag prevents the constant from // floating up out of loops. must_clone = 1; } fprintf(fp_cpp, " %d%s // %s: %d\n", must_clone, ! (idealIndex != (static_cast<uint>(Opcodes::_last_opcode) - 1)) ? "," : " // no trailing comma", idealName, idealIndex); } // Finish defining table fprintf(fp_cpp, "};\n"); }
< prev index next >