summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorGreg Bedwell <greg_bedwell@sn.scee.net>2018-04-20 11:38:11 +0000
committerGreg Bedwell <greg_bedwell@sn.scee.net>2018-04-20 11:38:11 +0000
commitd22b35b48ce2b24917ec7c220958a60a2c7c83f7 (patch)
tree3d762aeb3ee5b548806574f24bcab20106fc41d9 /llvm
parent690dcf12c286548cebb1bb9c50762c33bc651eca (diff)
downloadbcm5719-llvm-d22b35b48ce2b24917ec7c220958a60a2c7c83f7.tar.gz
bcm5719-llvm-d22b35b48ce2b24917ec7c220958a60a2c7c83f7.zip
[UpdateTestChecks] Fix update_mca_test_checks.py slowness issue
The script was using Python's difflib module to calculate the number of lines changed so that it could report it in its status output. It turns out this can be very very slow on large sets of lines (Python bug 6931). It's not worth the cost, so just remove the usage of difflib entirely. llvm-svn: 330419
Diffstat (limited to 'llvm')
-rw-r--r--llvm/utils/update_mca_test_checks.py9
1 files changed, 1 insertions, 8 deletions
diff --git a/llvm/utils/update_mca_test_checks.py b/llvm/utils/update_mca_test_checks.py
index 34442030454..4f75696bdbc 100644
--- a/llvm/utils/update_mca_test_checks.py
+++ b/llvm/utils/update_mca_test_checks.py
@@ -8,7 +8,6 @@ FileCheck patterns.
import argparse
from collections import defaultdict
-import difflib
import glob
import os
import sys
@@ -313,13 +312,7 @@ def _write_output(test_path, input_lines, prefix_list, block_infos, # noqa
if input_lines == output_lines:
sys.stderr.write(' [unchanged]\n')
return
-
- diff = list(difflib.Differ().compare(input_lines, output_lines))
- sys.stderr.write(
- ' [{} lines total ({} added, {} removed)]\n'.format(
- len(output_lines),
- len([l for l in diff if l[0] == '+']),
- len([l for l in diff if l[0] == '-'])))
+ sys.stderr.write(' [{} lines total]\n'.format(len(output_lines)))
if args.verbose:
sys.stderr.write(
OpenPOWER on IntegriCloud