Skip to content

Commit 713df01

Browse files
Merge remote-tracking branch 'upstream/main' into cir-undef-codegen
# Conflicts: # clang/test/CIR/CodeGen/X86/sse2-builtins.c
2 parents e2cc7e2 + 0bdbf2c commit 713df01

File tree

3,413 files changed

+128768
-84094
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,413 files changed

+128768
-84094
lines changed

.ci/monolithic-windows.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ start-group "ninja"
5555
ninja -C "${BUILD_DIR}" -k 0 ${targets} |& tee ninja.log
5656
cp ${BUILD_DIR}/.ninja_log ninja.ninja_log
5757

58-
if [[ "${runtime_targets}" != "" ]]; then
58+
if [[ "${runtimes_targets}" != "" ]]; then
5959
start-group "ninja runtimes"
6060

6161
ninja -C "${BUILD_DIR}" -k 0 ${runtimes_targets} |& tee ninja_runtimes.log

.github/CODEOWNERS

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,16 @@
6060
/mlir/lib/Conversion/*ToROCDL @krzysz00 @kuhar
6161
/mlir/include/mlir/Dialect/LLVMIR/ROCDL* @krzysz00 @kuhar
6262

63+
# XeGPU and XeVM dialects in MLIR.
64+
/mlir/include/mlir/Dialect/XeGPU @charithaintc @Jianhui-Li
65+
/mlir/lib/Dialect/XeGPU @charithaintc @Jianhui-Li
66+
/mlir/lib/Conversion/*XeGPU* @charithaintc @Jianhui-Li
67+
/mlir/include/mlir/Dialect/XeGPU/Transforms @charithaintc @Jianhui-Li
68+
/mlir/lib/Dialect/XeGPU/Transforms @charithaintc @Jianhui-Li
69+
/mlir/include/mlir/Dialect/LLVMIR/XeVM* @silee2
70+
/mlir/lib/Dialect/LLVMIR/IR/XeVM @silee2
71+
/mlir/lib/Conversion/*XeVM* @silee2
72+
6373
# Bufferization Dialect in MLIR.
6474
/mlir/include/mlir/Dialect/Bufferization @matthias-springer
6575
/mlir/lib/Dialect/Bufferization @matthias-springer

.github/workflows/bazel-checks.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@ jobs:
3333
3434
bazel-build:
3535
name: "Bazel Build/Test"
36-
runs-on: llvm-premerge-linux-runners
36+
# Only run on US Central workers so we only have to keep one cache warm as
37+
# the cache buckets are per cluster.
38+
runs-on:
39+
group: llvm-premerge-cluster-us-central
40+
labels: llvm-premerge-linux-runners
3741
if: github.repository == 'llvm/llvm-project'
3842
steps:
3943
- name: Fetch LLVM sources
@@ -44,12 +48,14 @@ jobs:
4448
- name: Setup System Dependencies
4549
run: |
4650
sudo apt-get update
47-
sudo apt-get install -y libmpfr-dev libpfm4-dev
51+
sudo apt-get install -y libmpfr-dev libpfm4-dev m4 libedit-dev
4852
sudo curl -L https://github.com/bazelbuild/bazelisk/releases/download/v1.27.0/bazelisk-amd64.deb > /tmp/bazelisk.deb
4953
sudo apt-get install -y /tmp/bazelisk.deb
5054
rm /tmp/bazelisk.deb
5155
- name: Build/Test
5256
working-directory: utils/bazel
5357
run: |
5458
bazelisk test --config=ci --sandbox_base="" \
55-
@llvm-project//llvm/unittests:adt_tests
59+
--remote_cache=https://storage.googleapis.com/$CACHE_GCS_BUCKET-bazel \
60+
--google_default_credentials \
61+
@llvm-project//... //...

.github/workflows/issue-write.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
- "Check for private emails used in PRs"
88
- "PR Request Release Note"
99
- "Code lint"
10+
- "CI Checks"
1011
types:
1112
- completed
1213

.github/workflows/libclang-abi-tests.yml

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ jobs:
8484
if: github.repository_owner == 'llvm'
8585
needs: abi-dump-setup
8686
runs-on: ubuntu-24.04
87+
container:
88+
image: "ghcr.io/llvm/ci-ubuntu-24.04-abi-tests@sha256:f80125c0f767e29b8616210c0fd5cea2cd1f4fb6f2ca86d89f6016b6329b8d7f" #ghcr.io/llvm/ci-ubuntu-24.04-abi-tests:9524b37c503f
8789
strategy:
8890
matrix:
8991
name:
@@ -101,17 +103,6 @@ jobs:
101103
steps:
102104
- name: Install Ninja
103105
uses: llvm/actions/install-ninja@42d80571b13f4599bbefbc7189728b64723c7f78 # main
104-
- name: Install abi-compliance-checker
105-
run: |
106-
sudo apt-get update
107-
sudo apt-get install -y abi-dumper autoconf pkg-config
108-
- name: Install universal-ctags
109-
run: |
110-
git clone https://github.com/universal-ctags/ctags.git
111-
cd ctags
112-
./autogen.sh
113-
./configure
114-
sudo make install
115106
- name: Download source code
116107
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
117108
with:
@@ -139,6 +130,8 @@ jobs:
139130
abi-compare:
140131
if: github.repository_owner == 'llvm'
141132
runs-on: ubuntu-24.04
133+
container:
134+
image: "ghcr.io/llvm/ci-ubuntu-24.04-abi-tests@sha256:f80125c0f767e29b8616210c0fd5cea2cd1f4fb6f2ca86d89f6016b6329b8d7f" #ghcr.io/llvm/ci-ubuntu-24.04-abi-tests:9524b37c503f
142135
needs:
143136
- abi-dump-setup
144137
- abi-dump
@@ -154,10 +147,6 @@ jobs:
154147
name: build-latest
155148
path: build-latest
156149

157-
- name: Install abi-compliance-checker
158-
run: |
159-
sudo apt-get update
160-
sudo apt-get install -y abi-compliance-checker
161150
- name: Compare ABI
162151
run: |
163152
for lib in ${{ needs.abi-dump-setup.outputs.ABI_LIBS }}; do

.github/workflows/libcxx-build-and-test.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ concurrency:
3636
jobs:
3737
stage1:
3838
if: github.repository_owner == 'llvm'
39-
runs-on: llvm-premerge-libcxx-next-runners
39+
runs-on: llvm-premerge-libcxx-runners
4040
continue-on-error: false
4141
strategy:
4242
fail-fast: false
@@ -73,7 +73,7 @@ jobs:
7373
**/crash_diagnostics/*
7474
stage2:
7575
if: github.repository_owner == 'llvm'
76-
runs-on: llvm-premerge-libcxx-next-runners
76+
runs-on: llvm-premerge-libcxx-runners
7777
needs: [ stage1 ]
7878
continue-on-error: false
7979
strategy:
@@ -148,19 +148,19 @@ jobs:
148148
'generic-static',
149149
'bootstrapping-build'
150150
]
151-
machine: [ 'llvm-premerge-libcxx-next-runners' ]
151+
machine: [ 'llvm-premerge-libcxx-runners' ]
152152
include:
153153
- config: 'generic-cxx26'
154-
machine: llvm-premerge-libcxx-next-runners
154+
machine: llvm-premerge-libcxx-runners
155155
- config: 'generic-asan'
156-
machine: llvm-premerge-libcxx-next-runners
156+
machine: llvm-premerge-libcxx-runners
157157
- config: 'generic-tsan'
158-
machine: llvm-premerge-libcxx-next-runners
158+
machine: llvm-premerge-libcxx-runners
159159
- config: 'generic-ubsan'
160-
machine: llvm-premerge-libcxx-next-runners
160+
machine: llvm-premerge-libcxx-runners
161161
# Use a larger machine for MSAN to avoid timeout and memory allocation issues.
162162
- config: 'generic-msan'
163-
machine: llvm-premerge-libcxx-next-runners
163+
machine: llvm-premerge-libcxx-runners
164164
runs-on: ${{ matrix.machine }}
165165
steps:
166166
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

.github/workflows/libcxx-build-containers.yml

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ on:
1515
branches:
1616
- main
1717
paths:
18-
- 'libcxx/utils/ci/**'
18+
- 'libcxx/utils/ci/docker/**'
1919
- '.github/workflows/libcxx-build-containers.yml'
2020
pull_request:
2121
paths:
22-
- 'libcxx/utils/ci/**'
22+
- 'libcxx/utils/ci/docker/**'
2323
- '.github/workflows/libcxx-build-containers.yml'
2424

2525
jobs:
@@ -40,17 +40,18 @@ jobs:
4040
echo '{ "data-root": "/mnt/docker" }' | sudo tee /etc/docker/daemon.json
4141
sudo systemctl restart docker
4242
43-
- name: Build the Linux builder image
44-
working-directory: libcxx/utils/ci
45-
run: |
46-
docker compose build builder-base
47-
docker compose build actions-builder
43+
- name: Build the base image
44+
run: docker compose --file libcxx/utils/ci/docker/docker-compose.yml build libcxx-linux-builder-base
45+
env:
46+
TAG: ${{ github.sha }}
47+
48+
- name: Build the Linux Github Actions image
49+
run: docker compose --file libcxx/utils/ci/docker/docker-compose.yml build libcxx-linux-builder
4850
env:
4951
TAG: ${{ github.sha }}
5052

5153
- name: Build the Android builder image
52-
working-directory: libcxx/utils/ci
53-
run: docker compose build android-buildkite-builder
54+
run: docker compose --file libcxx/utils/ci/docker/docker-compose.yml build libcxx-android-builder
5455
env:
5556
TAG: ${{ github.sha }}
5657

@@ -61,19 +62,21 @@ jobs:
6162
username: ${{ github.actor }}
6263
password: ${{ secrets.GITHUB_TOKEN }}
6364

64-
- name: Push the Linux builder image
65+
- name: Push the images
6566
if: github.event_name == 'push'
66-
working-directory: libcxx/utils/ci
67-
run: |
68-
docker compose push builder-base
69-
docker compose push actions-builder
70-
env:
71-
TAG: ${{ github.sha }}
67+
run: docker compose push libcxx-linux-builder-base libcxx-linux-builder libcxx-android-builder
7268

73-
- name: Push the Android builder image
74-
if: github.event_name == 'push'
75-
working-directory: libcxx/utils/ci
69+
# We create tarballs with the images and upload them as artifacts, since that's useful for testing
70+
# the images when making changes.
71+
- name: Create image tarballs
7672
run: |
77-
docker compose push android-buildkite-builder
78-
env:
79-
TAG: ${{ github.sha }}
73+
docker image save ghcr.io/llvm/libcxx-linux-builder-base:${{ github.sha }} | gzip > libcxx-linux-builder-base.tar.gz
74+
docker image save ghcr.io/llvm/libcxx-linux-builder:${{ github.sha }} | gzip > libcxx-linux-builder.tar.gz
75+
docker image save ghcr.io/llvm/libcxx-android-builder:${{ github.sha }} | gzip > libcxx-android-builder.tar.gz
76+
- uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
77+
with:
78+
name: libcxx-docker-images
79+
path: |
80+
libcxx-linux-builder-base.tar.gz
81+
libcxx-linux-builder.tar.gz
82+
libcxx-android-builder.tar.gz

.github/workflows/release-binaries.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -191,12 +191,6 @@ jobs:
191191
- name: Install Ninja
192192
uses: llvm/actions/install-ninja@42d80571b13f4599bbefbc7189728b64723c7f78 # main
193193

194-
- name: Setup Windows
195-
if: startsWith(runner.os, 'Windows')
196-
uses: llvm/actions/setup-windows@42d80571b13f4599bbefbc7189728b64723c7f78 # main
197-
with:
198-
arch: amd64
199-
200194
- name: Set Build Prefix
201195
id: setup-stage
202196
shell: bash

bolt/include/bolt/Profile/ProfileYAMLMapping.h

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ struct CallSiteInfo {
2929
uint32_t EntryDiscriminator{0}; /// multiple entry discriminator
3030
uint64_t Count{0};
3131
uint64_t Mispreds{0};
32+
// Pseudo probe information, optional
33+
uint32_t Probe{0};
34+
bool Indirect = false;
35+
uint32_t InlineTreeNode{0};
3236

3337
bool operator==(const CallSiteInfo &Other) const {
3438
return Offset == Other.Offset && DestId == Other.DestId &&
@@ -63,6 +67,9 @@ template <> struct MappingTraits<bolt::CallSiteInfo> {
6367
YamlIO.mapOptional("disc", CSI.EntryDiscriminator, (uint32_t)0);
6468
YamlIO.mapRequired("cnt", CSI.Count);
6569
YamlIO.mapOptional("mis", CSI.Mispreds, (uint64_t)0);
70+
YamlIO.mapOptional("pp", CSI.Probe, 0);
71+
YamlIO.mapOptional("ppn", CSI.InlineTreeNode, 0);
72+
YamlIO.mapOptional("ind", CSI.Indirect, false);
6673
}
6774

6875
static const bool flow = true;
@@ -95,29 +102,20 @@ template <> struct MappingTraits<bolt::SuccessorInfo> {
95102

96103
namespace bolt {
97104
struct PseudoProbeInfo {
98-
uint32_t InlineTreeIndex = 0;
99-
uint64_t BlockMask = 0; // bitset with probe indices from 1 to 64
100-
std::vector<uint64_t> BlockProbes; // block probes with indices above 64
101-
std::vector<uint64_t> CallProbes;
102-
std::vector<uint64_t> IndCallProbes;
105+
std::vector<uint64_t> BlockProbes;
103106
std::vector<uint32_t> InlineTreeNodes;
104107

105108
bool operator==(const PseudoProbeInfo &Other) const {
106-
return InlineTreeIndex == Other.InlineTreeIndex &&
107-
BlockProbes == Other.BlockProbes && CallProbes == Other.CallProbes &&
108-
IndCallProbes == Other.IndCallProbes;
109+
return InlineTreeNodes == Other.InlineTreeNodes &&
110+
BlockProbes == Other.BlockProbes;
109111
}
110112
};
111113
} // end namespace bolt
112114

113115
template <> struct MappingTraits<bolt::PseudoProbeInfo> {
114116
static void mapping(IO &YamlIO, bolt::PseudoProbeInfo &PI) {
115-
YamlIO.mapOptional("blx", PI.BlockMask, 0);
116-
YamlIO.mapOptional("blk", PI.BlockProbes, std::vector<uint64_t>());
117-
YamlIO.mapOptional("call", PI.CallProbes, std::vector<uint64_t>());
118-
YamlIO.mapOptional("icall", PI.IndCallProbes, std::vector<uint64_t>());
119-
YamlIO.mapOptional("id", PI.InlineTreeIndex, 0);
120-
YamlIO.mapOptional("ids", PI.InlineTreeNodes, std::vector<uint32_t>());
117+
YamlIO.mapOptional("blk", PI.BlockProbes, std::vector<uint64_t>(1, 1));
118+
YamlIO.mapOptional("ids", PI.InlineTreeNodes, std::vector<uint32_t>(1, 0));
121119
}
122120

123121
static const bool flow = true;

bolt/include/bolt/Profile/YAMLProfileWriter.h

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -74,25 +74,24 @@ class YAMLProfileWriter {
7474
collectInlineTree(const MCPseudoProbeDecoder &Decoder,
7575
const MCDecodedPseudoProbeInlineTree &Root);
7676

77-
// 0 - block probe, 1 - indirect call, 2 - direct call
78-
using ProbeList = std::array<SmallVector<uint64_t, 0>, 3>;
79-
using NodeIdToProbes = DenseMap<uint32_t, ProbeList>;
80-
static std::vector<yaml::bolt::PseudoProbeInfo>
81-
convertNodeProbes(NodeIdToProbes &NodeProbes);
82-
8377
public:
84-
template <typename T>
85-
static std::vector<yaml::bolt::PseudoProbeInfo>
86-
writeBlockProbes(T Probes, const InlineTreeMapTy &InlineTreeNodeId) {
87-
NodeIdToProbes NodeProbes;
88-
for (const MCDecodedPseudoProbe &Probe : Probes) {
89-
auto It = InlineTreeNodeId.find(Probe.getInlineTreeNode());
90-
if (It == InlineTreeNodeId.end())
91-
continue;
92-
NodeProbes[It->second][Probe.getType()].emplace_back(Probe.getIndex());
93-
}
94-
return convertNodeProbes(NodeProbes);
95-
}
78+
class BlockProbeCtx {
79+
struct Call {
80+
uint64_t Id;
81+
uint32_t Node;
82+
bool Indirect;
83+
bool Used;
84+
};
85+
// Group block probes by node id.
86+
DenseMap<uint32_t, std::vector<uint64_t>> NodeToProbes;
87+
// Offset -> call probe
88+
DenseMap<uint32_t, Call> CallProbes;
89+
90+
public:
91+
void addBlockProbe(const InlineTreeMapTy &Map,
92+
const MCDecodedPseudoProbe &Probe, uint32_t ProbeOffset);
93+
void finalize(yaml::bolt::BinaryBasicBlockProfile &YamlBB);
94+
};
9695
};
9796
} // namespace bolt
9897
} // namespace llvm

0 commit comments

Comments
 (0)