[PATCH] D137926: [Utils] Improved chunk-print-before-all.py script

Artur Pilipenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 14 16:32:09 PST 2022


apilipenko added inline comments.


================
Comment at: llvm/utils/chunk-print-before-all.py:2
 #!/usr/bin/env python
 # Given a -print-before-all -print-module-scope log from an opt invocation,
 # chunk it into a series of individual IR files, one for each pass invocation.
----------------
Update the comment


================
Comment at: llvm/utils/chunk-print-before-all.py:39-44
+        short_line = line[line.find("After") + 6:]
+        if  short_line.find("<") == -1 or \
+            short_line.find("<") > short_line.find(" "):
+            pass_name = short_line[:short_line.find(" ")]
+        else:
+            pass_name = short_line[:short_line.find("<")]
----------------
Extract into a helper and add a comment on what this code is doing?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137926/new/

https://reviews.llvm.org/D137926



More information about the llvm-commits mailing list