[PATCH] D56259: python compat - map/filter
serge via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 3 03:25:38 PST 2019
serge-sans-paille created this revision.
serge-sans-paille added a reviewer: michaelplatings.
Herald added a subscriber: llvm-commits.
Repository:
rL LLVM
https://reviews.llvm.org/D56259
Files:
tools/opt-viewer/optpmap.py
utils/schedcover.py
Index: utils/schedcover.py
===================================================================
--- utils/schedcover.py
+++ utils/schedcover.py
@@ -39,7 +39,7 @@
ordered_table = sorted(table.items(), key=operator.itemgetter(0))
ordered_models = ["itinerary", "default"]
ordered_models.extend(sorted(models))
- ordered_models = filter(filter_model, ordered_models)
+ ordered_models = [m for m in ordered_models if filter_model(m)]
# print header
sys.stdout.write("instruction")
Index: tools/opt-viewer/optpmap.py
===================================================================
--- tools/opt-viewer/optpmap.py
+++ tools/opt-viewer/optpmap.py
@@ -42,7 +42,7 @@
func_and_args = [(func, arg, should_print_progress,) for arg in iterable]
if processes == 1:
- result = map(_wrapped_func, func_and_args, *args, **kwargs)
+ result = list(map(_wrapped_func, func_and_args, *args, **kwargs))
else:
pool = multiprocessing.Pool(initializer=_init,
initargs=(_current, _total,),
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56259.180022.patch
Type: text/x-patch
Size: 1078 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190103/aa44822f/attachment.bin>
More information about the llvm-commits
mailing list