[llvm] r311752 - Teach the llc check updater to recognize the end-of-function comment

Chandler Carruth via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 24 19:32:48 PDT 2017


Author: chandlerc
Date: Thu Aug 24 19:32:48 2017
New Revision: 311752

URL: http://llvm.org/viewvc/llvm-project?rev=311752&view=rev
Log:
Teach the llc check updater to recognize the end-of-function comment
used on Windows and sometimes Darwin. Cleans up generated patterns for
me quite a bit.

Modified:
    llvm/trunk/utils/update_llc_test_checks.py

Modified: llvm/trunk/utils/update_llc_test_checks.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/update_llc_test_checks.py?rev=311752&r1=311751&r2=311752&view=diff
==============================================================================
--- llvm/trunk/utils/update_llc_test_checks.py (original)
+++ llvm/trunk/utils/update_llc_test_checks.py Thu Aug 24 19:32:48 2017
@@ -35,7 +35,7 @@ SCRUB_LOOP_COMMENT_RE = re.compile(
 ASM_FUNCTION_X86_RE = re.compile(
     r'^_?(?P<func>[^:]+):[ \t]*#+[ \t]*@(?P=func)\n[^:]*?'
     r'(?P<body>^##?[ \t]+[^:]+:.*?)\s*'
-    r'^\s*(?:[^:\n]+?:\s*\n\s*\.size|\.cfi_endproc|\.globl|\.comm|\.(?:sub)?section)',
+    r'^\s*(?:[^:\n]+?:\s*\n\s*\.size|\.cfi_endproc|\.globl|\.comm|\.(?:sub)?section|# -- End function)',
     flags=(re.M | re.S))
 SCRUB_X86_SHUFFLES_RE = (
     re.compile(
@@ -49,7 +49,7 @@ ASM_FUNCTION_ARM_RE = re.compile(
         r'^(?P<func>[0-9a-zA-Z_]+):\n' # f: (name of function)
         r'\s+\.fnstart\n' # .fnstart
         r'(?P<body>.*?)\n' # (body of the function)
-        r'.Lfunc_end[0-9]+:', # .Lfunc_end0:
+        r'.Lfunc_end[0-9]+:', # .Lfunc_end0: or # -- End function
         flags=(re.M | re.S))
 
 RUN_LINE_RE = re.compile('^\s*;\s*RUN:\s*(.*)$')




More information about the llvm-commits mailing list