Skip to content

Commit bb5fe18

Browse files
committed
Add/fix comments as a follow-up to the string constants optimization changes.
1 parent f0997c0 commit bb5fe18

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/SILOptimizer/PassManager/PassPipeline.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,7 @@ static void addClosureSpecializePassPipeline(SILPassPipelinePlan &P) {
384384
P.addDeadObjectElimination();
385385

386386
// These few passes are needed to cleanup between loop unrolling and GlobalOpt.
387+
// This is needed to fully optimize static small String constants.
387388
P.addSimplifyCFG();
388389
P.addSILCombine();
389390
P.addPerformanceConstantPropagation();

lib/SILOptimizer/SILCombiner/SILCombinerMiscVisitors.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ static SILValue isConstIndexAddr(SILValue val, unsigned &index) {
473473
auto *Index = dyn_cast<IntegerLiteralInst>(IA->getIndex());
474474

475475
// Limiting to 32 bits is more than enough. The reason why not limiting to 64
476-
// bits is to let room for overflow when we add two indices.
476+
// bits is to leave room for overflow when we add two indices.
477477
if (!Index || Index->getValue().getActiveBits() > 32)
478478
return nullptr;
479479

0 commit comments

Comments
 (0)