Clang should pass -backend-option to LLVM even though there is no target machine, since LLVM passes are used when emitting LLVM IR.
Differential Revision: http://reviews.llvm.org/D17552
Differential D17552
Pass -backend-option to LLVM when there is no target machine yaxunl on Feb 23 2016, 2:39 PM. Authored by
Details Clang should pass -backend-option to LLVM even though there is no target machine, since LLVM passes are used when emitting LLVM IR. Differential Revision: http://reviews.llvm.org/D17552
Diff Detail Event TimelineComment Actions Hi Anastasia/Richard, I found this issue when investigating some codegen issues in Clang -cc1 with -emit-llvm. I need to pass an llvm option -print-after-all to the LLVM pass manager which is used to run the optimization passes before emitting llvm. However it did not work. Then I found ParseCommandLineOptions was only called when target machine was set. I fixed this by always call ParseCommandLineOptions even though there is no target machine. This bug causes difficulty for OpenCL since it is usually compiled without target machine. Could you please review this? Thanks. Comment Actions LGTM, apart from small remark on the test!
|