Cost based inlining for Bedrock.