22
22
using namespace swift ;
23
23
24
24
void PrunedLiveBlocks::computeScalarUseBlockLiveness (SILBasicBlock *userBB,
25
- unsigned startBitNo) {
26
- unsigned endBitNo = startBitNo + 1 ;
27
-
25
+ unsigned bitNo) {
28
26
// If, we are visiting this block, then it is not already LiveOut. Mark it
29
27
// LiveWithin to indicate a liveness boundary within the block.
30
- markBlockLive (userBB, startBitNo, endBitNo , LiveWithin);
28
+ markBlockLive (userBB, bitNo , LiveWithin);
31
29
32
- // Specialize the given code for scalar code.
33
30
BasicBlockWorklist worklist (userBB->getFunction ());
34
31
worklist.push (userBB);
35
32
@@ -39,12 +36,12 @@ void PrunedLiveBlocks::computeScalarUseBlockLiveness(SILBasicBlock *userBB,
39
36
// Traversal terminates at any previously visited block, including the
40
37
// blocks initialized as definition blocks.
41
38
for (auto *predBlock : block->getPredecessorBlocks ()) {
42
- switch (getBlockLiveness (predBlock, startBitNo )) {
39
+ switch (getBlockLiveness (predBlock, bitNo )) {
43
40
case Dead:
44
41
worklist.pushIfNotVisited (predBlock);
45
42
LLVM_FALLTHROUGH;
46
43
case LiveWithin:
47
- markBlockLive (predBlock, startBitNo, endBitNo , LiveOut);
44
+ markBlockLive (predBlock, bitNo , LiveOut);
48
45
break ;
49
46
case LiveOut:
50
47
break ;
0 commit comments