[PATCH] D109372: [RISCV][RFC] Add Clang support for RISC-V overlay system

Edward Jones via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 7 09:59:45 PDT 2021


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

This is the Clang component of a change to add support for a proposed 'overlay' system for RISC-V to LLVM.

This adds two new attributes, __attribute__((overlaydata)), and __attribute__((overlaycall)), which are used to mark functions or global data as only accessible through the overlay engine. Internally they are converted to 'overlay-data' and 'overlay-call' attributes in LLVM IR.

This change also adds the option `-fcomrv` to enable use of the overlay system. This has the effect of reserving registers x28, x29, x30 and x31 for exclusive used by the overlay engine.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D109372

Files:
  clang/include/clang/Basic/Attr.td
  clang/include/clang/Basic/AttrDocs.td
  clang/include/clang/Basic/DiagnosticDriverKinds.td
  clang/include/clang/Basic/DiagnosticSemaKinds.td
  clang/include/clang/Basic/LangOptions.def
  clang/include/clang/Driver/Options.td
  clang/lib/AST/TypePrinter.cpp
  clang/lib/CodeGen/CGCall.cpp
  clang/lib/CodeGen/CodeGenModule.cpp
  clang/lib/Driver/ToolChains/Arch/RISCV.cpp
  clang/lib/Driver/ToolChains/Clang.cpp
  clang/lib/Driver/ToolChains/CommonArgs.cpp
  clang/lib/Driver/ToolChains/RISCVToolchain.cpp
  clang/lib/Frontend/CompilerInvocation.cpp
  clang/lib/Sema/SemaDecl.cpp
  clang/lib/Sema/SemaDeclAttr.cpp
  clang/test/CodeGen/riscv-overlaycall.c
  clang/test/Driver/riscv-comrv.c
  clang/test/Misc/pragma-attribute-supported-attributes-list.test
  clang/test/Sema/attr-overlaycall.c
  clang/test/Sema/riscv-overlaycall-namespace.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109372.371111.patch
Type: text/x-patch
Size: 17311 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210907/48b601b9/attachment-0001.bin>


More information about the cfe-commits mailing list