mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[g-arc-opts] Remove isInterestingInstruction. Its not useful or interesting.
Swift SVN r18583
This commit is contained in:
@@ -26,22 +26,6 @@ using namespace swift::arc;
|
||||
// Utilities
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef NDEBUG
|
||||
/// Small helper function for reducing the debug output generated by ignoring
|
||||
/// functions without interesting instructions.
|
||||
static bool isInterestingInstruction(ValueKind Kind) {
|
||||
switch (Kind) {
|
||||
default:
|
||||
return false;
|
||||
case ValueKind::RetainValueInst:
|
||||
case ValueKind::ReleaseValueInst:
|
||||
case ValueKind::StrongRetainInst:
|
||||
case ValueKind::StrongReleaseInst:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static bool isAutoreleasePoolCall(SILInstruction &I) {
|
||||
ApplyInst *AI = dyn_cast<ApplyInst>(&I);
|
||||
if (!AI)
|
||||
@@ -164,16 +148,6 @@ processBBTopDown(ARCBBState &BBState,
|
||||
|
||||
bool NestingDetected = false;
|
||||
|
||||
#ifndef NDEBUG
|
||||
// If we are in debug mode, to make the output less verbose, make sure we are
|
||||
// actually processing something interesting before emitting any log output.
|
||||
bool FoundOneInst = false;
|
||||
for (auto &I : BB)
|
||||
FoundOneInst |= isInterestingInstruction(I.getKind());
|
||||
if (!FoundOneInst)
|
||||
return NestingDetected;
|
||||
#endif
|
||||
|
||||
// If the current BB is the entry BB, initialize a state corresponding to each
|
||||
// of its owned parameters.
|
||||
//
|
||||
@@ -311,16 +285,6 @@ processBBBottomUp(ARCBBState &BBState,
|
||||
|
||||
bool NestingDetected = false;
|
||||
|
||||
#ifndef NDEBUG
|
||||
// If we are in debug mode, to make the output less verbose, make sure we are
|
||||
// actually processing something interesting before emitting any log output.
|
||||
bool FoundOneInst = false;
|
||||
for (auto &I : BB)
|
||||
FoundOneInst |= isInterestingInstruction(I.getKind());
|
||||
if (!FoundOneInst)
|
||||
return NestingDetected;
|
||||
#endif
|
||||
|
||||
// For each non terminator instruction I in BB visited in reverse...
|
||||
for (auto II = std::next(BB.rbegin()), IE = BB.rend(); II != IE;) {
|
||||
SILInstruction &I = *II;
|
||||
|
||||
Reference in New Issue
Block a user