This patch is related to the LLVM-dev RFC "[RFC] MC support for variant scheduling classes".
As the title says, this patch teaches llvm-mca how to solve variant scheduling classes.
Note that this patch doesn't have a test case. I plan to add it soon.