Add garlic cloves to food processor and pulse until well minced. Add the pine nuts, basil leaves, and olive oil and blend until smooth, scraping down the sides of the bowl as needed. If needed, add more olive oil. Stir in the grated cheese and season to taste with salt and pepper.