diff options
| author | Alex Rønne Petersen <alex@alexrp.com> | 2025-07-02 04:15:10 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-02 04:15:10 +0200 |
| commit | edf785db0f30842b958f540a3aaf7205b8b82493 (patch) | |
| tree | 88225d506adb78ce88b8b9de64c482810e448b9d /src/zig_llvm.cpp | |
| parent | ee6d19480da53b3a351749e2a7b18c45ad072018 (diff) | |
| parent | 8e511e031f72ef2bf236d498f32bf1013cacb882 (diff) | |
| download | zig-edf785db0f30842b958f540a3aaf7205b8b82493.tar.gz zig-edf785db0f30842b958f540a3aaf7205b8b82493.zip | |
Merge pull request #24302 from alexrp/riscv
Native RISC-V bootstrap and test fixes
Diffstat (limited to 'src/zig_llvm.cpp')
| -rw-r--r-- | src/zig_llvm.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/zig_llvm.cpp b/src/zig_llvm.cpp index cb624ea256..fe4e421dc3 100644 --- a/src/zig_llvm.cpp +++ b/src/zig_llvm.cpp @@ -260,6 +260,16 @@ ZIG_EXTERN_C bool ZigLLVMTargetMachineEmitToFile(LLVMTargetMachineRef targ_machi TargetMachine &target_machine = *reinterpret_cast<TargetMachine*>(targ_machine_ref); + if (options->allow_fast_isel) { + target_machine.setO0WantsFastISel(true); + } else { + target_machine.setFastISel(false); + } + + if (!options->allow_machine_outliner) { + target_machine.setMachineOutliner(false); + } + Module &llvm_module = *unwrap(module_ref); // Pipeline configurations @@ -385,12 +395,6 @@ ZIG_EXTERN_C bool ZigLLVMTargetMachineEmitToFile(LLVMTargetMachineRef targ_machi } } - if (options->allow_fast_isel) { - target_machine.setO0WantsFastISel(true); - } else { - target_machine.setFastISel(false); - } - // Optimization phase module_pm.run(llvm_module, module_am); |
