Open nicolasvasilache opened 6 years ago
Thank you for your pull request. We require contributors to sign our Contributor License Agreement, and yours has expired.
Before we can review or merge your code, we need you to email cla@fb.com with your details so we can update your status.
This PR passes proper llvm::TargetMachine information in llvm_jit and codegen_llvm by introducing a proper TargetMachine at the LLVMJit level and avoids introducing adhoc objects.
The TargetMachine is constructed either from the
--mcpu
flag if passed or from thecpuid
information.As a consequence of all this, one can now emit AVX2 and AVX512 code. Before this commit, the TargetMachine was essentially a default one and only AVX code would be generated.
To test and see it one can run with:
Of course if one forces a more fancy architecture than one has, illegal instructions will likely be generated but at least the asm will be printed properly.