MIR: Add method to stop after specific runs of passes
Currently if you use -{start,stop}-{before,after}, it picks
the first instance with the matching pass name. If you run
the same pass multiple times, there's no way to distinguish them.
Allow specifying a run index wih ,N to specify which you mean.
llvm-svn: 348285
diff --git a/llvm/docs/MIRLangRef.rst b/llvm/docs/MIRLangRef.rst
index 9a7e18c..ca6c010 100644
--- a/llvm/docs/MIRLangRef.rst
+++ b/llvm/docs/MIRLangRef.rst
@@ -60,6 +60,11 @@
``llc -stop-after=machine-cp bug-trigger.ll > test.mir``
+If the same pass is run multiple times, a run index can be included
+after the name with a comma.
+
+ ``llc -stop-after=dead-mi-elimination,1 bug-trigger.ll > test.mir``
+
After generating the input MIR file, you'll have to add a run line that uses
the ``-run-pass`` option to it. In order to test the post register allocation
pseudo instruction expansion pass on X86-64, a run line like the one shown