Skip to content

Commit

Permalink
Merge branch 'main' into pauth-lldb
Browse files Browse the repository at this point in the history
  • Loading branch information
kovdan01 committed Mar 26, 2024
2 parents 4164b7e + 5b544b5 commit 3427a7a
Show file tree
Hide file tree
Showing 6,209 changed files with 241,644 additions and 77,113 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 2 additions & 2 deletions .ci/generate-buildkite-pipeline-premerge
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function compute-projects-to-test() {
done
;;
clang)
for p in clang-tools-extra compiler-rt flang libc lldb openmp cross-project-tests; do
for p in clang-tools-extra compiler-rt flang lldb cross-project-tests; do
echo $p
done
;;
Expand Down Expand Up @@ -224,7 +224,7 @@ fi
# needs while letting them run on the infrastructure provided by LLVM.

# Figure out which projects need to be built on each platform
all_projects="bolt clang-tools-extra compiler-rt cross-project-tests flang libc libclc lld lldb llvm mlir openmp polly pstl"
all_projects="bolt clang clang-tools-extra compiler-rt cross-project-tests flang libc libclc lld lldb llvm mlir openmp polly pstl"
modified_projects="$(keep-modified-projects ${all_projects})"

linux_projects_to_test=$(exclude-linux $(compute-projects-to-test ${modified_projects}))
Expand Down
2 changes: 1 addition & 1 deletion .ci/monolithic-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ cmake -S ${MONOREPO_ROOT}/llvm -B ${BUILD_DIR} \

echo "--- ninja"
# Targets are not escaped as they are passed as separate arguments.
ninja -C "${BUILD_DIR}" ${targets}
ninja -C "${BUILD_DIR}" -k 0 ${targets}
2 changes: 1 addition & 1 deletion .ci/monolithic-windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ cmake -S ${MONOREPO_ROOT}/llvm -B ${BUILD_DIR} \

echo "--- ninja"
# Targets are not escaped as they are passed as separate arguments.
ninja -C "${BUILD_DIR}" ${targets}
ninja -C "${BUILD_DIR}" -k 0 ${targets}
34 changes: 27 additions & 7 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
/clang/www/cxx_dr_status.html @Endilll
/clang/www/make_cxx_dr_status @Endilll

clang/lib/AST/Interp/ @tbaederr
clang/test/AST/Interp/ @tbaederr

/lldb/ @JDevlieghere

# MLIR Interfaces.
Expand All @@ -56,8 +59,8 @@
/mlir/Dialect/*/Transforms/Bufferize.cpp @matthias-springer

# Linalg Dialect in MLIR.
/mlir/include/mlir/Dialect/Linalg @dcaballe @nicolasvasilache
/mlir/lib/Dialect/Linalg @dcaballe @nicolasvasilache
/mlir/include/mlir/Dialect/Linalg/* @dcaballe @nicolasvasilache
/mlir/lib/Dialect/Linalg/* @dcaballe @nicolasvasilache
/mlir/lib/Dialect/Linalg/Transforms/DecomposeLinalgOps.cpp @MaheshRavishankar @nicolasvasilache
/mlir/lib/Dialect/Linalg/Transforms/DropUnitDims.cpp @MaheshRavishankar @nicolasvasilache
/mlir/lib/Dialect/Linalg/Transforms/ElementwiseOpFusion.cpp @MaheshRavishankar @nicolasvasilache
Expand All @@ -74,14 +77,14 @@
/mlir/**/*SME* @banach-space @dcaballe @nicolasvasilache
/mlir/**/*SVE* @banach-space @dcaballe @nicolasvasilache
/mlir/**/*VectorInterfaces* @dcaballe @nicolasvasilache
/mlir/**/*VectorToSCF* @banach-space @dcaballe @nicolasvasilache @matthias-springer
/mlir/**/*VectorToSCF* @banach-space @dcaballe @matthias-springer @nicolasvasilache
/mlir/**/*VectorToLLVM* @banach-space @dcaballe @nicolasvasilache
/mlir/**/*X86Vector* @aartbik @dcaballe @nicolasvasilache
/mlir/include/mlir/Dialect/Vector @dcaballe @nicolasvasilache
/mlir/lib/Dialect/Vector @dcaballe @nicolasvasilache
/mlir/lib/Dialect/Vector/Transforms/VectorEmulateNarrowType.cpp @MaheshRavishankar @nicolasvasilache
/mlir/**/*EmulateNarrowType* @hanhanW
/mlir/include/mlir/Dialect/Vector/* @dcaballe @nicolasvasilache
/mlir/lib/Dialect/Vector/* @dcaballe @nicolasvasilache
/mlir/lib/Dialect/Vector/Transforms/* @hanhanW @nicolasvasilache
/mlir/lib/Dialect/Vector/Transforms/VectorEmulateNarrowType.cpp @MaheshRavishankar @nicolasvasilache
/mlir/**/*EmulateNarrowType* @dcaballe @hanhanW

