LLVM IR that is passed down from Numba frontend to LLVM backend does not contain some basic target specific attributes(target-cpu, target-features) which is added by Clang frontend (when compiling C++) or either by tools such as opt and llc when optimizing the LLVM-IR directly with the help of cli flags.
I have mimicked the flow of opt optimizer from llvm, which adds these details to the IR module before running the optimization pipeline.
This change shouldn't affect any functionality and correctness, it's just to add more details to the IR involved and to make it more more verbose and portable across tools.
LLVM IR that is passed down from Numba frontend to LLVM backend does not contain some basic target specific attributes(
target-cpu
,target-features
) which is added by Clang frontend (when compiling C++) or either by tools such asopt
andllc
when optimizing the LLVM-IR directly with the help ofcli
flags.I have mimicked the flow of
opt
optimizer from llvm, which adds these details to the IR module before running the optimization pipeline.This change shouldn't affect any functionality and correctness, it's just to add more details to the IR involved and to make it more more verbose and portable across tools.