[PATCH] D48001: [Utils] update_llc_test_checks.py: support AMDGPU backend: AMDGCN, r600 triples
Phabricator via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 11 02:24:39 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL334396: [Utils] update_llc_test_checks.py: support AMDGPU backend: AMDGCN, r600 triples (authored by lebedevri, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D48001?vs=150684&id=150696#toc
Repository:
rL LLVM
https://reviews.llvm.org/D48001
Files:
llvm/trunk/utils/UpdateTestChecks/asm.py
Index: llvm/trunk/utils/UpdateTestChecks/asm.py
===================================================================
--- llvm/trunk/utils/UpdateTestChecks/asm.py
+++ llvm/trunk/utils/UpdateTestChecks/asm.py
@@ -34,6 +34,13 @@
r'.Lfunc_end[0-9]+:\n',
flags=(re.M | re.S))
+ASM_FUNCTION_AMDGPU_RE = re.compile(
+ r'^_?(?P<func>[^:]+):[ \t]*;+[ \t]*@(?P=func)\n[^:]*?'
+ r'(?P<body>.*?)\n' # (body of the function)
+ # This list is incomplete
+ r'.Lfunc_end[0-9]+:\n',
+ flags=(re.M | re.S))
+
ASM_FUNCTION_MIPS_RE = re.compile(
r'^_?(?P<func>[^:]+):[ \t]*#+[ \t]*@(?P=func)\n[^:]*?' # f: (name of func)
r'(?:^[ \t]+\.(frame|f?mask|set).*?\n)+' # Mips+LLVM standard asm prologue
@@ -116,6 +123,16 @@
asm = common.SCRUB_TRAILING_WHITESPACE_RE.sub(r'', asm)
return asm
+def scrub_asm_amdgpu(asm, args):
+ # Scrub runs of whitespace out of the assembly, but leave the leading
+ # whitespace in place.
+ asm = common.SCRUB_WHITESPACE_RE.sub(r' ', asm)
+ # Expand the tabs used for indentation.
+ asm = string.expandtabs(asm, 2)
+ # Strip trailing whitespace.
+ asm = common.SCRUB_TRAILING_WHITESPACE_RE.sub(r'', asm)
+ return asm
+
def scrub_asm_arm_eabi(asm, args):
# Scrub runs of whitespace out of the assembly, but leave the leading
# whitespace in place.
@@ -188,6 +205,8 @@
'x86': (scrub_asm_x86, ASM_FUNCTION_X86_RE),
'i386': (scrub_asm_x86, ASM_FUNCTION_X86_RE),
'aarch64': (scrub_asm_arm_eabi, ASM_FUNCTION_AARCH64_RE),
+ 'r600': (scrub_asm_amdgpu, ASM_FUNCTION_AMDGPU_RE),
+ 'amdgcn': (scrub_asm_amdgpu, ASM_FUNCTION_AMDGPU_RE),
'arm-eabi': (scrub_asm_arm_eabi, ASM_FUNCTION_ARM_RE),
'thumb-eabi': (scrub_asm_arm_eabi, ASM_FUNCTION_ARM_RE),
'thumbv6': (scrub_asm_arm_eabi, ASM_FUNCTION_ARM_RE),
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48001.150696.patch
Type: text/x-patch
Size: 1813 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180611/df0233eb/attachment.bin>
More information about the llvm-commits
mailing list