From 26f23c89ffd6578e53af53a03bc531628e8d231c Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Wed, 19 Oct 2022 09:52:24 -0400 Subject: [PATCH] Ensure that we run late-lowering over ccallable funcs (cherry picked from commit 4e4a0de7b0fe5f3b763164f4e1d437bfc46f4b18) --- src/llvm-final-gc-lowering.cpp | 2 +- src/llvm-late-gc-lowering.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/llvm-final-gc-lowering.cpp b/src/llvm-final-gc-lowering.cpp index e7e9fe2f4f26a..9fb22e03b847c 100644 --- a/src/llvm-final-gc-lowering.cpp +++ b/src/llvm-final-gc-lowering.cpp @@ -304,7 +304,7 @@ bool FinalLowerGC::runOnFunction(Function &F) LLVM_DEBUG(dbgs() << "FINAL GC LOWERING: Processing function " << F.getName() << "\n"); // Check availability of functions again since they might have been deleted. initFunctions(*F.getParent()); - if (!pgcstack_getter) + if (!pgcstack_getter && !adoptthread_func) return false; // Look for a call to 'julia.get_pgcstack'. diff --git a/src/llvm-late-gc-lowering.cpp b/src/llvm-late-gc-lowering.cpp index 5011d900ef99e..824f5910df527 100644 --- a/src/llvm-late-gc-lowering.cpp +++ b/src/llvm-late-gc-lowering.cpp @@ -2720,7 +2720,7 @@ void LateLowerGCFrame::PlaceRootsAndUpdateCalls(std::vector &Colors, State bool LateLowerGCFrame::runOnFunction(Function &F, bool *CFGModified) { initAll(*F.getParent()); LLVM_DEBUG(dbgs() << "GC ROOT PLACEMENT: Processing function " << F.getName() << "\n"); - if (!pgcstack_getter) + if (!pgcstack_getter && !adoptthread_func) return CleanupIR(F, nullptr, CFGModified); pgcstack = getPGCstack(F);