diff options
| author | Manuel Drehwald <git@manuel.drehwald.info> | 2025-01-29 21:31:13 -0500 |
|---|---|---|
| committer | Manuel Drehwald <git@manuel.drehwald.info> | 2025-01-29 21:31:13 -0500 |
| commit | 1f30517d40a9a8fe3b89479891c7a167adb75cbd (patch) | |
| tree | 4da71f0331d185e202236924a854190f913815c7 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | ebcf860e7345e3387b4c6961338c77424b43cbd5 (diff) | |
| download | rust-1f30517d40a9a8fe3b89479891c7a167adb75cbd.tar.gz rust-1f30517d40a9a8fe3b89479891c7a167adb75cbd.zip | |
upstream rustc_codegen_ssa/rustc_middle changes for enzyme/autodiff
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
| -rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp index 35186778671..4cb2376db62 100644 --- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp @@ -955,7 +955,8 @@ extern "C" LLVMValueRef LLVMRustGetLastInstruction(LLVMBasicBlockRef BB) { return nullptr; } -extern "C" void LLVMRustEraseInstBefore(LLVMBasicBlockRef bb, LLVMValueRef I) { +extern "C" void LLVMRustEraseInstUntilInclusive(LLVMBasicBlockRef bb, + LLVMValueRef I) { auto &BB = *unwrap(bb); auto &Inst = *unwrap<Instruction>(I); auto It = BB.begin(); @@ -963,8 +964,6 @@ extern "C" void LLVMRustEraseInstBefore(LLVMBasicBlockRef bb, LLVMValueRef I) { ++It; // Make sure we found the Instruction. assert(It != BB.end()); - // We don't want to erase the instruction itself. - It--; // Delete in rev order to ensure no dangling references. while (It != BB.begin()) { auto Prev = std::prev(It); |
