Roasted garlic is a beautiful thing, and roasting it for a while in the oven will probably yield the best results. You can get a similar level of tastiness in a shorter amount of time, however, with the help of a pressure cooker. Photo by Brad Greenlee.
The Kitchn suggests:
While oven-roasted garlic needs about an hour of cook time, you can get the same tasty result in about 15 minutes from start to finish with the help of your pressure cooker, followed by a few minutes under the heat of the broiler.
As they point out, this is technically steaming, not roasting. Still, you'll get similar results and can use the garlic in all the same ways. For more detail, head to their full post at the link below.