This is a simplified —and hopefully easier to review— version of https://reviews.llvm.org/D114082 with a focus on the performance aspect
Basically, this change forces usage of an AttributeKey object instead of plain string as Attribute key for free-forms attributes. As these object cache their hash value and this value can be computed at compile time for the common case where we check / retrieve an attribute value, this speeds up attribute lookup.