lib/SILOptimizer/Transforms/DeadStoreElimination.cpp
/// Returns true if this is an instruction that may have side effects in a
/// general sense but are inert from a load store perspective.
Returns true if this is an instruction that may have side effects in a
general sense but are inert from a load store perspective.
Returns true if this is an instruction that may have side effects in a general sense but are inert from a load store perspective .
static bool isDeadStoreInertInstruction(SILInstruction *Inst) {
  switch (Inst->getKind()) {
  case ValueKind::StrongRetainInst:
  case ValueKind::StrongRetainUnownedInst:
  case ValueKind::UnownedRetainInst:
  case ValueKind::RetainValueInst:
  case ValueKind::DeallocStackInst:
  case ValueKind::CondFailInst:
  case ValueKind::IsUniqueInst:
  case ValueKind::IsUniqueOrPinnedInst:
  case ValueKind::FixLifetimeInst:
    return true;
  default:
    return false;
  }
}
static bool isDeadStoreInertInstruction ( SILInstruction * Inst ) { switch ( Inst -> getKind ( ) ) { case ValueKind :: StrongRetainInst : case ValueKind :: StrongRetainUnownedInst : case ValueKind :: UnownedRetainInst : case ValueKind :: RetainValueInst : case ValueKind :: DeallocStackInst : case ValueKind :: CondFailInst : case ValueKind :: IsUniqueInst : case ValueKind :: IsUniqueOrPinnedInst : case ValueKind :: FixLifetimeInst : return true ; default : return false ; } }
Returns true if this is an instruction that may have side effects in a
general sense but are inert from a load store perspective.
Returns true if this is an instruction that may have side effects in a general sense but are inert from a load store perspective .