Skip to content

Commit

Permalink
Ensure that we run late-lowering over ccallable funcs
Browse files Browse the repository at this point in the history
(cherry picked from commit 4e4a0de)
  • Loading branch information
vchuravy committed Oct 19, 2022
1 parent 4d56e46 commit 26f23c8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/llvm-final-gc-lowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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'.
Expand Down
2 changes: 1 addition & 1 deletion src/llvm-late-gc-lowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2720,7 +2720,7 @@ void LateLowerGCFrame::PlaceRootsAndUpdateCalls(std::vector<int> &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);
Expand Down

0 comments on commit 26f23c8

Please sign in to comment.