================
@@ -117,11 +270,21 @@ int main(int argc, char **argv) {
   cl::HideUnrelatedOptions(IR2VecToolCategory);
   cl::ParseCommandLineOptions(
       argc, argv,
-      "IR2Vec - Triplet Generation Tool\n"
-      "Generates triplets for vocabulary training from LLVM IR.\n"
-      "Future updates will support embedding generation.\n\n"
+      "IR2Vec - Embedding Generation Tool\n"
+      "Generates embeddings for a given LLVM IR and "
+      "supports triplet generation for vocabulary "
+      "training and embedding generation.\n\n"
       "Usage:\n"
-      "  llvm-ir2vec input.bc -o triplets.txt\n");
+      "  Triplet mode:   llvm-ir2vec --mode=triplets input.bc\n"
+      "  Embedding mode: llvm-ir2vec --mode=embeddings "
+      "--ir2vec-vocab-path=vocab.json --level=func input.bc\n"
+      "  Levels: --level=inst (instructions), --level=bb (basic blocks), "
+      "--level=func (functions)\n");
+
+  // Validate command line options
+  if (Mode == TripletMode && Level != FunctionLevel) {
----------------
boomanaiden154 wrote:

This might be a bit confusing if the user explicitly requests function level 
triplet mode. I think there's a way to see if the user has actually passed a 
flag with `cl::opt`, but I'm not sure.

https://github.com/llvm/llvm-project/pull/147844
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to