Skip to content

Commit eb1c656

Browse files
committed
Remove unnecessary #ifndef in PhiArgumentOptimizations.cpp
1 parent df93b5c commit eb1c656

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

lib/SILOptimizer/Transforms/PhiArgumentOptimizations.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,8 @@ bool RedundantPhiEliminationPass::optimizeArgs(SILBasicBlock *block) {
165165
// arg.
166166
if (phi1->getOwnershipKind() == OwnershipKind::Owned &&
167167
phi2->getOwnershipKind() == OwnershipKind::Owned) {
168-
#ifndef NDEBUG
169168
assert(hasOnlyNoneOwnershipIncomingValues(phi1));
170169
assert(hasOnlyNoneOwnershipIncomingValues(phi2));
171-
#endif
172170
SILBuilderWithScope builder(&block->front());
173171
auto copy = builder.createCopyValue(
174172
RegularLocation::getAutoGeneratedLocation(), phi1);
@@ -178,18 +176,14 @@ bool RedundantPhiEliminationPass::optimizeArgs(SILBasicBlock *block) {
178176
// If arg2 has none ownership, replace arg1 with arg2
179177
else if (phi1->getOwnershipKind() == OwnershipKind::Owned &&
180178
phi2->getOwnershipKind() == OwnershipKind::None) {
181-
#ifndef NDEBUG
182179
assert(hasOnlyNoneOwnershipIncomingValues(phi1));
183-
#endif
184180
phi1->replaceAllUsesWith(phi2);
185181
eraseOwnedPhiArgument(block, arg1Idx);
186182
}
187183
// If arg1 has none ownership, replace arg2 with arg1
188184
else if (phi1->getOwnershipKind() == OwnershipKind::None &&
189185
phi2->getOwnershipKind() == OwnershipKind::Owned) {
190-
#ifndef NDEBUG
191186
assert(hasOnlyNoneOwnershipIncomingValues(phi2));
192-
#endif
193187
phi2->replaceAllUsesWith(phi1);
194188
eraseOwnedPhiArgument(block, arg2Idx);
195189
} else {

0 commit comments

Comments
 (0)