Skip to content

Commit 23892e1

Browse files
committed
Merge remote-tracking branch 'upstream/sycl' into jakub/amd_sub_group_warning
2 parents 7076bdd + d2719b5 commit 23892e1

File tree

3,293 files changed

+89438
-38430
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,293 files changed

+89438
-38430
lines changed

.github/CODEOWNERS

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,14 @@ sycl/doc/design/ @intel/llvm-reviewers-runtime
3434
sycl/doc/design/spirv-extensions/ @intel/dpcpp-spirv-doc-reviewers
3535
sycl/doc/extensions/ @intel/dpcpp-specification-reviewers
3636

37-
# Level Zero plugin
38-
sycl/plugins/level_zero/ @intel/dpcpp-l0-pi-reviewers
39-
sycl/test-e2e/Plugin/*level-zero* @intel/dpcpp-l0-pi-reviewers
40-
41-
# Unified Runtime plugin
42-
sycl/plugins/unified_runtime/ @intel/dpcpp-l0-pi-reviewers
37+
# Unified Runtime
38+
sycl/plugins @intel/unified-runtime-reviewers
39+
sycl/test-e2e/Plugin/ @intel/unified-runtime-reviewers
40+
41+
# Win Proxy Loader
42+
sycl/pi_win_proxy_loader @intel/llvm-reviewers-runtime
43+
sycl/plugins/common_win_pi_trace @intel/llvm-reviewers-runtime
44+
sycl/test-e2e/Plugin/dll-detach-order.cpp @intel/llvm-reviewers-runtime
4345

4446
# CUDA and HIP plugins
4547
sycl/plugins/**/cuda/ @intel/llvm-reviewers-cuda

.github/workflows/docs.yml

Lines changed: 78 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,60 @@ on:
1515
paths:
1616
- 'llvm/docs/**'
1717
- 'clang/docs/**'
18+
- 'clang-tools-extra/docs/**'
19+
- 'lldb/docs/**'
20+
- 'libunwind/docs/**'
21+
- 'libcxx/docs/**'
22+
- 'libc/docs/**'
23+
- 'lld/docs/**'
1824
pull_request:
1925
paths:
2026
- 'llvm/docs/**'
2127
- 'clang/docs/**'
28+
- 'clang-tools-extra/docs/**'
29+
- 'lldb/docs/**'
30+
- 'libunwind/docs/**'
31+
- 'libcxx/docs/**'
32+
- 'libc/docs/**'
33+
- 'lld/docs/**'
2234

