aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools')
-rw-r--r--llvm/tools/llc/llc.cpp15
-rw-r--r--llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp7
2 files changed, 19 insertions, 3 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);