Skip to content

Commit 1726491

Browse files
committed
Merge remote-tracking branch 'intel/sycl' into cpu-range-reduction-performance
2 parents 245ef3c + 4baeb81 commit 1726491

File tree

11,692 files changed

+482732
-241530
lines changed

Some content is hidden

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

11,692 files changed

+482732
-241530
lines changed

.git-blame-ignore-revs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,6 @@ d8f0e6caa91e230a486c948ab643174e40bdf215
4343

4444
# Use C++11 default member initializers in LLDB. NFC.
4545
9494c510af56d9c8593ab69017dcaa232210b235
46+
47+
# [libc++][NFC] clang-format <__config>
48+
ac251726f84d5b7e6533a2e3712920184435b61b

.github/workflows/closed-issues.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ jobs:
1010
steps:
1111
- uses: andymckay/labeler@1.0.4
1212
with:
13-
remove-labels: "awaiting-review"
13+
remove-labels: 'awaiting-review'

.github/workflows/issue-release-workflow.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# /cherry-pick <commit> <...>
55
#
66
# This comment will attempt to cherry-pick the given commits to the latest
7-
# release branch (release/Y.x) and if successful push the result to a branch
7+
# release branch (release/Y.x) and if successful, push the result to a branch
88
# on github.
99
#
1010
# /branch <owner>/<repo>/<branch>
@@ -31,9 +31,9 @@ jobs:
3131
name: Backport Commits
3232
runs-on: ubuntu-20.04
3333
if: >-
34-
(github.repository == 'llvm/llvm-project') &&
35-
!startswith(github.event.comment.body, '<!--IGNORE-->') &&
36-
contains(github.event.action == 'opened' && github.event.issue.body || github.event.comment.body, '/cherry-pick')
34+
(github.repository == 'llvm/llvm-project') &&
35+
!startswith(github.event.comment.body, '<!--IGNORE-->') &&
36+
contains(github.event.action == 'opened' && github.event.issue.body || github.event.comment.body, '/cherry-pick')
3737
steps:
3838
- name: Fetch LLVM sources
3939
uses: actions/checkout@v2
@@ -64,16 +64,16 @@ jobs:
6464
name: Create Pull Request
6565
runs-on: ubuntu-20.04
6666
if: >-
67-
(github.repository == 'llvm/llvm-project') &&
68-
!startswith(github.event.comment.body, '<!--IGNORE-->') &&
69-
contains(github.event.comment.body, '/branch')
67+
(github.repository == 'llvm/llvm-project') &&
68+
!startswith(github.event.comment.body, '<!--IGNORE-->') &&
69+
contains(github.event.comment.body, '/branch')
7070
7171
steps:
7272
- name: Fetch LLVM sources
7373
uses: actions/checkout@v2
7474

7575
- name: Setup Environment
76-
run: |
76+
run: |
7777
pip install -r ./llvm/utils/git/requirements.txt
7878
7979
- name: Create Pull Request

