[PATCH] D35491: [opt-viewer] Accept directories that are searched for opt.yaml files
Davide Italiano via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 17 09:57:18 PDT 2017
davide added inline comments.
================
Comment at: tools/opt-viewer/opt-diff.py:28
+ 'yaml_dir_or_file_1',
+ help='An optmization record file or a directory searched for optmization '
+ 'record files that are used as the old version for the comparison')
----------------
typo: optmization
================
Comment at: tools/opt-viewer/opt-diff.py:32
+ 'yaml_dir_or_file_2',
+ help='An optmization record file or a directory searched for optmization '
+ 'record files that are used as the new version for the comparison')
----------------
Ditto.
================
Comment at: tools/opt-viewer/optrecord.py:240-250
+def find_opt_files(dirs_or_files):
+ all = []
+ for dir_or_file in dirs_or_files:
+ if os.path.isfile(dir_or_file):
+ all.append(dir_or_file)
+ else:
+ for dir, subdirs, files in os.walk(dir_or_file):
----------------
this seems like something that can walk the whole filesystem if you end up passing the wrogn directory. Not sure there's a better way though.
https://reviews.llvm.org/D35491
More information about the llvm-commits
mailing list