mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Add LLVM_USE_NO_EXTRA_PASSES build flag
This commit is contained in:
@@ -1,7 +1,12 @@
|
|||||||
#ifndef LLVM_USE_BASIC_PASSES
|
#ifndef LLVM_USE_NO_EXTRA_PASSES
|
||||||
#define LLVM_USE_BASIC_PASSES 0
|
#define LLVM_USE_NO_EXTRA_PASSES 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef LLVM_USE_BASIC_PASSES
|
||||||
|
#define LLVM_USE_BASIC_PASSES LLVM_USE_NO_EXTRA_PASSES
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
void lb_populate_function_pass_manager(LLVMPassManagerRef fpm, bool ignore_memcpy_pass, i32 optimization_level) {
|
void lb_populate_function_pass_manager(LLVMPassManagerRef fpm, bool ignore_memcpy_pass, i32 optimization_level) {
|
||||||
// NOTE(bill): Treat -opt:3 as if it was -opt:2
|
// NOTE(bill): Treat -opt:3 as if it was -opt:2
|
||||||
// TODO(bill): Determine which opt definitions should exist in the first place
|
// TODO(bill): Determine which opt definitions should exist in the first place
|
||||||
@@ -111,6 +116,9 @@ void lb_populate_module_pass_manager(LLVMTargetMachineRef target_machine, LLVMPa
|
|||||||
if (LLVM_USE_BASIC_PASSES) {
|
if (LLVM_USE_BASIC_PASSES) {
|
||||||
optimization_level = 0;
|
optimization_level = 0;
|
||||||
}
|
}
|
||||||
|
if (LLVM_USE_NO_EXTRA_PASSES) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
LLVMAddAlwaysInlinerPass(mpm);
|
LLVMAddAlwaysInlinerPass(mpm);
|
||||||
LLVMAddStripDeadPrototypesPass(mpm);
|
LLVMAddStripDeadPrototypesPass(mpm);
|
||||||
|
|||||||
Reference in New Issue
Block a user