@@ -1124,7 +1124,7 @@ bool SimplifyCFG::simplifyBranchBlock(BranchInst *BI) {
1124
1124
if (SILBasicBlock *TrampolineDest = getTrampolineDest (DestBB)) {
1125
1125
SILBuilderWithScope (BI).createBranch (BI->getLoc (), TrampolineDest,
1126
1126
BI->getArgs ());
1127
- // Eliminating the trampoline can expose opportuntities to improve the
1127
+ // Eliminating the trampoline can expose opportunities to improve the
1128
1128
// new block we branch to.
1129
1129
if (LoopHeaders.count (DestBB))
1130
1130
LoopHeaders.insert (BB);
@@ -1161,7 +1161,7 @@ static bool wouldIntroduceCriticalEdge(TermInst *T, SILBasicBlock *DestBB) {
1161
1161
}
1162
1162
1163
1163
// / 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
1165
1165
// / value is the inverted value of the passed \p Cond.
1166
1166
// / If \p onlyAcceptSingleUse is true and the operand of an invert builtin has
1167
1167
// / more than one use, an invalid SILValue() is returned.
@@ -1210,7 +1210,7 @@ static CondFailInst *getFistCondFail(SILBasicBlock *BB) {
1210
1210
}
1211
1211
1212
1212
// / 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.
1214
1214
// / The \p Cond is the condition from a cond_br in the predecessor block. The
1215
1215
// / cond_fail must only fail if \p BB is entered through this predecessor block.
1216
1216
// / If \p Inverted is true, \p BB is on the false-edge of the cond_br.
@@ -1988,7 +1988,7 @@ bool RemoveUnreachable::run() {
1988
1988
}
1989
1989
1990
1990
// / 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
1992
1992
// /
1993
1993
// / bb1:
1994
1994
// / br bb3(%c)
@@ -2016,7 +2016,7 @@ static bool tryMoveCondFailToPreds(SILBasicBlock *BB) {
2016
2016
return false ;
2017
2017
2018
2018
// 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
2020
2020
// want to to the optimization if the condition gets dead after moving the
2021
2021
// cond_fail.
2022
2022
bool inverted = false ;
@@ -2636,7 +2636,7 @@ bool SimplifyCFG::run() {
2636
2636
PostDominanceAnalysis *PDA = PM->getAnalysis <PostDominanceAnalysis>();
2637
2637
2638
2638
if (Changed) {
2639
- // Force dominator recomputation since we modifed the cfg.
2639
+ // Force dominator recomputation since we modified the cfg.
2640
2640
DA->invalidate (&Fn, SILAnalysis::InvalidationKind::Everything);
2641
2641
PDA->invalidate (&Fn, SILAnalysis::InvalidationKind::Everything);
2642
2642
}
@@ -3033,7 +3033,7 @@ struct CaseInfo {
3033
3033
// / The result value.
3034
3034
SILInstruction *Result = nullptr ;
3035
3035
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
3037
3037
// / or the block which assigns the default value.
3038
3038
SILBasicBlock *CmpOrDefault = nullptr ;
3039
3039
};
@@ -3406,7 +3406,7 @@ class SplitCriticalEdges : public SILFunctionTransform {
3406
3406
void run () override {
3407
3407
auto &Fn = *getFunction ();
3408
3408
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.
3410
3410
bool Changed =
3411
3411
splitAllCriticalEdges (Fn, OnlyNonCondBrEdges, nullptr , nullptr );
3412
3412
0 commit comments