[PATCH] D141650: [VectorUtils] Enhance VFABI demangling API

Richard Sandiford via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 26 15:03:25 PST 2023


rsandifo-arm added a comment.

I'm just responding to the above without having full context, so sorry if this is rehashing old discussions.

I agree with @fpetrogalli (hi!) that the intention probably wasn't to exclude parameterless functions.  I suppose we should extend the grammar rule:

  <parameters> := <parameter> { <parameter> }

to:

  <parameters> := [<parameter> <parameters>]

But we don't have the equivalent of X86's:

  d) If none of the above three cases is applicable, the CDT is int.

And I think that might have been deliberate.  The X86 definition means that:

  #pragma omp declare simd
  void f(void);

is valid and produces multiple masked and unmasked versions (confirmed with GCC, whose implementation I'm more familiar with).  But it isn't clear to me how such a function would be used, or how one would decide which vector ISA and vlen is the best fit.  If there are well-defined semantics for this then perhaps we should change the AArch64 definition to allow it.  But if there aren't well-defined semantics for it then it probably makes sense to keep things as they are.

So if it's just a question of whether the AArch64 ABI allows **some** parameterless functions, then like @fpetrogalli says, I think it does/should.  But as it stands, there are some combinations that can be successfully demangled, but would never actually result from a valid `#pragma`.  That includes the combination of a `void` return and no parameter types.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141650/new/

https://reviews.llvm.org/D141650



More information about the llvm-commits mailing list