Skip to content

Commit

Permalink
Merge pull request #1187 from AdaptiveCpp/hotfix/sscp-global-handling
Browse files Browse the repository at this point in the history
[SSCP] Fix excessive global pruning introduced in #1166
  • Loading branch information
illuhad committed Oct 13, 2023
2 parents 337535b + 4b73515 commit f577603
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/compiler/sscp/KernelOutliningPass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ namespace {
bool isUsedInFunctions(llvm::SmallPtrSet<llvm::User*, 16>& VisitedUsers, llvm::User* User) {
if(llvm::isa<llvm::Function>(User))
return true;
if(llvm::Instruction* I = llvm::dyn_cast<llvm::Instruction>(User)){
if(I->getFunction())
return true;
}

if(VisitedUsers.contains(User))
return false;
Expand Down

0 comments on commit f577603

Please sign in to comment.