[all-commits] [llvm/llvm-project] cde54d: Add support for PSV EntryFunctionName (#84409)

Amir Ayupov via All-commits all-commits at lists.llvm.org
Thu Mar 21 16:37:25 PDT 2024


  Branch: refs/heads/users/aaupov/spr/bolt-add-bb-index-to-bat
  Home:   https://github.com/llvm/llvm-project
  Commit: cde54df39cab3a1d60a3e1862ab341609bee3cc3
      https://github.com/llvm/llvm-project/commit/cde54df39cab3a1d60a3e1862ab341609bee3cc3
  Author: Cooper Partin <coopp at microsoft.com>
  Date:   2024-03-21 (Thu, 21 Mar 2024)

  Changed paths:
    M llvm/include/llvm/BinaryFormat/DXContainer.h
    M llvm/include/llvm/MC/DXContainerPSVInfo.h
    M llvm/include/llvm/MC/StringTableBuilder.h
    M llvm/include/llvm/Object/DXContainer.h
    M llvm/include/llvm/ObjectYAML/DXContainerYAML.h
    M llvm/lib/MC/DXContainerPSVInfo.cpp
    M llvm/lib/Object/DXContainer.cpp
    M llvm/lib/ObjectYAML/DXContainerEmitter.cpp
    M llvm/lib/ObjectYAML/DXContainerYAML.cpp
    A llvm/test/ObjectYAML/DXContainer/PSVv3-amplification.yaml
    A llvm/test/ObjectYAML/DXContainer/PSVv3-compute.yaml
    A llvm/test/ObjectYAML/DXContainer/PSVv3-domain.yaml
    A llvm/test/ObjectYAML/DXContainer/PSVv3-geometry.yaml
    A llvm/test/ObjectYAML/DXContainer/PSVv3-hull.yaml
    A llvm/test/ObjectYAML/DXContainer/PSVv3-mesh.yaml
    A llvm/test/ObjectYAML/DXContainer/PSVv3-pixel.yaml
    A llvm/test/ObjectYAML/DXContainer/PSVv3-vertex.yaml
    M llvm/tools/obj2yaml/dxcontainer2yaml.cpp

  Log Message:
  -----------
  Add support for PSV EntryFunctionName (#84409)

This change introduces a version 3 of the PSV data that includes support
for the name of the entry function as an offset into StringTable data to
a null-terminated utf-8 string.

Additional tests were added to ensure that the new value was properly
serialized/deserialized from object data.

Fixes #80175

---------

Co-authored-by: Cooper Partin <coopp at ntdev.microsoft.com>


  Commit: b19bf3e888f95c35bf641cd0eee18a8da702f6fe
      https://github.com/llvm/llvm-project/commit/b19bf3e888f95c35bf641cd0eee18a8da702f6fe
  Author: Arthur Eubanks <aeubanks at google.com>
  Date:   2024-03-21 (Thu, 21 Mar 2024)

  Changed paths:
    M clang/lib/Driver/ToolChains/Clang.cpp
    M clang/test/Driver/unsupported-option-gpu.c

  Log Message:
  -----------
  [clang][SPIRV] Don't warn on -mcmodel (#86039)

The code model doesn't affect the sub-compilation, so don't check it.

Followup to #70740.


  Commit: b609a4d7ea8b716f5f0ec83d10945362f42e730d
      https://github.com/llvm/llvm-project/commit/b609a4d7ea8b716f5f0ec83d10945362f42e730d
  Author: alx32 <103613512+alx32 at users.noreply.github.com>
  Date:   2024-03-21 (Thu, 21 Mar 2024)

  Changed paths:
    M lld/MachO/Driver.cpp
    M lld/MachO/InputSection.cpp
    M lld/MachO/InputSection.h
    M lld/MachO/ObjC.cpp
    M lld/MachO/SyntheticSections.cpp

  Log Message:
  -----------
  [lld-macho][NFC] Refactor insertions into inputSections (#85692)

Before this change, after `InputSection` objects are created, they need
to be added to the appropriate container for tracking.
The logic for selecting the appropriate container lives in `Driver.cpp`
/ `gatherInputSections`, where the `InputSection` is added to the
matching container depending on the input config and the type of
`InputSection`.

Also, multiple other locations also insert directly into `inputSections`
array - assuming that that is the appropriate container for the
`InputSection`'s they create. Currently this is the correct assumption,
however an upcoming feature will change this.

For an upcoming feature (relative method lists), we need to route
`InputSection`'s either to `inputSections` array or to a synthetic
section, depending on weather the relative method list optimization is
enabled or not.

We can achieve the above either by duplicating some of the logic or
refactoring the routing and `InputSection`'s and reusing that.

The refactoring & code sharing approach seems the correct way to go - as
such this diff performs the refactoring while not introducing any
functional changes. Later on we can just call `addInputSection` and not
have to worry about routing logic.

---------


  Commit: e4a672ef85f76c3402b81640e1e83e5d3069d1b9
      https://github.com/llvm/llvm-project/commit/e4a672ef85f76c3402b81640e1e83e5d3069d1b9
  Author: alx32 <103613512+alx32 at users.noreply.github.com>
  Date:   2024-03-21 (Thu, 21 Mar 2024)

  Changed paths:
    M lld/MachO/ObjC.cpp

  Log Message:
  -----------
  [lld][macho] Fix gcc category merging warning (#86091)

Fixing gcc warning regarding creating non-null-terminated string:
```
../../lld/MachO/ObjC.cpp:1226:10: warning: 'char* strncpy(char*, const char*, size_t)' output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
 1226 |   strncpy(strData, str, len);
      |   ~~~~~~~^~~~~~~~~~~~~~~~~~~
../../lld/MachO/ObjC.cpp: In member function 'void {anonymous}::ObjcCategoryMerger::emitAndLinkPointerList(lld::macho::Defined*, uint32_t, const {anonymous}::ObjcCategoryMerger::ClassExtensionInfo&, const {anonymous}::ObjcCategoryMerger::PointerListInfo&)':
../../lld/MachO/ObjC.cpp:1223:24: note: length computed here
 1223 |   uint32_t len = strlen(str);
      |                  ~~~~~~^~~~~
```
This is not actually a bug, as `newSectionData` returns a
zero-initialized memory region, so the null terminator will be there.


  Commit: 8be80e458989889556e20bcd843e72beec8f64fe
      https://github.com/llvm/llvm-project/commit/8be80e458989889556e20bcd843e72beec8f64fe
  Author: alx32 <103613512+alx32 at users.noreply.github.com>
  Date:   2024-03-21 (Thu, 21 Mar 2024)

  Changed paths:
    M clang/lib/Driver/ToolChains/Clang.cpp
    M clang/test/Driver/unsupported-option-gpu.c
    M lld/MachO/Driver.cpp
    M lld/MachO/InputSection.cpp
    M lld/MachO/InputSection.h
    M lld/MachO/ObjC.cpp
    M lld/MachO/SyntheticSections.cpp
    M llvm/include/llvm/BinaryFormat/DXContainer.h
    M llvm/include/llvm/MC/DXContainerPSVInfo.h
    M llvm/include/llvm/MC/StringTableBuilder.h
    M llvm/include/llvm/Object/DXContainer.h
    M llvm/include/llvm/ObjectYAML/DXContainerYAML.h
    M llvm/lib/MC/DXContainerPSVInfo.cpp
    M llvm/lib/Object/DXContainer.cpp
    M llvm/lib/ObjectYAML/DXContainerEmitter.cpp
    M llvm/lib/ObjectYAML/DXContainerYAML.cpp
    A llvm/test/ObjectYAML/DXContainer/PSVv3-amplification.yaml
    A llvm/test/ObjectYAML/DXContainer/PSVv3-compute.yaml
    A llvm/test/ObjectYAML/DXContainer/PSVv3-domain.yaml
    A llvm/test/ObjectYAML/DXContainer/PSVv3-geometry.yaml
    A llvm/test/ObjectYAML/DXContainer/PSVv3-hull.yaml
    A llvm/test/ObjectYAML/DXContainer/PSVv3-mesh.yaml
    A llvm/test/ObjectYAML/DXContainer/PSVv3-pixel.yaml
    A llvm/test/ObjectYAML/DXContainer/PSVv3-vertex.yaml
    M llvm/tools/obj2yaml/dxcontainer2yaml.cpp

  Log Message:
  -----------
  [𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.4

[skip ci]


  Commit: 70dc6bb56f107e0f8c5629057e235231e369f06f
      https://github.com/llvm/llvm-project/commit/70dc6bb56f107e0f8c5629057e235231e369f06f
  Author: Amir Ayupov <aaupov at fb.com>
  Date:   2024-03-21 (Thu, 21 Mar 2024)

  Changed paths:
    M bolt/include/bolt/Profile/BoltAddressTranslation.h
    M bolt/lib/Profile/BoltAddressTranslation.cpp
    M bolt/lib/Profile/DataAggregator.cpp
    M clang/lib/Driver/ToolChains/Clang.cpp
    M clang/test/Driver/unsupported-option-gpu.c
    M lld/MachO/Driver.cpp
    M lld/MachO/InputSection.cpp
    M lld/MachO/InputSection.h
    M lld/MachO/ObjC.cpp
    M lld/MachO/SyntheticSections.cpp
    M llvm/include/llvm/BinaryFormat/DXContainer.h
    M llvm/include/llvm/MC/DXContainerPSVInfo.h
    M llvm/include/llvm/MC/StringTableBuilder.h
    M llvm/include/llvm/Object/DXContainer.h
    M llvm/include/llvm/ObjectYAML/DXContainerYAML.h
    M llvm/lib/MC/DXContainerPSVInfo.cpp
    M llvm/lib/Object/DXContainer.cpp
    M llvm/lib/ObjectYAML/DXContainerEmitter.cpp
    M llvm/lib/ObjectYAML/DXContainerYAML.cpp
    A llvm/test/ObjectYAML/DXContainer/PSVv3-amplification.yaml
    A llvm/test/ObjectYAML/DXContainer/PSVv3-compute.yaml
    A llvm/test/ObjectYAML/DXContainer/PSVv3-domain.yaml
    A llvm/test/ObjectYAML/DXContainer/PSVv3-geometry.yaml
    A llvm/test/ObjectYAML/DXContainer/PSVv3-hull.yaml
    A llvm/test/ObjectYAML/DXContainer/PSVv3-mesh.yaml
    A llvm/test/ObjectYAML/DXContainer/PSVv3-pixel.yaml
    A llvm/test/ObjectYAML/DXContainer/PSVv3-vertex.yaml
    M llvm/tools/obj2yaml/dxcontainer2yaml.cpp

  Log Message:
  -----------
  rebase

Created using spr 1.3.4


Compare: https://github.com/llvm/llvm-project/compare/2a97ba165c6e...70dc6bb56f10

To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list