[llvm] 8cc6f5b - [NFC][update_llc_test_checks] Remove the redundant SCRUB_LOOP_COMMENT_RE in asm.py

Kang Zhang via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 2 02:49:18 PDT 2020


Author: Kang Zhang
Date: 2020-04-02T09:46:45Z
New Revision: 8cc6f5beb816bac152cf170daaa611028124d1cd

URL: https://github.com/llvm/llvm-project/commit/8cc6f5beb816bac152cf170daaa611028124d1cd
DIFF: https://github.com/llvm/llvm-project/commit/8cc6f5beb816bac152cf170daaa611028124d1cd.diff

LOG: [NFC][update_llc_test_checks] Remove the redundant SCRUB_LOOP_COMMENT_RE in asm.py

Summary:
In the patch: https://reviews.llvm.org/D42654
De-duplicate utils/update_{llc_,}test_checks.py, Some common part has
been move to common.py. The SCRUB_LOOP_COMMENT_RE has been moved to
common.py, but forgetting to remove from asm.py.
This patch is to remove the redundant SCRUB_LOOP_COMMENT_RE in asm.py
and use common.SCRUB_LOOP_COMMENT_RE.

Added: 
    

Modified: 
    llvm/utils/UpdateTestChecks/asm.py

Removed: 
    


################################################################################
diff  --git a/llvm/utils/UpdateTestChecks/asm.py b/llvm/utils/UpdateTestChecks/asm.py
index ea416ed25bdc..68f826ec8571 100644
--- a/llvm/utils/UpdateTestChecks/asm.py
+++ b/llvm/utils/UpdateTestChecks/asm.py
@@ -140,10 +140,6 @@ class string:
     r'^\s*(\.Lfunc_end[0-9]+:\n|end_function)',
     flags=(re.M | re.S))
 
-
-SCRUB_LOOP_COMMENT_RE = re.compile(
-    r'# =>This Inner Loop Header:.*|# in Loop:.*', flags=re.M)
-
 SCRUB_X86_SHUFFLES_RE = (
     re.compile(
         r'^(\s*\w+) [^#\n]+#+ ((?:[xyz]mm\d+|mem)( \{%k\d+\}( \{z\})?)? = .*)$',
@@ -234,7 +230,7 @@ def scrub_asm_powerpc(asm, args):
   # Expand the tabs used for indentation.
   asm = string.expandtabs(asm, 2)
   # Stripe unimportant comments, but leave the token '#' in place.
-  asm = SCRUB_LOOP_COMMENT_RE.sub(r'#', asm)
+  asm = common.SCRUB_LOOP_COMMENT_RE.sub(r'#', asm)
   # Strip trailing whitespace.
   asm = common.SCRUB_TRAILING_WHITESPACE_RE.sub(r'', asm)
   return asm


        


More information about the llvm-commits mailing list