Skip to content

Commit

Permalink
Merge branch 'main' into fold-icmp-eq-zext-eq-self
Browse files Browse the repository at this point in the history
  • Loading branch information
dtcxzyw authored Oct 1, 2023
2 parents c0d8f81 + 0b0ed8f commit 2e5fe7b
Show file tree
Hide file tree
Showing 6,521 changed files with 414,453 additions and 301,478 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .ci/generate-buildkite-pipeline-premerge
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ set -o pipefail

# Environment variables script works with:
# 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
4 changes: 2 additions & 2 deletions .github/new-issues-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
'libc++':
- '/libc[+x]{2}(?!\-)/i'

'libc++-abi':
- '/libc[+x]{2}-abi/i'
'libc++abi':
- '/libc[+x]{2}-?abi/i'

'libc':
- '/\blibc(?![-+])\b/i'
Expand Down
29 changes: 13 additions & 16 deletions .github/new-prs-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,6 @@ lld:
llvm-lit:
- llvm/utils/lit/**/*

mlir:afine:
- mlir/**/Affine/**/*

mlir:python:
- mlir/python/**/*

mlir:vectorops:
- mlir/**/Vector/**/*

PGO:
- llvm/lib/Transforms/Instrumentation/CGProfile.cpp
- llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp
Expand Down Expand Up @@ -90,6 +81,10 @@ compiler-rt:sanitizer:
- compiler-rt/lib/scudo/**
- compiler-rt/test/scudo/**

compiler-rt:scudo:
- compiler-rt/lib/scudo/**
- compiler-rt/test/scudo/**

xray:
- llvm/tools/llvm-xray/**
- compiler-rt/*/xray/**
Expand Down Expand Up @@ -259,6 +254,15 @@ mlir:vector:
mlir:execution-engine:
- mlir/**/ExecutionEngine/**

mlir:presburger:
- mlir/**/*Presburger*/**

mlir:python:
- mlir/python/**/*

mlir:vectorops:
- mlir/**/Vector/**/*

coroutines:
- clang/docs/DebuggingCoroutines.rst
- clang/lib/Sema/SemaCoroutine.cpp
Expand Down Expand Up @@ -305,10 +309,6 @@ tools:llvm-mca:
- llvm/include/llvm/MCA/**
- llvm/lib/MCA/**

vectorizers:
- llvm/lib/Transforms/Vectorize/**
- llvm/include/llvm/Transforms/Vectorize/**

clang:
- any:
- clang/**
Expand Down Expand Up @@ -633,9 +633,6 @@ llvm:regalloc:
- llvm/include/llvm/CodeGen/Spiller.h
- llvm/**/*RegAlloc

mlir:presburger:
- mlir/**/*Presburger

