[PATCH] D103435: [PoC][RISCV] Define a symbol flags and a dynamic tag to avoid lazy binding for vector calls.
Hsiangkai Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 31 23:08:13 PDT 2021
HsiangKai created this revision.
HsiangKai added reviewers: asb, kito-cheng, craig.topper, frasercrmck, MaskRay, rogfer01.
Herald added subscribers: StephenFan, vkmr, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, rupprecht, PkmX, the_o, brucehoult, MartinMosbeck, edward-jones, zzheng, jrtc27, shiva0217, niosHD, sabuasal, simoncook, johnrusso, rbar, hiraditya, emaste.
Herald added a reviewer: jhenderson.
HsiangKai requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
This is the primitive work for https://github.com/riscv/riscv-elf-psabi-doc/pull/190.
Functions with vector arguments will use vector registers to pass
arguments, In the dynamic linker resolver, we plan not to save/restore
the vector argument registers for lazy binding efficiency. To avoid
ruining the vector arguments by the dynamic linker resolver, functions
with vector arguments will not go through the resolver.
To achieve the goal, we will annotate the function symbols with
STO_RISCV_VARIANT_CC flag and add DT_RISCV_VARIANT_CC tag in the dynamic
section. For assembler, we add a new directive, .variant_cc, to annotate
the symbol has special calling convention and does not go through the
resolver.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D103435
Files:
llvm/include/llvm/BinaryFormat/DynamicTags.def
llvm/include/llvm/BinaryFormat/ELF.h
llvm/lib/Object/ELF.cpp
llvm/lib/ObjectYAML/ELFYAML.cpp
llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFStreamer.cpp
llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFStreamer.h
llvm/lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.cpp
llvm/lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.h
llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp
llvm/lib/Target/RISCV/RISCVRegisterInfo.cpp
llvm/lib/Target/RISCV/RISCVRegisterInfo.h
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-variant-cc.ll
llvm/test/CodeGen/RISCV/rvv/variant-cc.ll
llvm/test/MC/RISCV/directive-variant_cc-err.s
llvm/test/MC/RISCV/directive-variant_cc.s
llvm/test/tools/llvm-readobj/ELF/dynamic-tags-machine-specific.test
llvm/test/tools/llvm-readobj/ELF/riscv-symbols-stother.test
llvm/test/tools/obj2yaml/ELF/riscv-sym-other.yaml
llvm/tools/llvm-readobj/ELFDumper.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103435.348885.patch
Type: text/x-patch
Size: 20411 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210601/c144094c/attachment.bin>
More information about the llvm-commits
mailing list