[PATCH] D68153: Make IR labels more precise

David Greene via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 27 12:09:41 PDT 2019


greened created this revision.
greened added reviewers: xbolva00, craig.topper, RKSimon, gbedwell, rogfer01, MaskRay, arichardson.
greened added a project: LLVM.
Herald added a subscriber: llvm-commits.

Previous IR labels were defined as "@<func>(". This causes problemscbecause that sequence shows up in calls as well as functioncdefinitions. Constrain the labels a bit more by including the define keyword and matching the text before the function name.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D68153

Files:
  llvm/utils/UpdateTestChecks/common.py


Index: llvm/utils/UpdateTestChecks/common.py
===================================================================
--- llvm/utils/UpdateTestChecks/common.py
+++ llvm/utils/UpdateTestChecks/common.py
@@ -273,7 +273,8 @@
 def add_ir_checks(output_lines, comment_marker, prefix_list, func_dict,
                   func_name, preserve_names):
   # Label format is based on IR string.
-  check_label_format = '{} %s-LABEL: @%s('.format(comment_marker)
+  function_def_regex = 'define {{[^@]+}}'
+  check_label_format = '{} %s-LABEL: {}@%s('.format(comment_marker, function_def_regex)
   add_checks(output_lines, comment_marker, prefix_list, func_dict, func_name,
              check_label_format, False, preserve_names)
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68153.222220.patch
Type: text/x-patch
Size: 715 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190927/7389e01b/attachment.bin>


More information about the llvm-commits mailing list