lldb:
- lldb/**

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/issue-release-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
if: >-
(github.repository == 'llvm/llvm-project') &&
!startswith(github.event.comment.body, '<!--IGNORE-->') &&
contains(github.event.comment.body, '/branch')
contains(github.event.comment.body, '/branch ')
steps:
- name: Fetch LLVM sources
Expand Down
54 changes: 54 additions & 0 deletions .github/workflows/pr-code-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: "Check code formatting"
on: pull_request_target
permissions:
pull-requests: write

jobs:
code_formatter:
runs-on: ubuntu-latest
steps:
- name: Fetch LLVM sources
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v39
with:
separator: ","
fetch_depth: 100 # Fetches only the last 10 commits

- name: "Listed files"
run: |
echo "Formatting files:"
echo "${{ steps.changed-files.outputs.all_changed_files }}"
- name: Install clang-format
uses: aminya/setup-cpp@v1
with:
clangformat: 17.0.1

- name: Setup Python env
uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip'
cache-dependency-path: 'llvm/utils/git/requirements_formatting.txt'

- name: Install python dependencies
run: pip install -r llvm/utils/git/requirements_formatting.txt

- name: Run code formatter
env:
GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }}
START_REV: ${{ github.event.pull_request.base.sha }}
END_REV: ${{ github.event.pull_request.head.sha }}
CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
python llvm/utils/git/code-format-helper.py \
--token ${{ secrets.GITHUB_TOKEN }} \
--issue-number $GITHUB_PR_NUMBER \
--start-rev $START_REV \
--end-rev $END_REV \
--changed-files "$CHANGED_FILES"
39 changes: 0 additions & 39 deletions .github/workflows/pr-python-format.yml

This file was deleted.

6 changes: 6 additions & 0 deletions .github/workflows/pr-receive.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
name: PR Receive
on:
pull_request_target:
types:
- opened
- reopened
- ready_for_review
- synchronize

permissions:
contents: read
Expand All @@ -15,6 +20,7 @@ jobs:
# to rebase. We want to ignore these pull requests to avoid excessive
# notifications.
if: github.repository == 'llvm/llvm-project' &&
github.event.pull_request.draft == false &&
github.event.pull_request.commits < 10
steps:
- name: Store PR Information
Expand Down
27 changes: 18 additions & 9 deletions .github/workflows/release-tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,19 @@ jobs:
release_version=$(echo "${{ github.ref_name }}" | sed 's/llvmorg-//g')
echo "release-version=$release_version" >> "$GITHUB_OUTPUT"
- name: Checkout LLVM
uses: actions/checkout@v4

- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
doxygen \
graphviz \
python3-github \
python3-recommonmark \
python3-sphinx \
ninja-build \
texlive-font-utils
pip3 install --user sphinx-markdown-tables
- name: Checkout LLVM
uses: actions/checkout@v4
pip3 install --user -r ./llvm/docs/requirements.txt
- name: Create Release
run: |
Expand Down Expand Up @@ -83,13 +81,24 @@ jobs:
- name: Checkout LLVM
uses: actions/checkout@v4

- name: Setup Cpp
uses: aminya/setup-cpp@v1
with:
compiler: llvm-16.0.6
cmake: true
ninja: true

- name: Install dependencies
run: sudo apt-get install -y python3-setuptools
run: |
sudo apt-get update
sudo apt-get install -y python3-setuptools python3-psutil
- name: Test lit
run: |
cd llvm/utils/lit
python3 lit.py tests
mkdir build && cd build
export FILECHECK_OPTS='-dump-input-filter=all -vv -color'
cmake ../llvm -DCMAKE_BUILD_TYPE=Release -G Ninja
ninja -v -j $(nproc) check-lit
- name: Package lit
run: |
Expand Down
19 changes: 15 additions & 4 deletions bolt/include/bolt/Core/MCPlusBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "llvm/Support/Allocator.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/ErrorOr.h"
#include "llvm/Support/RWMutex.h"
#include <cassert>
#include <cstdint>
#include <map>
Expand Down Expand Up @@ -166,10 +167,15 @@ class MCPlusBuilder {
/// Names of non-standard annotations.
SmallVector<std::string, 8> AnnotationNames;

/// A mutex that is used to control parallel accesses to
/// AnnotationNameIndexMap and AnnotationsNames.
mutable llvm::sys::RWMutex AnnotationNameMutex;

/// Allocate the TailCall annotation value. Clients of the target-specific
/// MCPlusBuilder classes must use convert/lower/create* interfaces instead.
void setTailCall(MCInst &Inst);

public:
/// Transfer annotations from \p SrcInst to \p DstInst.
void moveAnnotations(MCInst &&SrcInst, MCInst &DstInst) const {
assert(!getAnnotationInst(DstInst) &&
Expand All @@ -182,7 +188,6 @@ class MCPlusBuilder {
removeAnnotationInst(SrcInst);
}

public:
/// Return iterator range covering def operands.
iterator_range<MCInst::iterator> defOperands(MCInst &Inst) const {
return make_range(Inst.begin(),
Expand Down Expand Up @@ -621,6 +626,11 @@ class MCPlusBuilder {
return Info->get(Inst.getOpcode()).mayStore();
}

virtual bool isAArch64Exclusive(const MCInst &Inst) const {
llvm_unreachable("not implemented");
return false;
}

virtual bool isCleanRegXOR(const MCInst &Inst) const {
llvm_unreachable("not implemented");
return false;
Expand Down Expand Up @@ -1775,6 +1785,7 @@ class MCPlusBuilder {

/// Return annotation index matching the \p Name.
std::optional<unsigned> getAnnotationIndex(StringRef Name) const {
std::shared_lock<llvm::sys::RWMutex> Lock(AnnotationNameMutex);
auto AI = AnnotationNameIndexMap.find(Name);
if (AI != AnnotationNameIndexMap.end())
return AI->second;
Expand All @@ -1784,10 +1795,10 @@ class MCPlusBuilder {
/// Return annotation index matching the \p Name. Create a new index if the
/// \p Name wasn't registered previously.
unsigned getOrCreateAnnotationIndex(StringRef Name) {
auto AI = AnnotationNameIndexMap.find(Name);
if (AI != AnnotationNameIndexMap.end())
return AI->second;
if (std::optional<unsigned> Index = getAnnotationIndex(Name))
return *Index;

std::unique_lock<llvm::sys::RWMutex> Lock(AnnotationNameMutex);
const unsigned Index =
AnnotationNameIndexMap.size() + MCPlus::MCAnnotation::kGeneric;
AnnotationNameIndexMap.insert(std::make_pair(Name, Index));
Expand Down
Loading

0 comments on commit 2e5fe7b

Please sign in to comment.