Skip to content

Commit

Permalink
Remove unneeded checks
Browse files Browse the repository at this point in the history
  • Loading branch information
arshajii committed Feb 17, 2024
1 parent 7f6abc8 commit 45757ec
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions codon/cir/llvm/optimize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -387,9 +387,7 @@ struct AllocInfo {
auto *parent = ai->getParent();
if (isa<InvokeInst>(ai) || !loop.hasLoopInvariantOperands(ai) ||
ai->getMetadata("codon.alloc.hoisted") || anySubLoopContains(ai) ||
inIrreducibleCycle(ai) || parent->getTerminator()->getNumSuccessors() == 0 ||
(loop.isLoopExiting(parent) &&
parent->getTerminator()->getNumSuccessors() == 1))
inIrreducibleCycle(ai))
return false;

// Need to track insertvalue/extractvalue to make this effective.
Expand Down

0 comments on commit 45757ec

Please sign in to comment.