diff options
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/IR/ModuleSummaryIndex.cpp | 24 | ||||
-rw-r--r-- | llvm/lib/LTO/LTO.cpp | 7 | ||||
-rw-r--r-- | llvm/lib/Transforms/IPO/FunctionImport.cpp | 2 |
3 files changed, 1 insertions, 32 deletions
diff --git a/llvm/lib/IR/ModuleSummaryIndex.cpp b/llvm/lib/IR/ModuleSummaryIndex.cpp index 4c4466f9a90..ce74c00766f 100644 --- a/llvm/lib/IR/ModuleSummaryIndex.cpp +++ b/llvm/lib/IR/ModuleSummaryIndex.cpp @@ -13,14 +13,10 @@ //===----------------------------------------------------------------------===// #include "llvm/IR/ModuleSummaryIndex.h" -#include "llvm/ADT/SCCIterator.h" #include "llvm/ADT/StringMap.h" #include "llvm/Support/Path.h" -#include "llvm/Support/raw_ostream.h" using namespace llvm; -FunctionSummary FunctionSummary::ExternalNode = - FunctionSummary::makeDummyFunctionSummary({}); bool ValueInfo::isDSOLocal() const { // Need to check all summaries are local in case of hash collisions. return getSummaryList().size() && @@ -84,26 +80,6 @@ bool ModuleSummaryIndex::isGUIDLive(GlobalValue::GUID GUID) const { return false; } -// TODO: write a graphviz dumper for SCCs (see ModuleSummaryIndex::exportToDot) -// then delete this function and update its tests -LLVM_DUMP_METHOD -void ModuleSummaryIndex::dumpSCCs(raw_ostream &O) { - for (scc_iterator<ModuleSummaryIndex *> I = - scc_begin<ModuleSummaryIndex *>(this); - !I.isAtEnd(); ++I) { - O << "SCC (" << utostr(I->size()) << " node" << (I->size() == 1 ? "" : "s") - << ") {\n"; - for (const ValueInfo V : *I) { - FunctionSummary *F = nullptr; - if (V.getSummaryList().size()) - F = cast<FunctionSummary>(V.getSummaryList().front().get()); - O << " " << (F == nullptr ? "External" : "") << " " << utostr(V.getGUID()) - << (I.hasLoop() ? " (has loop)" : "") << "\n"; - } - O << "}\n"; - } -} - namespace { struct Attributes { void add(const Twine &Name, const Twine &Value, diff --git a/llvm/lib/LTO/LTO.cpp b/llvm/lib/LTO/LTO.cpp index 94baee63b0e..1047b8ddeb4 100644 --- a/llvm/lib/LTO/LTO.cpp +++ b/llvm/lib/LTO/LTO.cpp @@ -50,10 +50,6 @@ using namespace object; #define DEBUG_TYPE "lto" -static cl::opt<bool> - DumpThinCGSCCs("dump-thin-cg-sccs", cl::init(false), cl::Hidden, - cl::desc("Dump the SCCs in the ThinLTO index's callgraph")); - // The values are (type identifier, summary) pairs. typedef DenseMap< GlobalValue::GUID, @@ -1145,9 +1141,6 @@ Error LTO::runThinLTO(AddStreamFn AddStream, NativeObjectCache Cache) { ThinLTO.ModuleMap.size()); StringMap<std::map<GlobalValue::GUID, GlobalValue::LinkageTypes>> ResolvedODR; - if (DumpThinCGSCCs) - ThinLTO.CombinedIndex.dumpSCCs(outs()); - if (Conf.OptLevel > 0) ComputeCrossModuleImport(ThinLTO.CombinedIndex, ModuleToDefinedGVSummaries, ImportLists, ExportLists); diff --git a/llvm/lib/Transforms/IPO/FunctionImport.cpp b/llvm/lib/Transforms/IPO/FunctionImport.cpp index b68058cbeea..b92f798c4ab 100644 --- a/llvm/lib/Transforms/IPO/FunctionImport.cpp +++ b/llvm/lib/Transforms/IPO/FunctionImport.cpp @@ -18,8 +18,8 @@ #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/Statistic.h" #include "llvm/ADT/StringMap.h" -#include "llvm/ADT/StringRef.h" #include "llvm/ADT/StringSet.h" +#include "llvm/ADT/StringRef.h" #include "llvm/Bitcode/BitcodeReader.h" #include "llvm/IR/AutoUpgrade.h" #include "llvm/IR/Constants.h" |