Skip to content

Commit f1d7478

Browse files
committed
Merge branch 'main' into delete-with-message
2 parents 7807c71 + bbbcc1d commit f1d7478

File tree

4,826 files changed

+189222
-51978
lines changed

Some content is hidden

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

4,826 files changed

+189222
-51978
lines changed

.ci/monolithic-linux.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ set -o pipefail
1818

1919
MONOREPO_ROOT="${MONOREPO_ROOT:="$(git rev-parse --show-toplevel)"}"
2020
BUILD_DIR="${BUILD_DIR:=${MONOREPO_ROOT}/build}"
21-
rm -rf ${BUILD_DIR}
21+
rm -rf "${BUILD_DIR}"
2222

2323
ccache --zero-stats
2424

@@ -37,8 +37,8 @@ projects="${1}"
3737
targets="${2}"
3838

3939
echo "--- cmake"
40-
pip install -q -r ${MONOREPO_ROOT}/mlir/python/requirements.txt
41-
cmake -S ${MONOREPO_ROOT}/llvm -B ${BUILD_DIR} \
40+
pip install -q -r "${MONOREPO_ROOT}"/mlir/python/requirements.txt
41+
cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
4242
-D LLVM_ENABLE_PROJECTS="${projects}" \
4343
-G Ninja \
4444
-D CMAKE_BUILD_TYPE=Release \

.ci/monolithic-windows.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ set -o pipefail
1919
MONOREPO_ROOT="${MONOREPO_ROOT:="$(git rev-parse --show-toplevel)"}"
2020
BUILD_DIR="${BUILD_DIR:=${MONOREPO_ROOT}/build}"
2121

22-
rm -rf ${BUILD_DIR}
22+
rm -rf "${BUILD_DIR}"
2323

2424
if [[ -n "${CLEAR_CACHE:-}" ]]; then
2525
echo "clearing sccache"
@@ -37,14 +37,14 @@ projects="${1}"
3737
targets="${2}"
3838

3939
echo "--- cmake"
40-
pip install -q -r ${MONOREPO_ROOT}/mlir/python/requirements.txt
40+
pip install -q -r "${MONOREPO_ROOT}"/mlir/python/requirements.txt
4141

4242
# The CMAKE_*_LINKER_FLAGS to disable the manifest come from research
4343
# on fixing a build reliability issue on the build server, please
4444
# see https://github.com/llvm/llvm-project/pull/82393 and
4545
# https://discourse.llvm.org/t/rfc-future-of-windows-pre-commit-ci/76840/40
4646
# for further information.
47-
cmake -S ${MONOREPO_ROOT}/llvm -B ${BUILD_DIR} \
47+
cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
4848
-D LLVM_ENABLE_PROJECTS="${projects}" \
4949
-G Ninja \
5050
-D CMAKE_BUILD_TYPE=Release \

.github/CODEOWNERS

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ clang/test/AST/Interp/ @tbaederr
5959
/mlir/Dialect/*/Transforms/Bufferize.cpp @matthias-springer
6060

6161
# Linalg Dialect in MLIR.
62-
/mlir/include/mlir/Dialect/Linalg @dcaballe @nicolasvasilache
63-
/mlir/lib/Dialect/Linalg @dcaballe @nicolasvasilache
62+
/mlir/include/mlir/Dialect/Linalg/* @dcaballe @nicolasvasilache
63+
/mlir/lib/Dialect/Linalg/* @dcaballe @nicolasvasilache
6464
/mlir/lib/Dialect/Linalg/Transforms/DecomposeLinalgOps.cpp @MaheshRavishankar @nicolasvasilache
6565
/mlir/lib/Dialect/Linalg/Transforms/DropUnitDims.cpp @MaheshRavishankar @nicolasvasilache
6666
/mlir/lib/Dialect/Linalg/Transforms/ElementwiseOpFusion.cpp @MaheshRavishankar @nicolasvasilache
@@ -77,14 +77,14 @@ clang/test/AST/Interp/ @tbaederr
7777
/mlir/**/*SME* @banach-space @dcaballe @nicolasvasilache
7878
/mlir/**/*SVE* @banach-space @dcaballe @nicolasvasilache
7979
/mlir/**/*VectorInterfaces* @dcaballe @nicolasvasilache
80-
/mlir/**/*VectorToSCF* @banach-space @dcaballe @nicolasvasilache @matthias-springer
80+
/mlir/**/*VectorToSCF* @banach-space @dcaballe @matthias-springer @nicolasvasilache
8181
/mlir/**/*VectorToLLVM* @banach-space @dcaballe @nicolasvasilache
8282
/mlir/**/*X86Vector* @aartbik @dcaballe @nicolasvasilache
83-
/mlir/include/mlir/Dialect/Vector @dcaballe @nicolasvasilache
84-
/mlir/lib/Dialect/Vector @dcaballe @nicolasvasilache
85-
/mlir/lib/Dialect/Vector/Transforms/VectorEmulateNarrowType.cpp @MaheshRavishankar @nicolasvasilache
86-
/mlir/**/*EmulateNarrowType* @hanhanW
83+
/mlir/include/mlir/Dialect/Vector/* @dcaballe @nicolasvasilache
84+
/mlir/lib/Dialect/Vector/* @dcaballe @nicolasvasilache
8785
/mlir/lib/Dialect/Vector/Transforms/* @hanhanW @nicolasvasilache
86+
/mlir/lib/Dialect/Vector/Transforms/VectorEmulateNarrowType.cpp @MaheshRavishankar @nicolasvasilache
87+
/mlir/**/*EmulateNarrowType* @dcaballe @hanhanW
8888

