Skip to content

Commit

Permalink
LLVM and SPIRV-LLVM-Translator pulldown (WW42)
Browse files Browse the repository at this point in the history
  • Loading branch information
nstester committed Oct 20, 2023
2 parents b6fc884 + 73adcec commit 8fe166f
Show file tree
Hide file tree
Showing 1,944 changed files with 90,494 additions and 29,106 deletions.
5 changes: 4 additions & 1 deletion .ci/generate-buildkite-pipeline-premerge
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ set -eu
set -o pipefail

# Environment variables script works with:

# Fetch origin/main to have an up to date merge base for main...HEAD diff.
git fetch origin main:main
# List of files affected by this commit
: ${MODIFIED_FILES:=$(git diff --name-only HEAD~1)}
: ${MODIFIED_FILES:=$(git diff --name-only main...HEAD)}
# Filter rules for generic windows tests
: ${WINDOWS_AGENTS:='{"queue": "windows"}'}
# Filter rules for generic linux tests
Expand Down
32 changes: 32 additions & 0 deletions .github/new-prs-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -794,3 +794,35 @@ llvm:binary-utilities:
- llvm/tools/llvm-size/**
- llvm/tools/llvm-strings/**
- llvm/tools/llvm-symbolizer/**

clang:openmp:
- clang/include/clang/Basic/OpenMP*
- clang/include/clang/AST/OpenMPClause.h
- clang/include/clang/AST/DeclOpenMP.h
- clang/include/clang/AST/ExprOpenMP.h
- clang/include/clang/AST/StmtOpenMP.h
- clang/lib/AST/DeclOpenMP.cpp
- clang/lib/AST/OpenMPClause.cpp
- clang/lib/AST/StmtOpenMP.cpp
- clang/lib/Headers/openmp_wrappers/**
- clang/lib/Parse/ParseOpenMP.cpp
- clang/lib/Basic/OpenMPKinds.cpp
- clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp
- clang/lib/Driver/ToolChains/AMDGPUOpenMP.h
- clang/lib/CodeGen/CgStmtOpenMP.cpp
- clang/lib/CodeGen/CGOpenMP*
- clang/lib/Sema/SemaOpenMP.cpp
- clang/test/OpenMP/**
- clang/test/AST/ast-dump-openmp-*
- llvm/lib/Frontend/OpenMP/**
- llvm/lib/Transforms/IPO/OpenMPOpt.cpp
- llvm/include/llvm/Frontend/OpenMP/**
- llvm/include/llvm/Transforms/IPO/OpenMPOpt.h
- llvm/unittests/Frontend/OpenMP*
- llvm/test/Transforms/OpenMP/**

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

openmp:libomptarget:
- any: ['openmp/**', '!openmp/runtime/**']
63 changes: 63 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# LLVM Documentation CI
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

name: "Test documentation build"

permissions:
contents: read

on:
push:
branches:
- 'main'
paths:
- 'llvm/docs/**'
- 'clang/docs/**'
pull_request:
paths:
- 'llvm/docs/**'
- 'clang/docs/**'

jobs:
check-docs-build:
name: "Test documentation build"
runs-on: ubuntu-latest
steps:
- name: Fetch LLVM sources
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup Python env
uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip'
cache-dependency-path: 'llvm/docs/requirements.txt'
- name: Install python dependencies
run: pip install -r llvm/docs/requirements.txt
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake ninja-build
- name: Get subprojects that have doc changes
id: docs-changed-subprojects
uses: tj-actions/changed-files@v39
with:
files_yaml: |
llvm:
- 'llvm/docs/**'
clang:
- 'clang/docs/**'
- name: Build LLVM docs
if: steps.docs-changed-subprojects.outputs.llvm_any_changed == 'true'
run: |
cmake -B llvm-build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_SPHINX=ON -DSPHINX_OUTPUT_HTML=ON -DSPHINX_OUTPUT_MAN=ON ./llvm
TZ=UTC ninja -C llvm-build docs-llvm-html docs-llvm-man
- name: Build Clang docs
if: steps.docs-changed-subprojects.outputs.clang_any_changed == 'true'
run: |
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
TZ=UTC ninja -C clang-build docs-clang-html docs-clang-man
21 changes: 21 additions & 0 deletions .github/workflows/libcxx-check-generated-files.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "Check libc++ generated files"
on:
pull_request:
paths:
- 'libcxx/**'

jobs:
check_generated_files:
runs-on: ubuntu-latest
steps:
- name: Fetch LLVM sources
uses: actions/checkout@v4

- name: Install dependencies
uses: aminya/setup-cpp@v1
with:
clangformat: 17.0.1
ninja: true

- name: Check generated files
run: libcxx/utils/ci/run-buildbot check-generated-output
4 changes: 3 additions & 1 deletion .github/workflows/release-tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,16 +104,18 @@ jobs:
run: |
cd llvm/utils/lit
# Remove 'dev' suffix from lit version.
sed -i "s/ + 'dev'//g" lit/__init__.py
sed -i 's/ + "dev"//g' lit/__init__.py
python3 setup.py sdist
- name: Upload lit to test.pypi.org
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.LLVM_LIT_TEST_PYPI_API_TOKEN }}
repository-url: https://test.pypi.org/legacy/
packages-dir: llvm/utils/lit/dist/

- name: Upload lit to pypi.org
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.LLVM_LIT_PYPI_API_TOKEN }}
packages-dir: llvm/utils/lit/dist/
21 changes: 17 additions & 4 deletions bolt/include/bolt/Core/BinaryFunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,6 @@ class BinaryFunction {
static constexpr uint64_t COUNT_NO_PROFILE =
BinaryBasicBlock::COUNT_NO_PROFILE;

/// We have to use at least 2-byte alignment for functions because of C++ ABI.
static constexpr unsigned MinAlign = 2;

static const char TimerGroupName[];
static const char TimerGroupDesc[];

Expand Down Expand Up @@ -1720,8 +1717,24 @@ class BinaryFunction {
return *this;
}

Align getAlign() const { return Align(Alignment); }
uint16_t getMinAlignment() const {
// Align data in code BFs minimum to CI alignment
if (!size() && hasIslandsInfo())
return getConstantIslandAlignment();

// Minimal code alignment on AArch64 and RISCV is 4
if (BC.isAArch64() || BC.isRISCV())
return 4;

// We have to use at least 2-byte alignment for functions because
// of C++ ABI.
return 2;
}

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

uint16_t getAlignment() const { return Alignment; }
Align getAlign() const { return Align(getAlignment()); }

BinaryFunction &setMaxAlignmentBytes(uint16_t MaxAlignBytes) {
MaxAlignmentBytes = MaxAlignBytes;
Expand Down
4 changes: 4 additions & 0 deletions bolt/lib/Core/BinaryContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1803,6 +1803,10 @@ MarkerSymType BinaryContext::getMarkerType(const SymbolRef &Symbol) const {
if (*NameOrError == "$x" || NameOrError->startswith("$x."))
return MarkerSymType::CODE;

// $x<ISA>
if (isRISCV() && NameOrError->startswith("$x"))
return MarkerSymType::CODE;

if (*NameOrError == "$d" || NameOrError->startswith("$d."))
return MarkerSymType::DATA;

Expand Down
2 changes: 1 addition & 1 deletion bolt/lib/Core/BinaryEmitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ bool BinaryEmitter::emitFunction(BinaryFunction &Function,
// tentative layout.
Section->ensureMinAlignment(Align(opts::AlignFunctions));

Streamer.emitCodeAlignment(Align(BinaryFunction::MinAlign), &*BC.STI);
Streamer.emitCodeAlignment(Function.getMinAlign(), &*BC.STI);
uint16_t MaxAlignBytes = FF.isSplitFragment()
? Function.getMaxColdAlignmentBytes()
: Function.getMaxAlignmentBytes();
Expand Down
2 changes: 0 additions & 2 deletions bolt/lib/Core/BinaryFunction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,6 @@ bool shouldPrint(const BinaryFunction &Function) {
namespace llvm {
namespace bolt {

constexpr unsigned BinaryFunction::MinAlign;

template <typename R> static bool emptyRange(const R &Range) {
return Range.begin() == Range.end();
}
Expand Down
Loading

0 comments on commit 8fe166f

Please sign in to comment.