src/share/vm/adlc/formssel.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 7079317 Sdiff src/share/vm/adlc

src/share/vm/adlc/formssel.cpp

Print this page




 323 bool InstructForm::is_ideal_box() const {
 324   if( _matrule == NULL ) return false;
 325 
 326   return _matrule->is_ideal_box();
 327 }
 328 
 329 // Return 'true' if this instruction matches an ideal 'Goto' node
 330 bool InstructForm::is_ideal_goto() const {
 331   if( _matrule == NULL ) return false;
 332 
 333   return _matrule->is_ideal_goto();
 334 }
 335 
 336 // Return 'true' if this instruction matches an ideal 'Jump' node
 337 bool InstructForm::is_ideal_jump() const {
 338   if( _matrule == NULL ) return false;
 339 
 340   return _matrule->is_ideal_jump();
 341 }
 342 
 343 // Return 'true' if instruction matches ideal 'If' | 'Goto' |
 344 //                    'CountedLoopEnd' | 'Jump'
 345 bool InstructForm::is_ideal_branch() const {
 346   if( _matrule == NULL ) return false;
 347 
 348   return _matrule->is_ideal_if() || _matrule->is_ideal_goto() || _matrule->is_ideal_jump();
 349 }
 350 
 351 
 352 // Return 'true' if this instruction matches an ideal 'Return' node
 353 bool InstructForm::is_ideal_return() const {
 354   if( _matrule == NULL ) return false;
 355 
 356   // Check MatchRule to see if the first entry is the ideal "Return" node
 357   int  index   = 0;
 358   if (_matrule->find_type("Return",index)) return true;
 359   if (_matrule->find_type("Rethrow",index)) return true;
 360   if (_matrule->find_type("TailCall",index)) return true;
 361   if (_matrule->find_type("TailJump",index)) return true;
 362 
 363   return false;
 364 }
 365 
 366 // Return 'true' if this instruction matches an ideal 'Halt' node
 367 bool InstructForm::is_ideal_halt() const {
 368   int  index   = 0;
 369   return _matrule && _matrule->find_type("Halt",index);
 370 }
 371 
 372 // Return 'true' if this instruction matches an ideal 'SafePoint' node
 373 bool InstructForm::is_ideal_safepoint() const {
 374   int  index   = 0;
 375   return _matrule && _matrule->find_type("SafePoint",index);
 376 }
 377 
 378 // Return 'true' if this instruction matches an ideal 'Nop' node
 379 bool InstructForm::is_ideal_nop() const {
 380   return _ident && _ident[0] == 'N' && _ident[1] == 'o' && _ident[2] == 'p' && _ident[3] == '_';
 381 }
 382 
 383 bool InstructForm::is_ideal_control() const {
 384   if ( ! _matrule)  return false;
 385 
 386   return is_ideal_return() || is_ideal_branch() || is_ideal_halt();
 387 }
 388 
 389 // Return 'true' if this instruction matches an ideal 'Call' node
 390 Form::CallType InstructForm::is_ideal_call() const {
 391   if( _matrule == NULL ) return Form::invalid_type;
 392 
 393   // Check MatchRule to see if the first entry is the ideal "Call" node
 394   int  idx   = 0;
 395   if(_matrule->find_type("CallStaticJava",idx))   return Form::JAVA_STATIC;
 396   idx = 0;
 397   if(_matrule->find_type("Lock",idx))             return Form::JAVA_STATIC;
 398   idx = 0;
 399   if(_matrule->find_type("Unlock",idx))           return Form::JAVA_STATIC;
 400   idx = 0;
 401   if(_matrule->find_type("CallDynamicJava",idx))  return Form::JAVA_DYNAMIC;
 402   idx = 0;
 403   if(_matrule->find_type("CallRuntime",idx))      return Form::JAVA_RUNTIME;
 404   idx = 0;
 405   if(_matrule->find_type("CallLeaf",idx))         return Form::JAVA_LEAF;
 406   idx = 0;




 323 bool InstructForm::is_ideal_box() const {
 324   if( _matrule == NULL ) return false;
 325 
 326   return _matrule->is_ideal_box();
 327 }
 328 
 329 // Return 'true' if this instruction matches an ideal 'Goto' node
 330 bool InstructForm::is_ideal_goto() const {
 331   if( _matrule == NULL ) return false;
 332 
 333   return _matrule->is_ideal_goto();
 334 }
 335 
 336 // Return 'true' if this instruction matches an ideal 'Jump' node
 337 bool InstructForm::is_ideal_jump() const {
 338   if( _matrule == NULL ) return false;
 339 
 340   return _matrule->is_ideal_jump();
 341 }
 342 
 343 // Return 'true' if instruction matches ideal 'If' | 'Goto' | 'CountedLoopEnd'

 344 bool InstructForm::is_ideal_branch() const {
 345   if( _matrule == NULL ) return false;
 346 
 347   return _matrule->is_ideal_if() || _matrule->is_ideal_goto();
 348 }
 349 
 350 
 351 // Return 'true' if this instruction matches an ideal 'Return' node
 352 bool InstructForm::is_ideal_return() const {
 353   if( _matrule == NULL ) return false;
 354 
 355   // Check MatchRule to see if the first entry is the ideal "Return" node
 356   int  index   = 0;
 357   if (_matrule->find_type("Return",index)) return true;
 358   if (_matrule->find_type("Rethrow",index)) return true;
 359   if (_matrule->find_type("TailCall",index)) return true;
 360   if (_matrule->find_type("TailJump",index)) return true;
 361 
 362   return false;
 363 }
 364 
 365 // Return 'true' if this instruction matches an ideal 'Halt' node
 366 bool InstructForm::is_ideal_halt() const {
 367   int  index   = 0;
 368   return _matrule && _matrule->find_type("Halt",index);
 369 }
 370 
 371 // Return 'true' if this instruction matches an ideal 'SafePoint' node
 372 bool InstructForm::is_ideal_safepoint() const {
 373   int  index   = 0;
 374   return _matrule && _matrule->find_type("SafePoint",index);
 375 }
 376 
 377 // Return 'true' if this instruction matches an ideal 'Nop' node
 378 bool InstructForm::is_ideal_nop() const {
 379   return _ident && _ident[0] == 'N' && _ident[1] == 'o' && _ident[2] == 'p' && _ident[3] == '_';
 380 }
 381 
 382 bool InstructForm::is_ideal_control() const {
 383   if ( ! _matrule)  return false;
 384 
 385   return is_ideal_return() || is_ideal_branch() || _matrule->is_ideal_jump() || is_ideal_halt();
 386 }
 387 
 388 // Return 'true' if this instruction matches an ideal 'Call' node
 389 Form::CallType InstructForm::is_ideal_call() const {
 390   if( _matrule == NULL ) return Form::invalid_type;
 391 
 392   // Check MatchRule to see if the first entry is the ideal "Call" node
 393   int  idx   = 0;
 394   if(_matrule->find_type("CallStaticJava",idx))   return Form::JAVA_STATIC;
 395   idx = 0;
 396   if(_matrule->find_type("Lock",idx))             return Form::JAVA_STATIC;
 397   idx = 0;
 398   if(_matrule->find_type("Unlock",idx))           return Form::JAVA_STATIC;
 399   idx = 0;
 400   if(_matrule->find_type("CallDynamicJava",idx))  return Form::JAVA_DYNAMIC;
 401   idx = 0;
 402   if(_matrule->find_type("CallRuntime",idx))      return Form::JAVA_RUNTIME;
 403   idx = 0;
 404   if(_matrule->find_type("CallLeaf",idx))         return Form::JAVA_LEAF;
 405   idx = 0;


src/share/vm/adlc/formssel.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File