Browse Source

Disallow Early CSE on `-debug` builds

gingerBill 3 years ago
parent
commit
4c3281b3f2
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/llvm_backend_opt.cpp

+ 3 - 1
src/llvm_backend_opt.cpp

@@ -62,7 +62,9 @@ void lb_basic_populate_function_pass_manager(LLVMPassManagerRef fpm, i32 optimiz
 		LLVMAddPromoteMemoryToRegisterPass(fpm);
 		LLVMAddMergedLoadStoreMotionPass(fpm);
 		LLVM_ADD_CONSTANT_VALUE_PASS(fpm);
-		LLVMAddEarlyCSEPass(fpm);
+		if (!build_context.ODIN_DEBUG) {
+			LLVMAddEarlyCSEPass(fpm);
+		}
 	}
 }