8989
# Presburger library in MLIR
9090
/mlir/**/*Presburger* @Groverkss @Superty
@@ -96,6 +96,7 @@ clang/test/AST/Interp/ @tbaederr
9696
# Transform Dialect in MLIR.
9797
/mlir/include/mlir/Dialect/Transform/* @ftynse @nicolasvasilache
9898
/mlir/lib/Dialect/Transform/* @ftynse @nicolasvasilache
99+
/mlir/**/*TransformOps* @ftynse @nicolasvasilache
99100

100101
# SPIR-V Dialect in MLIR.
101102
/mlir/**/SPIRV/ @antiagainst @kuhar
@@ -106,5 +107,21 @@ clang/test/AST/Interp/ @tbaederr
106107
# MLIR Sparsifier.
107108
/mlir/**/*SparseTensor*/ @aartbik @PeimingLiu @yinying-lisa-li @matthias-springer
108109

110+
# MLIR NVGPU Dialect
111+
/mlir/**/NVGPU*/ @grypp
112+
/mlir/test/**/CUDA/ @grypp
113+
114+
# MLIR NVVM Dialect in MLIR
115+
/mlir/**/LLVMIR/**/BasicPtxBuilderInterface* @grypp
116+
/mlir/**/NVVM*/ @grypp
117+
109118
# BOLT
110119
/bolt/ @aaupov @maksfb @rafaelauler @ayermolo @dcci
120+
121+
# Bazel build system.
122+
/utils/bazel/ @rupprecht
123+
124+
# InstallAPI and TextAPI
125+
/llvm/**/TextAPI/ @cyndyishida
126+
/clang/**/InstallAPI/ @cyndyishida
127+
/clang/tools/clang-installapi/ @cyndyishida

.github/new-prs-labeler.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -629,6 +629,8 @@ backend:DirectX:
629629
- '**/*DirectX*/**'
630630
- '**/*DXIL*/**'
631631
- '**/*dxil*/**'
632+
- '**/*DXContainer*'
633+
- '**/*DXContainer*/**'
632634

633635
backend:SPIR-V:
634636
- clang/lib/Driver/ToolChains/SPIRV.*
@@ -933,3 +935,6 @@ openmp:libomp:
933935

