Skip to content

Commit 2b3fe7a

Browse files
committed
Merge pull request #316 from nuts23/patch-13
Fix typo in SimplifyCFG.cpp
2 parents 4bc6248 + 73445d0 commit 2b3fe7a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

lib/SILPasses/Scalar/SimplifyCFG.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,7 +1124,7 @@ bool SimplifyCFG::simplifyBranchBlock(BranchInst *BI) {
11241124
if (SILBasicBlock *TrampolineDest = getTrampolineDest(DestBB)) {
11251125
SILBuilderWithScope(BI).createBranch(BI->getLoc(), TrampolineDest,
11261126
BI->getArgs());
1127-
// Eliminating the trampoline can expose opportuntities to improve the
1127+
// Eliminating the trampoline can expose opportunities to improve the
11281128
// new block we branch to.
11291129
if (LoopHeaders.count(DestBB))
11301130
LoopHeaders.insert(BB);
@@ -1161,7 +1161,7 @@ static bool wouldIntroduceCriticalEdge(TermInst *T, SILBasicBlock *DestBB) {
11611161
}
11621162

11631163
/// Returns the original boolean value, looking through possible invert
1164-
/// builtins. The paramter \p Inverted is inverted if the returned original
1164+
/// builtins. The parameter \p Inverted is inverted if the returned original
11651165
/// value is the inverted value of the passed \p Cond.
11661166
/// If \p onlyAcceptSingleUse is true and the operand of an invert builtin has
11671167
/// more than one use, an invalid SILValue() is returned.
@@ -1210,7 +1210,7 @@ static CondFailInst *getFistCondFail(SILBasicBlock *BB) {
12101210
}
12111211

12121212
/// If the first side-effect instruction in this block is a cond_fail that
1213-
/// is guarantueed to fail, it is returned.
1213+
/// is guaranteed to fail, it is returned.
12141214
/// The \p Cond is the condition from a cond_br in the predecessor block. The
12151215
/// cond_fail must only fail if \p BB is entered through this predecessor block.
12161216
/// If \p Inverted is true, \p BB is on the false-edge of the cond_br.
@@ -1988,7 +1988,7 @@ bool RemoveUnreachable::run() {
19881988
}
19891989

19901990
/// Checks if the block contains a cond_fail as first side-effect instruction
1991-
/// and trys to move it to the predecessors (if benefitial). A sequence
1991+
/// and trys to move it to the predecessors (if beneficial). A sequence
19921992
///
19931993
/// bb1:
19941994
/// br bb3(%c)
@@ -2016,7 +2016,7 @@ static bool tryMoveCondFailToPreds(SILBasicBlock *BB) {
20162016
return false;
20172017

20182018
// Find the underlying condition value of the cond_fail.
2019-
// We only accept sinlge uses. This is not a correctness check, but we only
2019+
// We only accept single uses. This is not a correctness check, but we only
20202020
// want to to the optimization if the condition gets dead after moving the
20212021
// cond_fail.
20222022
bool inverted = false;
@@ -2636,7 +2636,7 @@ bool SimplifyCFG::run() {
26362636
PostDominanceAnalysis *PDA = PM->getAnalysis<PostDominanceAnalysis>();
26372637

26382638
if (Changed) {
2639-
// Force dominator recomputation since we modifed the cfg.
2639+
// Force dominator recomputation since we modified the cfg.
26402640
DA->invalidate(&Fn, SILAnalysis::InvalidationKind::Everything);
26412641
PDA->invalidate(&Fn, SILAnalysis::InvalidationKind::Everything);
26422642
}
@@ -3033,7 +3033,7 @@ struct CaseInfo {
30333033
/// The result value.
30343034
SILInstruction *Result = nullptr;
30353035

3036-
/// The block which conains the cond_br of the input value comparison
3036+
/// The block which contains the cond_br of the input value comparison
30373037
/// or the block which assigns the default value.
30383038
SILBasicBlock *CmpOrDefault = nullptr;
30393039
};
@@ -3406,7 +3406,7 @@ class SplitCriticalEdges : public SILFunctionTransform {
34063406
void run() override {
34073407
auto &Fn = *getFunction();
34083408

3409-
// Split all critical egdes from all or non only cond_br terminators.
3409+
// Split all critical edges from all or non only cond_br terminators.
34103410
bool Changed =
34113411
splitAllCriticalEdges(Fn, OnlyNonCondBrEdges, nullptr, nullptr);
34123412

0 commit comments

Comments
 (0)