Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove unneeded checks
Browse files Browse the repository at this point in the history
arshajii committed Feb 17, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
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
@@ -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.

0 comments on commit 45757ec

Please sign in to comment.