diff options
author | Roman Tereshin <rtereshin@apple.com> | 2019-09-18 23:44:16 +0000 |
---|---|---|
committer | Roman Tereshin <rtereshin@apple.com> | 2019-09-18 23:44:16 +0000 |
commit | 73778e9878fab279b4f8654d3eecff2571c6398b (patch) | |
tree | f2b4df5949fbca5a6762a05dadf9b9f1b95e0dfe /llvm/utils/update_llc_test_checks.py | |
parent | dbcd7f560270890ee0857b86721bf561103192d8 (diff) | |
download | bcm5719-llvm-73778e9878fab279b4f8654d3eecff2571c6398b.tar.gz bcm5719-llvm-73778e9878fab279b4f8654d3eecff2571c6398b.zip |
[utils] Amend update_llc_test_checks.py to non-llc tooling, NFC
Very minor change aiming to make it easier to extend the script
downstream to support non-llc, but llc-like tools. The main objective is
to decrease the probability of merge conflicts.
llvm-svn: 372276
Diffstat (limited to 'llvm/utils/update_llc_test_checks.py')
-rwxr-xr-x | llvm/utils/update_llc_test_checks.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/utils/update_llc_test_checks.py b/llvm/utils/update_llc_test_checks.py index 1f7d939155e..2b43157f222 100755 --- a/llvm/utils/update_llc_test_checks.py +++ b/llvm/utils/update_llc_test_checks.py @@ -92,6 +92,7 @@ def main(): commands = [cmd.strip() for cmd in l.split('|', 1)] llc_cmd = commands[0] + llc_tool = llc_cmd.split(' ')[0] triple_in_cmd = None m = common.TRIPLE_ARG_RE.search(llc_cmd) @@ -107,7 +108,7 @@ def main(): if len(commands) > 1: filecheck_cmd = commands[1] common.verify_filecheck_prefixes(filecheck_cmd) - if not llc_cmd.startswith('llc '): + if llc_tool != 'llc': common.warn('Skipping non-llc RUN line: ' + l) continue @@ -115,7 +116,7 @@ def main(): common.warn('Skipping non-FileChecked RUN line: ' + l) continue - llc_cmd_args = llc_cmd[len('llc'):].strip() + llc_cmd_args = llc_cmd[len(llc_tool):].strip() llc_cmd_args = llc_cmd_args.replace('< %s', '').replace('%s', '').strip() check_prefixes = [item for m in common.CHECK_PREFIX_RE.finditer(filecheck_cmd) @@ -134,7 +135,7 @@ def main(): func_dict.update({prefix: dict()}) for prefixes, llc_args, triple_in_cmd, march_in_cmd in run_list: if args.verbose: - print('Extracted LLC cmd: llc ' + llc_args, file=sys.stderr) + print('Extracted LLC cmd: ' + llc_tool + ' ' + llc_args, file=sys.stderr) print('Extracted FileCheck prefixes: ' + str(prefixes), file=sys.stderr) raw_tool_output = common.invoke_tool(args.llc_binary, llc_args, test) |