COWArrayOpts: remove the -view-cfg-before-cow-for option for debugging

This option is very old. The same effect can now be achieved with pass-manager options, like -sil-print-before
This commit is contained in:
Erik Eckstein
2018-10-02 12:26:27 -07:00
parent 4f113f6610
commit b2a5fd69be

View File

@@ -38,12 +38,6 @@
#include "llvm/Support/Debug.h"
using namespace swift;
#ifndef NDEBUG
llvm::cl::opt<std::string>
COWViewCFGFunction("view-cfg-before-cow-for", llvm::cl::init(""),
llvm::cl::desc("Only print out the sil for this function"));
#endif
/// \return a sequence of integers representing the access path of this element
/// within a Struct/Ref/Tuple.
///
@@ -1585,13 +1579,6 @@ class COWArrayOptPass : public SILFunctionTransform {
return;
}
#ifndef NDEBUG
if (!COWViewCFGFunction.empty() && getFunction()->getName() == COWViewCFGFunction) {
getFunction()->dump();
getFunction()->viewCFG();
}
#endif
// Create a flat list of loops in loop-tree postorder (bottom-up).
llvm::SmallVector<SILLoop *, 16> Loops;
std::function<void (SILLoop*)> pushChildren = [&](SILLoop *L) {