[PATCH] D100611: [RISCV] Add new attribute __clang_riscv_builtin_alias for intrinsics.

Hsiangkai Wang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 15 18:28:51 PDT 2021


HsiangKai created this revision.
HsiangKai added reviewers: craig.topper, rogfer01, khchen, evandro, frasercrmck.
Herald added subscribers: StephenFan, vkmr, jdoerfert, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, asb.
Herald added a reviewer: aaron.ballman.
HsiangKai requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay.
Herald added a project: clang.

There are overloaded version for vector intrinsics. Currently, we use
function wrapper and __overloadable__ attributes for them. It increases
the build/test time a lot.

In this patch, we define __clang_riscv_builtin_alias for RISC-V
intrinsics and use this attribute to map the overloaded version to the
corresponding builtins.

In our downstream testing, it could decrease the testing time from 6.3
seconds to 3.7 seconds for vloxei.c test.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D100611

Files:
  clang/include/clang/Basic/Attr.td
  clang/include/clang/Basic/AttrDocs.td
  clang/include/clang/Basic/DiagnosticSemaKinds.td
  clang/lib/AST/Decl.cpp
  clang/lib/Sema/SemaDeclAttr.cpp
  clang/test/CodeGen/RISCV/riscv-attr-builtin-alias.c
  clang/test/Misc/pragma-attribute-supported-attributes-list.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100611.337963.patch
Type: text/x-patch
Size: 8217 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210416/a60e6ad2/attachment.bin>


More information about the cfe-commits mailing list