2022-09-15: Dev Meeting round table, LTO, libc initialization
Participants
-
Teresa Johnson
-
Todd Snider
-
Prabhu Rajasekaran
-
rouxy
-
Simon Wallis
-
Michael Jones
-
Siva Chandra
-
Daniel Thornburgh
-
Stephen Hines
-
Guillot Tony
-
Petr Hosek
-
Tue Ly
-
Pirama
-
Peter Smith
-
Simon Butcher
-
Zoltan Lipp
-
Volodymyr Turanskyy
Agenda
- LTO for embedded use cases. Some background from LLVM Dev Meeting 2017 https://llvm.org/devmtg/2017-10/slides/LTOLinkerScriptsEdlerVonKoch.pdf 2
- Follow up on the multilib support design discussion from last time.
- Round table in LLVM Dev Meeting.
- LLVM libc initialization for embedded by Peter Smith LLVM libc embedded systems and initialization (LLVM embdedded toolchain meeting)
Discussion
Multilib support
- No updates.
Round table in LLVM Dev Meeting
-
The LLVM Compiler Infrastructure Project Nov 8-9, 2022
-
Who is going?
-
Siva, Prabhu, Petr, others - would be nice to have a discussion in person.
-
Arm: Volodymyr will check, if anyone is going.
-
-
Action item for all to highlight to colleagues and suggest to join.
-
Volodymyr to cancel the call in the same week - done, removed from the Google calendar.
LTO for embedded
-
Background - link to slides in the agenda.
-
Recent discussion Linker generated attributes for LTO - does lld already do this?
-
Issues to address:
-
Cannot inline across output sections => add information about output sections to inform the linker.
-
How to place sections at particular addresses => extend IR with information about named sections to pass to LTO and take into account.
-
So changes are likely required in both IR and LLD.
-
-
There are known downstream implementations, but nothing in upstream yet.
-
Teresa (co-author of ThinLTO):
-
Many changes are not LTO specific - are required in other generic passes.
-
The patches from the 2017 presentation were not published, so need to start from scratch? Or check if anyone from Qualcomm can share the patches.
-
The changes are expected to be accepted upstream without major concerns.
-
-
Todd (author of the Discrose thread above): Work done at TI, IR is extended to implement mentioned features.
-
Teresa: would be easier to go without IR modification in the linker to keep the existing interface.
-
Todd: would it make sense to have a special “embedded” type of LTO?
-
Teresa/Petr: a recent relevant discussion about fat-lto-objects [RFC] -ffat-lto-objects support + WIP patch ⚙ D131618 [WIP][Do NOT review] LLD related changes for -ffat-lto-objects support
-
Arm linker wraps IR into ELF files to make library selection easier, but this seems to be a too specific solution for the Arm Compiler toolchain.
LLVM libc initialization (Peter)
-
Discourse post in the agenda.
-
picolibc approach presented there can be reused for simple configurations and may be a good starting point for LLVM libc enablement.
-
Eventually it would be good to have a sort of template for different types of embedded targets.
-
Siva: Looks good. Now we need to provide the examples.
-
Question: Testing strategy for such code? We could use QEMU.