[llvm] r311795 - [utils] add aarch64 target as an option

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 10 05:58:59 PDT 2017


Yes - the specific case I was looking at had unwind info, so I didn't
notice the deficiency. We should be able to cut and paste another clause
from x86 or some other target.

Please feel free to make the script better for aarch or any other targets
you're interested in. Thanks!

On Tue, Oct 10, 2017 at 5:46 AM, Alex Bradbury <asb at asbradbury.org> wrote:

> On 25 August 2017 at 20:33, Sanjay Patel via llvm-commits
> <llvm-commits at lists.llvm.org> wrote:
> > Author: spatel
> > Date: Fri Aug 25 12:33:18 2017
> > New Revision: 311795
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=311795&view=rev
> > Log:
> > [utils] add aarch64 target as an option
> >
> > I don't know enough to add a custom scrubber for AArch64, so I just
> re-used ARM.
> >
> >
> > 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=311795&r1=311794&r2=311795&view=diff
> > ============================================================
> ==================
> > --- llvm/trunk/utils/update_llc_test_checks.py (original)
> > +++ llvm/trunk/utils/update_llc_test_checks.py Fri Aug 25 12:33:18 2017
> > @@ -26,24 +26,11 @@ def llc(args, cmd_args, ir):
> >
> >  # RegEx: this is where the magic happens.
> >
> > -SCRUB_WHITESPACE_RE = re.compile(r'(?!^(|  \w))[ \t]+', flags=re.M)
> > -SCRUB_TRAILING_WHITESPACE_RE = re.compile(r'[ \t]+$', flags=re.M)
> > -SCRUB_KILL_COMMENT_RE = re.compile(r'^ *#+ +kill:.*\n')
> > -SCRUB_LOOP_COMMENT_RE = re.compile(
> > -    r'# =>This Inner Loop Header:.*|# in Loop:.*', flags=re.M)
> > -
> >  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|#
> -- End function)',
> >      flags=(re.M | re.S))
> > -SCRUB_X86_SHUFFLES_RE = (
> > -    re.compile(
> > -        r'^(\s*\w+) [^#\n]+#+ ((?:[xyz]mm\d+|mem)( \{%k\d+\}( \{z\})?)?
> = .*)$',
> > -        flags=re.M))
> > -SCRUB_X86_SP_RE = re.compile(r'\d+\(%(esp|rsp)\)')
> > -SCRUB_X86_RIP_RE = re.compile(r'[.\w]+\(%rip\)')
> > -SCRUB_X86_LCP_RE = re.compile(r'\.LCPI[0-9]+_[0-9]+')
> >
> >  ASM_FUNCTION_ARM_RE = re.compile(
> >          r'^(?P<func>[0-9a-zA-Z_]+):\n' # f: (name of function)
> > @@ -52,12 +39,13 @@ ASM_FUNCTION_ARM_RE = re.compile(
> >          r'.Lfunc_end[0-9]+:', # .Lfunc_end0: or # -- End function
> >          flags=(re.M | re.S))
> >
> > -RUN_LINE_RE = re.compile('^\s*;\s*RUN:\s*(.*)$')
> > -TRIPLE_ARG_RE = re.compile(r'-mtriple=([^ ]+)')
> > -TRIPLE_IR_RE = re.compile(r'^target\s+triple\s*=\s*"([^"]+)"$')
> > -IR_FUNCTION_RE = re.compile('^\s*define\s+(?:
> internal\s+)?[^@]*@(\w+)\s*\(')
> > -CHECK_PREFIX_RE = re.compile('--?check-prefix(?:es)?=(\S+)')
> > -CHECK_RE = re.compile(r'^\s*;\s*([^:]+?)(?:-NEXT|-NOT|-DAG|-LABEL)?:')
> > +ASM_FUNCTION_AARCH64_RE = re.compile(
> > +     r'^_?(?P<func>[^:]+):[ \t]*\/\/[ \t]*@(?P=func)\n'
> > +     r'[ \t]+.cfi_startproc\n'
> > +     r'(?P<body>.*?)\n'
> > +     # This list is incomplete
> > +     r'.Lfunc_end[0-9]+:\n',
> > +     flags=(re.M | re.S))
>
> Isn't this RE going to fail for a function that has the nounwind
> attribute and so has no .cfi_startproc.
>
> Best,
>
> Alex
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171010/dba6436c/attachment.html>


More information about the llvm-commits mailing list