2335
jobs:
2436
check-docs-build:
2537
name: "Test documentation build"
2638
runs-on: ubuntu-latest
2739
steps:
28-
- name: Fetch LLVM sources
40+
# Don't fetch before checking for file changes to force the file changes
41+
# action to use the Github API in pull requests. If it's a push to a
42+
# branch we can't use the Github API to get the diff, so we need to have
43+
# a local checkout beforehand.
44+
- name: Fetch LLVM sources (Push)
45+
if: ${{ github.event_name == 'push' }}
46+
uses: actions/checkout@v4
47+
with:
48+
fetch-depth: 1
49+
- name: Get subprojects that have doc changes
50+
id: docs-changed-subprojects
51+
uses: tj-actions/changed-files@v39
52+
with:
53+
files_yaml: |
54+
llvm:
55+
- 'llvm/docs/**'
56+
clang:
57+
- 'clang/docs/**'
58+
clang-tools-extra:
59+
- 'clang-tools-extra/docs/**'
60+
lldb:
61+
- 'lldb/docs/**'
62+
libunwind:
63+
- 'libunwind/docs/**'
64+
libcxx:
65+
- 'libcxx/docs/**'
66+
libc:
67+
- 'libc/docs/**'
68+
lld:
69+
- 'lld/docs/**'
70+
- name: Fetch LLVM sources (PR)
71+
if: ${{ github.event_name == 'pull_request' }}
2972
uses: actions/checkout@v4
3073
with:
3174
fetch-depth: 1
@@ -40,24 +83,46 @@ jobs:
4083
- name: Install system dependencies
4184
run: |
4285
sudo apt-get update
43-
sudo apt-get install -y cmake ninja-build
44-
- name: Get subprojects that have doc changes
45-
id: docs-changed-subprojects
46-
uses: tj-actions/changed-files@v39
47-
with:
48-
files_yaml: |
49-
llvm:
50-
- 'llvm/docs/**'
51-
clang:
52-
- 'clang/docs/**'
86+
# swig and graphviz are lldb specific dependencies
87+
sudo apt-get install -y cmake ninja-build swig graphviz
5388
- name: Build LLVM docs
5489
if: steps.docs-changed-subprojects.outputs.llvm_any_changed == 'true'
5590
run: |
56-
cmake -B llvm-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_SPHINX=ON -DSPHINX_OUTPUT_HTML=ON -DSPHINX_OUTPUT_MAN=ON ./llvm
91+
cmake -B llvm-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_SPHINX=ON ./llvm
5792
TZ=UTC ninja -C llvm-build docs-llvm-html docs-llvm-man
5893
- name: Build Clang docs
5994
if: steps.docs-changed-subprojects.outputs.clang_any_changed == 'true'
6095
run: |
61-
cmake -B clang-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="clang" -DLLVM_ENABLE_SPHINX=ON -DSPHINX_OUTPUT_HTML=ON -DSPHINX_OUTPUT_MAN=ON ./llvm
96+
cmake -B clang-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="clang" -DLLVM_ENABLE_SPHINX=ON ./llvm
6297
TZ=UTC ninja -C clang-build docs-clang-html docs-clang-man
98+
- name: Build clang-tools-extra docs
99+
if: steps.docs-changed-subprojects.outputs.clang-tools-extra_any_changed == 'true'
100+
run: |
101+
cmake -B clang-tools-extra-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" -DLLVM_ENABLE_SPHINX=ON ./llvm
102+
TZ=UTC ninja -C clang-tools-extra-build docs-clang-tools-html docs-clang-tools-man
103+
- name: Build LLDB docs
104+
if: steps.docs-changed-subprojects.outputs.lldb_any_changed == 'true'
105+
run: |
106+
cmake -B lldb-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="clang;lldb" -DLLVM_ENABLE_SPHINX=ON ./llvm
107+
TZ=UTC ninja -C lldb-build docs-lldb-html docs-lldb-man
108+
- name: Build libunwind docs
109+
if: steps.docs-changed-subprojects.outputs.libunwind_any_changed == 'true'
110+
run: |
111+
cmake -B libunwind-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_RUNTIMES="libunwind" -DLLVM_ENABLE_SPHINX=ON ./runtimes
112+
TZ=UTC ninja -C libunwind-build docs-libunwind-html
113+
- name: Build libcxx docs
114+
if: steps.docs-changed-subprojects.outputs.libcxx_any_changed == 'true'
115+
run: |
116+
cmake -B libcxx-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_RUNTIMES="libcxxabi;libcxx" -DLLVM_ENABLE_SPHINX=ON ./runtimes
117+
TZ=UTC ninja -C libcxx-build docs-libcxx-html
118+
- name: Build libc docs
119+
if: steps.docs-changed-subprojects.outputs.libc_any_changed == 'true'
120+
run: |
121+
cmake -B libc-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_RUNTIMES="libc" -DLLVM_ENABLE_SPHINX=ON ./runtimes
122+
TZ=UTC ninja -C libc-build docs-libc-html
123+
- name: Build LLD docs
124+
if: steps.docs-changed-subprojects.outputs.lld_any_changed == 'true'
125+
run: |
126+
cmake -B lld-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="lld" -DLLVM_ENABLE_SPHINX=ON ./llvm
127+
TZ=UTC ninja -C lld-build docs-lld-html
63128

.github/workflows/gh_pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Install deps
2323
run: |
2424
sudo apt-get install -y doxygen graphviz ssh ninja-build
25-
sudo pip3 install 'sphinx==4.2.0' 'myst-parser==0.15.1' 'recommonmark==0.7.1'
25+
sudo pip3 install -r repo/llvm/docs/requirements.txt
2626
- name: Build Docs
2727
run: |
2828
mkdir -p $GITHUB_WORKSPACE/build

.github/workflows/libcxx-check-generated-files.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
paths:
55
- 'libcxx/**'
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
check_generated_files:
912
runs-on: ubuntu-latest