.github/workflows/issue-subscriber.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,20 @@ jobs:
1010
runs-on: ubuntu-latest
1111
if: github.repository == 'llvm/llvm-project'
1212
steps:
13-
- name: Setup Automation Script
14-
run: |
15-
curl -O -L https://raw.githubusercontent.com/$GITHUB_REPOSITORY/$GITHUB_SHA/llvm/utils/git/github-automation.py
16-
curl -O -L https://raw.githubusercontent.com/$GITHUB_REPOSITORY/$GITHUB_SHA/llvm/utils/git/requirements.txt
17-
chmod a+x github-automation.py
18-
pip install -r requirements.txt
13+
- name: Setup Automation Script
14+
run: |
15+
curl -O -L https://raw.githubusercontent.com/$GITHUB_REPOSITORY/$GITHUB_SHA/llvm/utils/git/github-automation.py
16+
curl -O -L https://raw.githubusercontent.com/$GITHUB_REPOSITORY/$GITHUB_SHA/llvm/utils/git/requirements.txt
17+
chmod a+x github-automation.py
18+
pip install -r requirements.txt
1919
20-
- name: Update watchers
21-
# https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
22-
env:
23-
LABEL_NAME: ${{ github.event.label.name }}
24-
run: |
25-
./github-automation.py \
26-
--token '${{ secrets.ISSUE_SUBSCRIBER_TOKEN }}' \
27-
issue-subscriber \
28-
--issue-number '${{ github.event.issue.number }}' \
29-
--label-name "$LABEL_NAME"
20+
- name: Update watchers
21+
# https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
22+
env:
23+
LABEL_NAME: ${{ github.event.label.name }}
24+
run: |
25+
./github-automation.py \
26+
--token '${{ secrets.ISSUE_SUBSCRIBER_TOKEN }}' \
27+
issue-subscriber \
28+
--issue-number '${{ github.event.issue.number }}' \
29+
--label-name "$LABEL_NAME"

