[PATCH] D115138: [llvm-mca] Compare multiple files

Djordje Todorovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 8 03:41:37 PST 2021


djtodoro added inline comments.


================
Comment at: llvm/utils/llvm-mca-compare-multiple-files.py:47
+# Returns the name of the file to be analyzed from the path it is on.
+def getFilenameFromPath (path):
+  indexOfSlash = path.rfind("/")
----------------
we should be using one naming convention (either camelCase or under_scores), but I vote for underscores


================
Comment at: llvm/utils/llvm-mca-compare-multiple-files.py:53
+def llvmMcaStats (opts, FileName):
+
+  # Get the directory of the LLVM tools.
----------------
this newline is not needed


================
Comment at: llvm/utils/llvm-mca-compare-multiple-files.py:91
+def printResult (arrayOneFileStats, opts):
+  import termtables as tt
+
----------------
I suggest that we check for this package as:

    try:
      import termtables
    except ImportError:
      print('error: termtables not found.')
      return


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

https://reviews.llvm.org/D115138



More information about the llvm-commits mailing list