.github/workflows/release-tasks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
./llvm/utils/release/github-upload-release.py --token ${{ github.token }} --release ${{ steps.validate-tag.outputs.release-version }} upload --files ./*doxygen*.tar.xz
4949
5050
- name: Create Release Notes Artifact
51-
uses: actions/download-artifact@v3
51+
uses: actions/upload-artifact@v3
5252
with:
5353
name: release-notes
5454
path: docs-build/html-export/

bolt/include/bolt/Core/AddressMap.h

Lines changed: 35 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,16 @@
66
//
77
//===----------------------------------------------------------------------===//
88
//
9-
// Helper class to create a mapping from input to output addresses needed for
10-
// updating debugging symbols and BAT. We emit an MCSection containing
11-
// <Input address, Output MCSymbol> pairs to the object file and JITLink will
12-
// transform this in <Input address, Output address> pairs. The linker output
13-
// can then be parsed and used to establish the mapping.
9+
// This file contains the declaration of the AddressMap class used for looking
10+
// up addresses in the output object.
1411
//
1512
//===----------------------------------------------------------------------===//
16-
//
13+
1714
#ifndef BOLT_CORE_ADDRESS_MAP_H
1815
#define BOLT_CORE_ADDRESS_MAP_H
1916

2017
#include "llvm/ADT/StringRef.h"
18+
#include "llvm/MC/MCSymbol.h"
2119

2220
#include <optional>
2321
#include <unordered_map>
@@ -30,26 +28,48 @@ namespace bolt {
3028

3129
class BinaryContext;
3230

31+
/// Helper class to create a mapping from input entities to output addresses
32+
/// needed for updating debugging symbols and BAT. We emit a section containing
33+
/// <Input entity, Output MCSymbol> pairs to the object file and JITLink will
34+
/// transform this in <Input entity, Output address> pairs. The linker output
35+
/// can then be parsed and used to establish the mapping.
36+
///
37+
/// The entities that can be mapped to output address are input addresses and
38+
/// labels (MCSymbol). Input addresses support one-to-many mapping.
3339
class AddressMap {
34-
using MapTy = std::unordered_multimap<uint64_t, uint64_t>;
35-
MapTy Map;
40+
static const char *const AddressSectionName;
41+
static const char *const LabelSectionName;
3642

37-
public:
38-
static const char *const SectionName;
43+
/// Map multiple <input address> to <output address>.
44+
using Addr2AddrMapTy = std::unordered_multimap<uint64_t, uint64_t>;
45+
Addr2AddrMapTy Address2AddressMap;
3946

47+
/// Map MCSymbol to its output address. Normally used for temp symbols that
48+
/// are not updated by the linker.
49+
using Label2AddrMapTy = DenseMap<const MCSymbol *, uint64_t>;
50+
Label2AddrMapTy Label2AddrMap;
51+
52+
public:
4053
static void emit(MCStreamer &Streamer, BinaryContext &BC);
41-
static AddressMap parse(StringRef Buffer, const BinaryContext &BC);
54+
static std::optional<AddressMap> parse(BinaryContext &BC);
4255

4356
std::optional<uint64_t> lookup(uint64_t InputAddress) const {
44-
auto It = Map.find(InputAddress);
45-
if (It != Map.end())
57+
auto It = Address2AddressMap.find(InputAddress);
58+
if (It != Address2AddressMap.end())
59+
return It->second;
60+
return std::nullopt;
61+
}
62+
63+
std::optional<uint64_t> lookup(const MCSymbol *Symbol) const {
64+
auto It = Label2AddrMap.find(Symbol);
65+
if (It != Label2AddrMap.end())
4666
return It->second;
4767
return std::nullopt;
4868
}
4969

50-
std::pair<MapTy::const_iterator, MapTy::const_iterator>
70+
std::pair<Addr2AddrMapTy::const_iterator, Addr2AddrMapTy::const_iterator>
5171
lookupAll(uint64_t InputAddress) const {
52-
return Map.equal_range(InputAddress);
72+
return Address2AddressMap.equal_range(InputAddress);
5373
}
5474
};
5575

bolt/include/bolt/Core/BinaryFunction.h

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1721,14 +1721,7 @@ class BinaryFunction {
17211721
// Align data in code BFs minimum to CI alignment
17221722
if (!size() && hasIslandsInfo())
17231723
return getConstantIslandAlignment();
1724-
1725-
// Minimal code alignment on AArch64 and RISCV is 4
1726-
if (BC.isAArch64() || BC.isRISCV())
1727-
return 4;
1728-
1729-
// We have to use at least 2-byte alignment for functions because
1730-
// of C++ ABI.
1731-
return 2;
1724+
return BC.MIB->getMinFunctionAlignment();
17321725
}
17331726

17341727
Align getMinAlign() const { return Align(getMinAlignment()); }

bolt/include/bolt/Core/MCPlusBuilder.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2077,6 +2077,12 @@ class MCPlusBuilder {
20772077
return BlocksVectorTy();
20782078
}
20792079

2080+
virtual uint16_t getMinFunctionAlignment() const {
2081+
// We have to use at least 2-byte alignment for functions because of C++
2082+
// ABI.
2083+
return 2;
2084+
}
2085+
20802086
// AliasMap caches a mapping of registers to the set of registers that
20812087
// alias (are sub or superregs of itself, including itself).
20822088
std::vector<BitVector> AliasMap;

0 commit comments

Comments
 (0)