This patch is the third of a sequence of three patches related to LLVM-dev RFC "MC support for variant scheduling classes". http://lists.llvm.org/pipermail/llvm-dev/2018-May/123181.html
This patch requires D47077 to be applied first.
The main goal of this patch is to teach llvm-mca how to solve variant scheduling classes.
This patch does that, plus it adds a variant scheduling class to the BtVer2 scheduling model to identify so-called zero-idioms (data dependency breaking instructions that are known to produce zero, and that are optimized out at register renaming stage).
Without the BtVer2 change, this patch would not have had any tests.
This patch is effectively the union of two changes:
- the llvm-mca change that enables the resolution of variant scheduling classes, and
- the change to the BtVer2 scheduling model.
Point 2. (partially) fixes PR36671.
Point 1. fixes PR36672.
@RKSimon and @craig.topper , the new scheduling predicate for the XOR zero-idiom is quite simple. In future, we could move predicates that are valid for multiple processor models into a common .td file.
For now, I keep that predicate check into the BtVer2 model.
Please let me know if okay to commit.
Thanks
-Andrea
These are unfortunate - please can you raise an upstream bugzilla about throughput printing defaulting to issues width.