This adds support for enabling experimental/unratified RISC-V ISA
extensions in the -march string in the case where an explicit version
number has been declared, and the -menable-experimental-extensions flag
has been provided.
This follows the design as discussed on the mailing lists in the
following RFC: http://lists.llvm.org/pipermail/llvm-dev/2020-January/138364.html
Since the RISCV ToolChain definition currently rejects any extension
with an explicit version number, the parsing logic has been tweaked to
support this, and to allow standard extensions to have their versions
checked in future patches.
Support for the bitmanip 'b' extension has been added as a first example,
it should be clear how to extend this should vector 'v' land first.
Suggestion: I think we can avoid these two functions (isExperimentalExtension and getExperimentalExtensionVersion) going out of sync if we have only one of them and make it return an llvm::Optional of the pair of versions.
Thent it can be used like this
I'd also add a comment that the pair's first is the major version and second is the minor version (or alternative use a struct with two public fields Major and Minor)