Offloading sections can be embedded in the host during codegen via a
section. This section was originally marked as metadata to prevent it
from being loaded, but these sections are completely unused at runtime
so the linker should automatically drop them from the final executable
or shard library. This flag adds support for the SHF_EXCLUDE flag in
target lowering and uses it.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
I think we need tests for coff and elf for the MC part, should be existing ones for the other flags. Ideal fit for the openmp sectiy, good find. Inclined to ignore the formatting warnings on old code.
llvm/include/llvm/MC/SectionKind.h | ||
---|---|---|
27 | https://llvm.org/docs/CodingStandards.html#doxygen-use-in-documentation-comments "Don’t duplicate function or class name at the beginning of the comment." It may help to add "(ELF specific)". |
llvm/include/llvm/MC/SectionKind.h | ||
---|---|---|
27 | Yes, this only works for COFF and ELF so that should probably be documented. As for the style I'm just keeping it consistent with what's already here. I could make a follow-up patch to clean it but I figured it would add unnecessary noise to this one. |
llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | ||
---|---|---|
452 | getMetadata() | getExclude(). SHF_EXCLUDE is orthogonal to SHF_ALLOC. |
llvm/test/CodeGen/X86/offload_sections.ll | ||
---|---|---|
7–8 | Remove -DAG. There is no other line for testing. If there is other stuff after "e", check that. If there isn't any, append {{$}} |
https://llvm.org/docs/CodingStandards.html#doxygen-use-in-documentation-comments "Don’t duplicate function or class name at the beginning of the comment."
It may help to add "(ELF specific)".