338 if( _matrule == NULL ) return false; |
338 if( _matrule == NULL ) return false; |
339 |
339 |
340 return _matrule->is_ideal_jump(); |
340 return _matrule->is_ideal_jump(); |
341 } |
341 } |
342 |
342 |
343 // Return 'true' if instruction matches ideal 'If' | 'Goto' | |
343 // Return 'true' if instruction matches ideal 'If' | 'Goto' | 'CountedLoopEnd' |
344 // 'CountedLoopEnd' | 'Jump' |
|
345 bool InstructForm::is_ideal_branch() const { |
344 bool InstructForm::is_ideal_branch() const { |
346 if( _matrule == NULL ) return false; |
345 if( _matrule == NULL ) return false; |
347 |
346 |
348 return _matrule->is_ideal_if() || _matrule->is_ideal_goto() || _matrule->is_ideal_jump(); |
347 return _matrule->is_ideal_if() || _matrule->is_ideal_goto(); |
349 } |
348 } |
350 |
349 |
351 |
350 |
352 // Return 'true' if this instruction matches an ideal 'Return' node |
351 // Return 'true' if this instruction matches an ideal 'Return' node |
353 bool InstructForm::is_ideal_return() const { |
352 bool InstructForm::is_ideal_return() const { |
381 } |
380 } |
382 |
381 |
383 bool InstructForm::is_ideal_control() const { |
382 bool InstructForm::is_ideal_control() const { |
384 if ( ! _matrule) return false; |
383 if ( ! _matrule) return false; |
385 |
384 |
386 return is_ideal_return() || is_ideal_branch() || is_ideal_halt(); |
385 return is_ideal_return() || is_ideal_branch() || _matrule->is_ideal_jump() || is_ideal_halt(); |
387 } |
386 } |
388 |
387 |
389 // Return 'true' if this instruction matches an ideal 'Call' node |
388 // Return 'true' if this instruction matches an ideal 'Call' node |
390 Form::CallType InstructForm::is_ideal_call() const { |
389 Form::CallType InstructForm::is_ideal_call() const { |
391 if( _matrule == NULL ) return Form::invalid_type; |
390 if( _matrule == NULL ) return Form::invalid_type; |