[PATCH] D152070: [2/11][Clang][RISCV] Expand all variants of RVV intrinsic tuple types

Roger Ferrer Ibanez via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 15 10:39:49 PDT 2023


rogfer01 added a comment.

>> Can you check if clang crashes for you?
>
> I am seeing messages related to builtin type, but they do not seem related to RVV builtin types.
>
>   $ touch t.c
>   $ clang -cc1 -triple riscv64 -w -emit-pch -o test.pch t.c
>   $ clang -cc1 -triple riscv64 -w -x c -include-pch test.pch -ast-dump-all /dev/null
>   TranslationUnitDecl 0x60f3f88 <<invalid sloc>> <invalid sloc> <undeserialized declarations>
>   |-TypedefDecl 0x60f4b78 <<invalid sloc>> <invalid sloc> implicit __int128_t '__int128'
>   | `-BuiltinType 0x60f4520 '__int128'
>   |-TypedefDecl 0x60f4be8 <<invalid sloc>> <invalid sloc> implicit __uint128_t 'unsigned __int128'
>   | `-BuiltinType 0x60f4540 'unsigned __int128'
>   |-TypedefDecl 0x60f4ae8 <<invalid sloc>> <invalid sloc> implicit __NSConstantString 'struct __NSConstantString_tag'
>   | `-RecordType 0x60f48c0 'struct __NSConstantString_tag' imported
>   |   `-Record 0x60f4828 '__NSConstantString_tag'
>   `-TypedefDecl 0x60f4c58 <<invalid sloc>> <invalid sloc> implicit __builtin_va_list 'void *'
>     `-PointerType 0x60f47a0 'void *'
>       `-BuiltinType 0x60f3fe0 'void'

Thanks @eopXD.

What I've seen is that the tst stops crashing for me if I disable all the types starting from line 218 in file `clang/include/clang/Basic/RISCVVTypes.def`.

When it doesn't crash, in my case all the registered RVV types are shown in the output

  TranslationUnitDecl 0x14647eb8 <<invalid sloc>> <invalid sloc> <undeserialized declarations>
  |-TypedefDecl 0x14649e00 <<invalid sloc>> <invalid sloc> implicit __int128_t '__int128'
  | `-BuiltinType 0x14648480 '__int128'
  |-TypedefDecl 0x14649e70 <<invalid sloc>> <invalid sloc> implicit __uint128_t 'unsigned __int128'
  | `-BuiltinType 0x146484a0 'unsigned __int128'
  |-TypedefDecl 0x14649d68 <<invalid sloc>> <invalid sloc> implicit __NSConstantString 'struct __NSConstantString_tag'
  | `-RecordType 0x14649b40 'struct __NSConstantString_tag' imported
  |   `-Record 0x14649aa0 '__NSConstantString_tag'
  |-TypedefDecl 0x14649ed0 <<invalid sloc>> <invalid sloc> imported implicit __rvv_int8mf8_t '__rvv_int8mf8_t'
  | `-BuiltinType 0x14648640 '__rvv_int8mf8_t'
  |-TypedefDecl 0x14649f58 <<invalid sloc>> <invalid sloc> imported implicit __rvv_int8mf4_t '__rvv_int8mf4_t'
  | `-BuiltinType 0x14648660 '__rvv_int8mf4_t'
  |-TypedefDecl 0x14649fe0 <<invalid sloc>> <invalid sloc> imported implicit __rvv_int8mf2_t '__rvv_int8mf2_t'
  | `-BuiltinType 0x14648680 '__rvv_int8mf2_t'
  |-TypedefDecl 0x1464a068 <<invalid sloc>> <invalid sloc> imported implicit __rvv_int8m1_t '__rvv_int8m1_t'
  | `-BuiltinType 0x146486a0 '__rvv_int8m1_t'
  |-TypedefDecl 0x1464a0f0 <<invalid sloc>> <invalid sloc> imported implicit __rvv_int8m2_t '__rvv_int8m2_t'
  | `-BuiltinType 0x146486c0 '__rvv_int8m2_t'
  |-TypedefDecl 0x1464a178 <<invalid sloc>> <invalid sloc> imported implicit __rvv_int8m4_t '__rvv_int8m4_t'
  …

Curious that you don't observe this. I'll keep investigating.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D152070



More information about the cfe-commits mailing list