Skip to content

Commit 7c8176e

Browse files
committed
[Coroutines] Remove unused function (NFC)
llvm-project/llvm/lib/Transforms/Coroutines/CoroSplit.cpp:1223:1: error: unused function 'scanPHIsAndUpdateValueMap' [-Werror,-Wunused-function] scanPHIsAndUpdateValueMap(Instruction *Prev, BasicBlock *NewBlock, ^ 1 error generated.
1 parent 8d386c6 commit 7c8176e

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

llvm/lib/Transforms/Coroutines/CoroSplit.cpp

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1217,23 +1217,6 @@ static void postSplitCleanup(Function &F) {
12171217
#endif
12181218
}
12191219

1220-
// Assuming we arrived at the block NewBlock from Prev instruction, store
1221-
// PHI's incoming values in the ResolvedValues map.
1222-
static void
1223-
scanPHIsAndUpdateValueMap(Instruction *Prev, BasicBlock *NewBlock,
1224-
DenseMap<Value *, Value *> &ResolvedValues) {
1225-
auto *PrevBB = Prev->getParent();
1226-
for (PHINode &PN : NewBlock->phis()) {
1227-
auto V = PN.getIncomingValueForBlock(PrevBB);
1228-
// See if we already resolved it.
1229-
auto VI = ResolvedValues.find(V);
1230-
if (VI != ResolvedValues.end())
1231-
V = VI->second;
1232-
// Remember the value.
1233-
ResolvedValues[&PN] = V;
1234-
}
1235-
}
1236-
12371220
// Coroutine has no suspend points. Remove heap allocation for the coroutine
12381221
// frame if possible.
12391222
static void handleNoSuspendCoroutine(coro::Shape &Shape) {

0 commit comments

Comments
 (0)