934936
openmp:libomptarget:
935937
- any: ['openmp/**', '!openmp/runtime/**']
938+
939+
bazel:
940+
- utils/bazel/**

.github/workflows/issue-write.yml

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
name: Comment on an issue
2+
3+
on:
4+
workflow_run:
5+
workflows: ["Check code formatting"]
6+
types:
7+
- completed
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
pr-comment:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
pull-requests: write
17+
if: >
18+
github.event.workflow_run.event == 'pull_request'
19+
steps:
20+
- name: 'Download artifact'
21+
uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
22+
with:
23+
github-token: ${{ secrets.ISSUE_WRITE_DOWNLOAD_ARTIFACT }}
24+
run-id: ${{ github.event.workflow_run.id }}
25+
name: workflow-args
26+
27+
- name: 'Comment on PR'
28+
uses: actions/github-script@v3
29+
with:
30+
github-token: ${{ secrets.GITHUB_TOKEN }}
31+
script: |
32+
var fs = require('fs');
33+
const comments = JSON.parse(fs.readFileSync('./comments'));
34+
if (!comments) {
35+
return;
36+
}
37+
38+
let runInfo = await github.actions.getWorkflowRun({
39+
owner: context.repo.owner,
40+
repo: context.repo.repo,
41+
run_id: context.payload.workflow_run.id
42+
});
43+
44+
console.log(runInfo);
45+
46+
47+
// Query to find the number of the pull request that triggered this job.
48+
// The associated pull requests are based off of the branch name, so if
49+
// you create a pull request for a branch, close it, and then create
50+
// another pull request with the same branch, then this query will return
51+
// two associated pull requests. This is why we have to fetch all the
52+
// associated pull requests and then iterate through them to find the
53+
// one that is open.
54+
const gql_query = `
55+
query($repo_owner : String!, $repo_name : String!, $branch: String!) {
56+
repository(owner: $repo_owner, name: $repo_name) {
57+
ref (qualifiedName: $branch) {
58+
associatedPullRequests(first: 100) {
59+
nodes {
60+
baseRepository {
61+
owner {
62+
login
63+
}
64+
}
65+
number
66+
state
67+
}
68+
}
69+
}
70+
}
71+
}
72+
`
73+
const gql_variables = {
74+
repo_owner: runInfo.data.head_repository.owner.login,
75+
repo_name: runInfo.data.head_repository.name,
76+
branch: runInfo.data.head_branch
77+
}
78+
const gql_result = await github.graphql(gql_query, gql_variables);
79+
console.log(gql_result);
80+
console.log(gql_result.repository.ref.associatedPullRequests.nodes);
81+
82+
var pr_number = 0;
83+
gql_result.repository.ref.associatedPullRequests.nodes.forEach((pr) => {
84+
if (pr.baseRepository.owner.login = context.repo.owner && pr.state == 'OPEN') {
85+
pr_number = pr.number;
86+
}
87+
});
88+
if (pr_number == 0) {
89+
console.log("Error retrieving pull request number");
90+
return;
91+
}
92+
93+
await comments.forEach(function (comment) {
94+
if (comment.id) {
95+
// Security check: Ensure that this comment was created by
96+
// the github-actions bot, so a malicious input won't overwrite
97+
// a user's comment.
98+
github.issues.getComment({
99+
owner: context.repo.owner,
100+
repo: context.repo.repo,
101+
comment_id: comment.id
102+
}).then((old_comment) => {
103+
console.log(old_comment);
104+
if (old_comment.data.user.login != "github-actions[bot]") {
105+
console.log("Invalid comment id: " + comment.id);
106+
return;
107+
}
108+
github.issues.updateComment({
109+
owner: context.repo.owner,
110+
repo: context.repo.repo,
111+
issue_number: pr_number,
112+
comment_id: comment.id,
113+
body: comment.body
114+
});
115+
});
116+
} else {
117+
github.issues.createComment({
118+
owner: context.repo.owner,
119+
repo: context.repo.repo,
120+
issue_number: pr_number,
121+
body: comment.body
122+
});
123+
}
124+
});
125+
126+
- name: Dump comments file
127+
if: always()
128+
run: cat comments

.github/workflows/llvm-tests.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ jobs:
4242
BASELINE_REF: ${{ steps.vars.outputs.BASELINE_REF }}
4343
ABI_HEADERS: ${{ steps.vars.outputs.ABI_HEADERS }}
4444
BASELINE_VERSION_MAJOR: ${{ steps.vars.outputs.BASELINE_VERSION_MAJOR }}
45+
BASELINE_VERSION_MINOR: ${{ steps.vars.outputs.BASELINE_VERSION_MINOR }}
4546
LLVM_VERSION_MAJOR: ${{ steps.version.outputs.LLVM_VERSION_MAJOR }}
4647
LLVM_VERSION_MINOR: ${{ steps.version.outputs.LLVM_VERSION_MINOR }}
4748
LLVM_VERSION_PATCH: ${{ steps.version.outputs.LLVM_VERSION_PATCH }}
@@ -58,7 +59,14 @@ jobs:
5859
- name: Setup Variables
5960
id: vars
6061
run: |
61-
if [ ${{ steps.version.outputs.LLVM_VERSION_MINOR }} -ne 0 ] || [ ${{ steps.version.outputs.LLVM_VERSION_PATCH }} -eq 0 ]; then
62+
# C++ ABI:
63+
# 18.1.0 we aren't doing ABI checks.
64+
# 18.1.1 We want to check 18.1.0.
65+
# C ABI:
66+
# 18.1.0 We want to check 17.0.x
67+
# 18.1.1 We want to check 18.1.0
68+
echo "BASELINE_VERSION_MINOR=1" >> "$GITHUB_OUTPUT"
69+
if [ ${{ steps.version.outputs.LLVM_VERSION_PATCH }} -eq 0 ]; then
6270
{
6371
echo "BASELINE_VERSION_MAJOR=$(( ${{ steps.version.outputs.LLVM_VERSION_MAJOR }} - 1))"
6472
echo "ABI_HEADERS=llvm-c"
@@ -82,7 +90,7 @@ jobs:
8290
include:
8391
- name: build-baseline
8492
llvm_version_major: ${{ needs.abi-dump-setup.outputs.BASELINE_VERSION_MAJOR }}
85-
ref: llvmorg-${{ needs.abi-dump-setup.outputs.BASELINE_VERSION_MAJOR }}.0.0
93+
ref: llvmorg-${{ needs.abi-dump-setup.outputs.BASELINE_VERSION_MAJOR }}.${{ needs.abi-dump-setup.outputs.BASELINE_VERSION_MINOR }}.0
8694
repo: llvm/llvm-project
8795
- name: build-latest
8896
llvm_version_major: ${{ needs.abi-dump-setup.outputs.LLVM_VERSION_MAJOR }}

.github/workflows/pr-code-format.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
name: "Check code formatting"
22
on:
3-
pull_request_target:
3+
pull_request:
44
branches:
55
- main
66

7-
permissions:
8-
pull-requests: write
9-
107
jobs:
118
code_formatter:
129
runs-on: ubuntu-latest
@@ -31,12 +28,13 @@ jobs:
3128
separator: ","
3229
skip_initial_fetch: true
3330

34-
# We need to make sure that we aren't executing/using any code from the
35-
# PR for security reasons as we're using pull_request_target. Checkout
36-
# the target branch with the necessary files.
31+
# We need to pull the script from the main branch, so that we ensure
32+
# we get the latest version of this script.
3733
- name: Fetch code formatting utils
3834
uses: actions/checkout@v4
3935
with:
36+
reository: ${{ github.repository }}
37+
ref: ${{ github.base_ref }}
4038
sparse-checkout: |
4139
llvm/utils/git/requirements_formatting.txt
4240
llvm/utils/git/code-format-helper.py
@@ -53,7 +51,7 @@ jobs:
5351
- name: Install clang-format
5452
uses: aminya/setup-cpp@v1
5553
with:
56-
clangformat: 17.0.1
54+
clangformat: 18.1.1
5755

5856
- name: Setup Python env
5957
uses: actions/setup-python@v4
@@ -75,10 +73,20 @@ jobs:
7573
# to take advantage of the new --diff_from_common_commit option
7674
# explicitly in code-format-helper.py and not have to diff starting at
7775
# the merge base.
76+
# Create an empty comments file so the pr-write job doesn't fail.
7877
run: |
78+
echo "[]" > comments &&
7979
python ./code-format-tools/llvm/utils/git/code-format-helper.py \
80+
--write-comment-to-file \
8081
--token ${{ secrets.GITHUB_TOKEN }} \
8182
--issue-number $GITHUB_PR_NUMBER \
8283
--start-rev $(git merge-base $START_REV $END_REV) \
8384
--end-rev $END_REV \
8485
--changed-files "$CHANGED_FILES"
86+
87+
- uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 #v4.3.0
88+
if: always()
89+
with:
90+
name: workflow-args
91+
path: |
92+
comments

.github/workflows/scorecard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
persist-credentials: false
3737

3838
- name: "Run analysis"
39-
uses: ossf/scorecard-action@e38b1902ae4f44df626f11ba0734b14fb91f8f86 # v2.1.2
39+
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
4040
with:
4141
results_file: results.sarif
4242
results_format: sarif

bolt/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ if (BOLT_ENABLE_RUNTIME)
4545
execute_process(COMMAND ls /proc/self/map_files
4646
RESULT_VARIABLE LS OUTPUT_QUIET ERROR_QUIET)
4747
if (LS)
48-
set(BOLT_ENABLE_RUNTIME OFF)
4948
message(WARNING
50-
"BOLT runtime is disabled as /proc/self/map_files is unreadable.")
49+
"BOLT runtime may not be able to read /proc/self/map_files. Please use
50+
`--instrumentation-binpath <path-to-instrumented-binary>` option.")
5151
endif()
5252
endif()
5353

0 commit comments

Comments
 (0)