to share it between the Instruction Selector in optimized and non-optimized modes both and the Testgen.
Originally part of the larger https://reviews.llvm.org/D43962 ([GlobalISel][utils] Adding the init version of Instruction Select Testgen) patch, extracted as to make it smaller and more targeted.
Partially reviewed by @dsanders within the patch mentioned.
Required by https://reviews.llvm.org/D43962 and https://reviews.llvm.org/D44700, depends on https://reviews.llvm.org/D46096