.github/workflows/llvm-bugs.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,39 +19,39 @@ jobs:
1919
MAILGUN_API_KEY: ${{ secrets.LLVM_BUGS_KEY }}
2020
with:
2121
script: |
22-
const Mailgun = require("mailgun.js");
22+
const Mailgun = require('mailgun.js');
2323
const formData = require('form-data');
24-
const mailgun = new Mailgun(formData);
2524
26-
const DOMAIN = "email.llvm.org";
25+
const mailgun = new Mailgun(formData);
26+
const DOMAIN = 'email.llvm.org';
2727
28-
const mg = mailgun.client({username: 'api', key: process.env.MAILGUN_API_KEY});
28+
const mg = mailgun.client({ username: 'api', key: process.env.MAILGUN_API_KEY });
2929
3030
github.rest.issues.get({
3131
issue_number: context.issue.number,
3232
owner: context.repo.owner,
33-
repo: context.repo.repo,
33+
repo: context.repo.repo
3434
})
35-
.then(function(issue) {
35+
.then((issue) => {
3636
const payload = {
3737
author : issue.data.user.login,
3838
issue : issue.data.number,
3939
title : issue.data.title,
4040
url : issue.data.html_url,
41-
labels : issue.data.labels.map(label => { return label.name }),
42-
assignee : issue.data.assignees.map(assignee => { return assignee.login }),
41+
labels : issue.data.labels.map((label) => label.name),
42+
assignee : issue.data.assignees.map((assignee) => assignee.login),
4343
body : issue.data.body
4444
};
45-
45+
4646
const data = {
47-
from: "LLVM Bugs <llvm-bugs@email.llvm.org>",
48-
to: "llvm-bugs@lists.llvm.org",
47+
from: 'LLVM Bugs <llvm-bugs@email.llvm.org>',
48+
to: 'llvm-bugs@lists.llvm.org',
4949
subject: `[Bug ${issue.data.number}] ${issue.data.title}`,
50-
template: "new-github-issue",
50+
template: 'new-github-issue',
5151
'o:tracking-clicks': 'no',
5252
'h:X-Mailgun-Variables': JSON.stringify(payload)
5353
};
5454
55-
return mg.messages.create(DOMAIN, data)
55+
return mg.messages.create(DOMAIN, data);
5656
})
57-
.then(msg => console.log(msg));
57+
.then((msg) => console.log(msg));

.github/workflows/new-issues.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ jobs:
1010
steps:
1111
- uses: andymckay/labeler@1.0.4
1212
with:
13-
add-labels: "new issue"
13+
add-labels: 'new issue'
1414
ignore-if-labeled: true

.github/workflows/sycl_cleanup.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
run_id: context.payload.workflow_run.id,
2222
});
2323
let matchArtifacts = allArtifacts.data.artifacts.filter((artifact) => {
24-
return artifact.name.startsWith("sycl_linux_");
24+
return artifact.name.match(/^sycl_(linux|windows)_/);
2525
});
2626
matchArtifacts.forEach(async (artifact) => {
2727
await github.rest.actions.deleteArtifact({

.github/workflows/sycl_linux_build_and_test.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,6 @@ jobs:
151151
cmake --build $GITHUB_WORKSPACE/build --target install-llvm-cov
152152
cmake --build $GITHUB_WORKSPACE/build --target install-llvm-profdata
153153
cmake --build $GITHUB_WORKSPACE/build --target install-compiler-rt
154-
# TODO this should be resolved in CMakeLists.txt
155-
cmake --build $GITHUB_WORKSPACE/build --target install-lld || echo "skipped"
156154
157155
- name: Pack toolchain
158156
run: tar -cJf llvm_sycl.tar.xz -C $GITHUB_WORKSPACE/build/install .

bolt/include/bolt/Core/BinaryBasicBlock.h

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,9 @@ class BinaryBasicBlock {
150150
BinaryBasicBlock &operator=(const BinaryBasicBlock &) = delete;
151151
BinaryBasicBlock &operator=(const BinaryBasicBlock &&) = delete;
152152

153-
explicit BinaryBasicBlock(BinaryFunction *Function, MCSymbol *Label,
154-
uint32_t Offset = INVALID_OFFSET)
153+
explicit BinaryBasicBlock(BinaryFunction *Function, MCSymbol *Label)
155154
: Function(Function), Label(Label) {
156155
assert(Function && "Function must be non-null");
157-
InputRange.first = Offset;
158156
}
159157

160158
// Exclusively managed by BinaryFunction.
@@ -561,6 +559,12 @@ class BinaryBasicBlock {
561559
/// Set minimum alignment for the basic block.
562560
void setAlignment(uint32_t Align) { Alignment = Align; }
563561

562+
/// Set alignment of the block based on the alignment of its offset.
563+
void setDerivedAlignment() {
564+
const uint64_t DerivedAlignment = getOffset() & (1 + ~getOffset());
565+
Alignment = std::min(DerivedAlignment, uint64_t(32));
566+
}
567+
564568
/// Return required alignment for the block.
565569
uint32_t getAlignment() const { return Alignment; }
566570

@@ -787,6 +791,9 @@ class BinaryBasicBlock {
787791
/// at the split point.
788792
BinaryBasicBlock *splitAt(iterator II);
789793

794+
/// Set start offset of this basic block in the input binary.
795+
void setOffset(uint32_t Offset) { InputRange.first = Offset; };
796+
790797
/// Sets address of the basic block in the output.
791798
void setOutputStartAddress(uint64_t Address) {
792799
OutputAddressRange.first = Address;

bolt/include/bolt/Core/BinaryContext.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ class BinaryContext {
239239
Optional<DWARFUnit *> getDWOCU(uint64_t DWOId);
240240

241241
/// Returns DWOContext if it exists.
242-
DWARFContext *getDWOContext();
242+
DWARFContext *getDWOContext() const;
243243

244244
/// Get Number of DWOCUs in a map.
245245
uint32_t getNumDWOCUs() { return DWOCUs.size(); }
@@ -498,6 +498,14 @@ class BinaryContext {
498498
/// to function \p BF.
499499
std::string generateJumpTableName(const BinaryFunction &BF, uint64_t Address);
500500

501+
/// Free memory used by jump table offsets
502+
void clearJumpTableOffsets() {
503+
for (auto &JTI : JumpTables) {
504+
JumpTable &JT = *JTI.second;
505+
JumpTable::OffsetsType Temp;
506+
Temp.swap(JT.OffsetEntries);
507+
}
508+
}
501509
/// Return true if the array of bytes represents a valid code padding.
502510
bool hasValidCodePadding(const BinaryFunction &BF);
503511

0 commit comments

Comments
 (0)