Preheat the oven to 350 degrees F. To roast the garlic, slice off the top portion of the garlic head to reveal the cloves. Lightly rub back and forth to remove the paper and peel any excess paper off. Pour a bit of olive oil over each bulb. Wrap the bulbs tightly in foil and place in the oven. Roast for 45 to 60 minutes, until the cloves are caramely and golden. Let cool slightly.
Squeeze the cloves out into a bowl and add the salt. Mash the cloves and salt with a fork. Add in the butter and mash and stir together for a few minutes until the garlic is evenly distributed. Place the butter in a piece of plastic wrap (you can sort of shape it here too) and put it in the fridge to firm up. You can absolutely do this all ahead of time!
With the oven still on, add the tomatoes to a baking sheet. Season with the olive oil, salt and pepper and toss well. Roast for 20 to 25 minutes, until they are just bursting. At this time, bring the pasta water to a boil and prepare according to the package directions.
Once the pasta is finished cooking, drain it and toss with 1 to 2 tablespoons of the roasted garlic butter (or more!). Toss with the freshly grated cheese, pepper flakes and the tomatoes. Toss with the basil leaves. Serve immediately.