diff options
Diffstat (limited to 'llvm/tools')
-rw-r--r-- | llvm/tools/llc/llc.cpp | 15 | ||||
-rw-r--r-- | llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp | 7 | ||||
-rw-r--r-- | llvm/tools/llvm-link/llvm-link.cpp | 2 | ||||
-rw-r--r-- | llvm/tools/llvm-lto/llvm-lto.cpp | 2 |
4 files changed, 21 insertions, 5 deletions
diff --git a/llvm/tools/llc/llc.cpp b/llvm/tools/llc/llc.cpp index 8b03db3..152f7db 100644 --- a/llvm/tools/llc/llc.cpp +++ b/llvm/tools/llc/llc.cpp @@ -172,6 +172,11 @@ static cl::opt<bool> cl::desc("Print MIR2Vec vocabulary contents"), cl::init(false)); +static cl::opt<bool> + PrintMIR2Vec("print-mir2vec", cl::Hidden, + cl::desc("Print MIR2Vec embeddings for functions"), + cl::init(false)); + static cl::list<std::string> IncludeDirs("I", cl::desc("include search path")); static cl::opt<bool> RemarksWithHotness( @@ -775,6 +780,11 @@ static int compileModule(char **argv, LLVMContext &Context) { PM.add(createMIR2VecVocabPrinterLegacyPass(errs())); } + // Add MIR2Vec printer if requested + if (PrintMIR2Vec) { + PM.add(createMIR2VecPrinterLegacyPass(errs())); + } + PM.add(createFreeMachineFunctionPass()); } else { if (Target->addPassesToEmitFile(PM, *OS, DwoOut ? &DwoOut->os() : nullptr, @@ -788,6 +798,11 @@ static int compileModule(char **argv, LLVMContext &Context) { if (PrintMIR2VecVocab) { PM.add(createMIR2VecVocabPrinterLegacyPass(errs())); } + + // Add MIR2Vec printer if requested + if (PrintMIR2Vec) { + PM.add(createMIR2VecPrinterLegacyPass(errs())); + } } Target->getObjFileLowering()->Initialize(MMIWP->getMMI().getContext(), diff --git a/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp b/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp index 79f0527..11eb58e 100644 --- a/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp +++ b/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp @@ -202,9 +202,10 @@ static alias IgnoreCaseAlias("i", desc("Alias for --ignore-case."), aliasopt(IgnoreCase), cl::NotHidden); static list<std::string> Name( "name", - desc("Find and print all debug info entries whose name (DW_AT_name " - "attribute) matches the exact text in <pattern>. When used with the " - "the -regex option <pattern> is interpreted as a regular expression."), + desc("Find and print all debug info entries whose name " + "(DW_AT_name/DW_AT_linkage_name attribute) matches the exact text " + "in <pattern>. When used with the the -regex option <pattern> is " + "interpreted as a regular expression."), value_desc("pattern"), cat(DwarfDumpCategory)); static alias NameAlias("n", desc("Alias for --name"), aliasopt(Name), cl::NotHidden); diff --git a/llvm/tools/llvm-link/llvm-link.cpp b/llvm/tools/llvm-link/llvm-link.cpp index 93b1fb6..33c3e6f 100644 --- a/llvm/tools/llvm-link/llvm-link.cpp +++ b/llvm/tools/llvm-link/llvm-link.cpp @@ -420,7 +420,7 @@ static bool linkFiles(const char *argv0, LLVMContext &Context, Linker &L, // does not do the ThinLink that would normally determine what values to // promote. for (auto &I : *Index) { - for (auto &S : I.second.SummaryList) { + for (auto &S : I.second.getSummaryList()) { if (GlobalValue::isLocalLinkage(S->linkage())) S->setLinkage(GlobalValue::ExternalLinkage); } diff --git a/llvm/tools/llvm-lto/llvm-lto.cpp b/llvm/tools/llvm-lto/llvm-lto.cpp index 05e9502..09f7142 100644 --- a/llvm/tools/llvm-lto/llvm-lto.cpp +++ b/llvm/tools/llvm-lto/llvm-lto.cpp @@ -379,7 +379,7 @@ static void printIndexStats() { unsigned Calls = 0, Refs = 0, Functions = 0, Alias = 0, Globals = 0; for (auto &Summaries : *Index) { - for (auto &Summary : Summaries.second.SummaryList) { + for (auto &Summary : Summaries.second.getSummaryList()) { Refs += Summary->refs().size(); if (auto *FuncSummary = dyn_cast<FunctionSummary>(Summary.get())) { Functions++; |