comparison src/share/vm/adlc/formssel.cpp @ 3842:c7b60b601eb4

7069452: Cleanup NodeFlags Summary: Remove flags which duplicate information in Node::NodeClasses. Reviewed-by: never
author kvn
date Wed, 27 Jul 2011 17:28:36 -0700
parents 3d42f82cd811
children f1c12354c3f7
comparison
equal deleted inserted replaced
3841:0f34fdee809e 3842:c7b60b601eb4
289 289
290 return 0; 290 return 0;
291 } 291 }
292 292
293 293
294 // Return 'true' if this instruction matches an ideal 'Copy*' node
295 bool InstructForm::is_ideal_unlock() const {
296 return _matrule ? _matrule->is_ideal_unlock() : false;
297 }
298
299 bool InstructForm::is_ideal_call_leaf() const {
300 return _matrule ? _matrule->is_ideal_call_leaf() : false;
301 }
302
303 // Return 'true' if this instruction matches an ideal 'If' node 294 // Return 'true' if this instruction matches an ideal 'If' node
304 bool InstructForm::is_ideal_if() const { 295 bool InstructForm::is_ideal_if() const {
305 if( _matrule == NULL ) return false; 296 if( _matrule == NULL ) return false;
306 297
307 return _matrule->is_ideal_if(); 298 return _matrule->is_ideal_if();
1091 else if (is_ideal_safepoint()) { 1082 else if (is_ideal_safepoint()) {
1092 return "MachSafePointNode"; 1083 return "MachSafePointNode";
1093 } 1084 }
1094 else if (is_ideal_if()) { 1085 else if (is_ideal_if()) {
1095 return "MachIfNode"; 1086 return "MachIfNode";
1087 }
1088 else if (is_ideal_goto()) {
1089 return "MachGotoNode";
1096 } 1090 }
1097 else if (is_ideal_fastlock()) { 1091 else if (is_ideal_fastlock()) {
1098 return "MachFastLockNode"; 1092 return "MachFastLockNode";
1099 } 1093 }
1100 else if (is_ideal_nop()) { 1094 else if (is_ideal_nop()) {
2704 //==============================Shared Forms=================================== 2698 //==============================Shared Forms===================================
2705 //------------------------------AttributeForm---------------------------------- 2699 //------------------------------AttributeForm----------------------------------
2706 int AttributeForm::_insId = 0; // start counter at 0 2700 int AttributeForm::_insId = 0; // start counter at 0
2707 int AttributeForm::_opId = 0; // start counter at 0 2701 int AttributeForm::_opId = 0; // start counter at 0
2708 const char* AttributeForm::_ins_cost = "ins_cost"; // required name 2702 const char* AttributeForm::_ins_cost = "ins_cost"; // required name
2709 const char* AttributeForm::_ins_pc_relative = "ins_pc_relative";
2710 const char* AttributeForm::_op_cost = "op_cost"; // required name 2703 const char* AttributeForm::_op_cost = "op_cost"; // required name
2711 2704
2712 AttributeForm::AttributeForm(char *attr, int type, char *attrdef) 2705 AttributeForm::AttributeForm(char *attr, int type, char *attrdef)
2713 : Form(Form::ATTR), _attrname(attr), _atype(type), _attrdef(attrdef) { 2706 : Form(Form::ATTR), _attrname(attr), _atype(type), _attrdef(attrdef) {
2714 if (type==OP_ATTR) { 2707 if (type==OP_ATTR) {
3927 return 1; 3920 return 1;
3928 } 3921 }
3929 return 0; 3922 return 0;
3930 } 3923 }
3931 3924
3932 bool MatchRule::is_ideal_unlock() const {
3933 if( !_opType ) return false;
3934 return !strcmp(_opType,"Unlock") || !strcmp(_opType,"FastUnlock");
3935 }
3936
3937
3938 bool MatchRule::is_ideal_call_leaf() const {
3939 if( !_opType ) return false;
3940 return !strcmp(_opType,"CallLeaf") ||
3941 !strcmp(_opType,"CallLeafNoFP");
3942 }
3943
3944
3945 bool MatchRule::is_ideal_if() const { 3925 bool MatchRule::is_ideal_if() const {
3946 if( !_opType ) return false; 3926 if( !_opType ) return false;
3947 return 3927 return
3948 !strcmp(_opType,"If" ) || 3928 !strcmp(_opType,"If" ) ||
3949 !strcmp(_opType,"CountedLoopEnd"); 3929 !strcmp(_opType,"CountedLoopEnd");