# Presburger library in MLIR
/mlir/**/*Presburger* @Groverkss @Superty
Expand All @@ -93,6 +96,7 @@
# Transform Dialect in MLIR.
/mlir/include/mlir/Dialect/Transform/* @ftynse @nicolasvasilache
/mlir/lib/Dialect/Transform/* @ftynse @nicolasvasilache
/mlir/**/*TransformOps* @ftynse @nicolasvasilache

# SPIR-V Dialect in MLIR.
/mlir/**/SPIRV/ @antiagainst @kuhar
Expand All @@ -103,5 +107,21 @@
# MLIR Sparsifier.
/mlir/**/*SparseTensor*/ @aartbik @PeimingLiu @yinying-lisa-li @matthias-springer

# MLIR NVGPU Dialect
/mlir/**/NVGPU*/ @grypp
/mlir/test/**/CUDA/ @grypp

# MLIR NVVM Dialect in MLIR
/mlir/**/LLVMIR/**/BasicPtxBuilderInterface* @grypp
/mlir/**/NVVM*/ @grypp

# BOLT
/bolt/ @aaupov @maksfb @rafaelauler @ayermolo @dcci

# Bazel build system.
/utils/bazel/ @rupprecht

# InstallAPI and TextAPI
/llvm/**/TextAPI/ @cyndyishida
/clang/**/InstallAPI/ @cyndyishida
/clang/tools/clang-installapi/ @cyndyishida
5 changes: 5 additions & 0 deletions .github/new-prs-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -629,6 +629,8 @@ backend:DirectX:
- '**/*DirectX*/**'
- '**/*DXIL*/**'
- '**/*dxil*/**'
- '**/*DXContainer*'
- '**/*DXContainer*/**'

backend:SPIR-V:
- clang/lib/Driver/ToolChains/SPIRV.*
Expand Down Expand Up @@ -933,3 +935,6 @@ openmp:libomp:

openmp:libomptarget:
- any: ['openmp/**', '!openmp/runtime/**']

