The callable_when annotation can take a list of states that a function can be called in. This reduced the total number of annotations needed and makes writing more complicated behaviour less burdensome.
To allow the the callable_when attribute to hold a variable number of states a VariadicEnumArgument Tablegen attribute classes was added. Future work should replace the various Variadic attribute classes with a single class that takes another attribute as a parameter. A FIXME has been added to indicate this at the request of Richard Smith.
This patch was mailed to the list previously, when I was at Google over the summer. I created a new patch because it was first submitted almost a month ago, and some changes were made to the TableGen emitter for attributes that necessitated some changes in the patch.