private boolean minimizeCost ( FunctionState functionState ) { if ( ! inliningLowersCost ( functionState ) ) { // Try again without Block inlining references if ( functionState . hasBlockInliningReferences ( ) ) { functionState . setRemove ( false ) ; functionState . removeBlockInliningReferences ( ) ; if ( ! functionState . hasReferences ( ) || ! inliningLowersCost ( functionState ) ) { return false ; } } else { return false ; } } return true ; }
Determines if the function is worth inlining and potentially trims references that increase the cost .