bazel:
- utils/bazel/**
2 changes: 1 addition & 1 deletion .github/workflows/issue-release-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,5 @@ jobs:
release-workflow \
--branch-repo-token ${{ secrets.RELEASE_WORKFLOW_PUSH_SECRET }} \
--issue-number ${{ github.event.issue.number }} \
--requested-by ${{ github.event.issue.user.login }} \
--requested-by ${{ (github.event.action == 'opened' && github.event.issue.user.login) || github.event.comment.user.login }} \
auto
128 changes: 128 additions & 0 deletions .github/workflows/issue-write.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
name: Comment on an issue

on:
workflow_run:
workflows: ["Check code formatting"]
types:
- completed

permissions:
contents: read

jobs:
pr-comment:
runs-on: ubuntu-latest
permissions:
pull-requests: write
if: >
github.event.workflow_run.event == 'pull_request'
steps:
- name: 'Download artifact'
uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
with:
github-token: ${{ secrets.ISSUE_WRITE_DOWNLOAD_ARTIFACT }}
run-id: ${{ github.event.workflow_run.id }}
name: workflow-args

- name: 'Comment on PR'
uses: actions/github-script@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
var fs = require('fs');
const comments = JSON.parse(fs.readFileSync('./comments'));
if (!comments) {
return;
}
let runInfo = await github.actions.getWorkflowRun({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: context.payload.workflow_run.id
});
console.log(runInfo);
// Query to find the number of the pull request that triggered this job.
// The associated pull requests are based off of the branch name, so if
// you create a pull request for a branch, close it, and then create
// another pull request with the same branch, then this query will return
// two associated pull requests. This is why we have to fetch all the
// associated pull requests and then iterate through them to find the
// one that is open.
const gql_query = `
query($repo_owner : String!, $repo_name : String!, $branch: String!) {
repository(owner: $repo_owner, name: $repo_name) {
ref (qualifiedName: $branch) {
associatedPullRequests(first: 100) {
nodes {
baseRepository {
owner {
login
}
}
number
state
}
}
}
}
}
`
const gql_variables = {
repo_owner: runInfo.data.head_repository.owner.login,
repo_name: runInfo.data.head_repository.name,
branch: runInfo.data.head_branch
}
const gql_result = await github.graphql(gql_query, gql_variables);
console.log(gql_result);
console.log(gql_result.repository.ref.associatedPullRequests.nodes);
var pr_number = 0;
gql_result.repository.ref.associatedPullRequests.nodes.forEach((pr) => {
if (pr.baseRepository.owner.login = context.repo.owner && pr.state == 'OPEN') {
pr_number = pr.number;
}
});
if (pr_number == 0) {
console.log("Error retrieving pull request number");
return;
}
await comments.forEach(function (comment) {
if (comment.id) {
// Security check: Ensure that this comment was created by
// the github-actions bot, so a malicious input won't overwrite
// a user's comment.
github.issues.getComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: comment.id
}).then((old_comment) => {
console.log(old_comment);
if (old_comment.data.user.login != "github-actions[bot]") {
console.log("Invalid comment id: " + comment.id);
return;
}
github.issues.updateComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: pr_number,
comment_id: comment.id,
body: comment.body
});
});
} else {
github.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: pr_number,
body: comment.body
});
}
});
- name: Dump comments file
if: always()
run: cat comments
5 changes: 5 additions & 0 deletions .github/workflows/llvm-project-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ jobs:
else
builddir="$(pwd)"/build
fi
if [ "${{ runner.os }}" == "macOS" ]; then
# Workaround test failure on some lld tests on MacOS
# https://github.com/llvm/llvm-project/issues/81967
extra_cmake_args="-DLLVM_DISABLE_ASSEMBLY_FILES=ON"
fi
echo "llvm-builddir=$builddir" >> "$GITHUB_OUTPUT"
cmake -G Ninja \
-B "$builddir" \
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/llvm-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
BASELINE_REF: ${{ steps.vars.outputs.BASELINE_REF }}
ABI_HEADERS: ${{ steps.vars.outputs.ABI_HEADERS }}
BASELINE_VERSION_MAJOR: ${{ steps.vars.outputs.BASELINE_VERSION_MAJOR }}
BASELINE_VERSION_MINOR: ${{ steps.vars.outputs.BASELINE_VERSION_MINOR }}
LLVM_VERSION_MAJOR: ${{ steps.version.outputs.LLVM_VERSION_MAJOR }}
LLVM_VERSION_MINOR: ${{ steps.version.outputs.LLVM_VERSION_MINOR }}
LLVM_VERSION_PATCH: ${{ steps.version.outputs.LLVM_VERSION_PATCH }}
Expand All @@ -58,7 +59,14 @@ jobs:
- name: Setup Variables
id: vars
run: |
if [ ${{ steps.version.outputs.LLVM_VERSION_MINOR }} -ne 0 ] || [ ${{ steps.version.outputs.LLVM_VERSION_PATCH }} -eq 0 ]; then
# C++ ABI:
# 18.1.0 we aren't doing ABI checks.
# 18.1.1 We want to check 18.1.0.
# C ABI:
# 18.1.0 We want to check 17.0.x
# 18.1.1 We want to check 18.1.0
echo "BASELINE_VERSION_MINOR=1" >> "$GITHUB_OUTPUT"
if [ ${{ steps.version.outputs.LLVM_VERSION_PATCH }} -eq 0 ]; then
{
echo "BASELINE_VERSION_MAJOR=$(( ${{ steps.version.outputs.LLVM_VERSION_MAJOR }} - 1))"
echo "ABI_HEADERS=llvm-c"
Expand All @@ -82,7 +90,7 @@ jobs:
include:
- name: build-baseline
llvm_version_major: ${{ needs.abi-dump-setup.outputs.BASELINE_VERSION_MAJOR }}
ref: llvmorg-${{ needs.abi-dump-setup.outputs.BASELINE_VERSION_MAJOR }}.0.0
ref: llvmorg-${{ needs.abi-dump-setup.outputs.BASELINE_VERSION_MAJOR }}.${{ needs.abi-dump-setup.outputs.BASELINE_VERSION_MINOR }}.0
repo: llvm/llvm-project
- name: build-latest
llvm_version_major: ${{ needs.abi-dump-setup.outputs.LLVM_VERSION_MAJOR }}
Expand Down
24 changes: 16 additions & 8 deletions .github/workflows/pr-code-format.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
name: "Check code formatting"
on:
pull_request_target:
pull_request:
branches:
- main

permissions:
pull-requests: write

jobs:
code_formatter:
runs-on: ubuntu-latest
Expand All @@ -31,12 +28,13 @@ jobs:
separator: ","
skip_initial_fetch: true

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

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

0 comments on commit 3427a7a

Please sign in to comment.