Skip to content

Commit b80c1c4

Browse files
committed
Merge remote-tracking branch 'origin/sycl' into private/asachkov/generic-module-splitter
2 parents 863abed + e6d72dc commit b80c1c4

File tree

3,143 files changed

+188153
-57378
lines changed

Some content is hidden

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

3,143 files changed

+188153
-57378
lines changed

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ devops/ @intel/dpcpp-devops-reviewers
8989

9090
# Kernel fusion JIT compiler
9191
sycl-fusion/ @victor-eds @Naghasan @sommerlukas
92+
sycl/doc/design/KernelFusionJIT.md @victor-eds @Naghasan @sommerlukas
9293
sycl/doc/extensions/experimental/sycl_ext_codeplay_kernel_fusion.asciidoc @victor-eds @Naghasan @sommerlukas
9394
sycl/include/sycl/ext/codeplay/experimental/fusion_properties.hpp @victor-eds @Naghasan @sommerlukas
9495
sycl/include/sycl/ext/codeplay/experimental/fusion_wrapper.hpp @victor-eds @Naghasan @sommerlukas
@@ -97,3 +98,4 @@ sycl/source/detail/jit_compiler.hpp @victor-eds @Naghasan @sommerlukas
9798
sycl/source/detail/jit_compiler.cpp @victor-eds @Naghasan @sommerlukas
9899
sycl/source/detail/jit_device_binaries.hpp @victor-eds @Naghasan @sommerlukas
99100
sycl/source/detail/jit_device_binaries.cpp @victor-eds @Naghasan @sommerlukas
101+
sycl/test-e2e/KernelFusion @victor-eds @Naghasan @sommerlukas

.github/workflows/sycl_precommit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969

7070
windows_default:
7171
name: Windows
72-
needs: test_matrix
72+
needs: [lint, test_matrix]
7373
if: github.repository == 'intel/llvm'
7474
uses: ./.github/workflows/sycl_windows_build_and_test.yml
7575
with:

bolt/include/bolt/Core/BinaryContext.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1227,8 +1227,7 @@ class BinaryContext {
12271227
Emitter = this->MCE.get();
12281228
SmallString<256> Code;
12291229
SmallVector<MCFixup, 4> Fixups;
1230-
raw_svector_ostream VecOS(Code);
1231-
Emitter->encodeInstruction(Inst, VecOS, Fixups, *STI);
1230+
Emitter->encodeInstruction(Inst, Code, Fixups, *STI);
12321231
return Code.size();
12331232
}
12341233

bolt/lib/Core/BinaryContext.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2289,9 +2289,8 @@ bool BinaryContext::validateInstructionEncoding(
22892289

22902290
SmallString<256> Code;
22912291
SmallVector<MCFixup, 4> Fixups;
2292-
raw_svector_ostream VecOS(Code);
22932292

2294-
MCE->encodeInstruction(Inst, VecOS, Fixups, *STI);
2293+
MCE->encodeInstruction(Inst, Code, Fixups, *STI);
22952294
auto OutputSequence = ArrayRef<uint8_t>((uint8_t *)Code.data(), Code.size());
22962295
if (InputSequence != OutputSequence) {
22972296
if (opts::Verbosity > 1) {

bolt/lib/Core/BinaryFunction.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1536,8 +1536,7 @@ bool BinaryFunction::scanExternalRefs() {
15361536
// Emit the instruction using temp emitter and generate relocations.
15371537
SmallString<256> Code;
15381538
SmallVector<MCFixup, 4> Fixups;
1539-
raw_svector_ostream VecOS(Code);
1540-
Emitter.MCE->encodeInstruction(Instruction, VecOS, Fixups, *BC.STI);
1539+
Emitter.MCE->encodeInstruction(Instruction, Code, Fixups, *BC.STI);
15411540

15421541
// Create relocation for every fixup.
15431542
for (const MCFixup &Fixup : Fixups) {
@@ -2039,6 +2038,7 @@ bool BinaryFunction::buildCFG(MCPlusBuilder::AllocatorIdTy AllocatorId) {
20392038
MCInst *PrevInstr = PrevBB->getLastNonPseudoInstr();
20402039
assert(PrevInstr && "no previous instruction for a fall through");
20412040
if (MIB->isUnconditionalBranch(Instr) &&
2041+
!MIB->isIndirectBranch(*PrevInstr) &&
20422042
!MIB->isUnconditionalBranch(*PrevInstr) &&
20432043
!MIB->getConditionalTailCall(*PrevInstr) &&
20442044
!MIB->isReturn(*PrevInstr)) {

bolt/lib/Core/DebugData.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1166,7 +1166,7 @@ void DebugStrOffsetsWriter::initialize(
11661166
"Dwarf String Offsets Byte Size is not supported.");
11671167
uint32_t Index = 0;
11681168
for (uint64_t Offset = 0; Offset < Contr->Size; Offset += DwarfOffsetByteSize)
1169-
IndexToAddressMap[Index++] = *reinterpret_cast<const uint32_t *>(
1169+
IndexToAddressMap[Index++] = support::endian::read32le(
11701170
StrOffsetsSection.Data.data() + Contr->Base + Offset);
11711171
}
11721172

bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ class AArch64MCPlusBuilder : public MCPlusBuilder {
265265
return true;
266266
}
267267

268-
DispImm = Inst.getOperand(I).getImm() << 2;
268+
DispImm = Inst.getOperand(I).getImm() * 4;
269269
return true;
270270
}
271271
return false;

bolt/test/X86/section-end-sym.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## Check that BOLT doesn't consider end-of-section symbols (e.g., _etext) as
22
## functions.
33

4-
# REQUIRES: system-linux, asserts
4+
# REQUIRES: x86_64-linux, asserts
55

66
# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-linux %s -o %t.o
77
# RUN: ld.lld %t.o -o %t.exe -q

bolt/test/X86/unreachable-jmp.s

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# This checks that we don't create an invalid CFG when there is an
2+
# unreachable direct jump right after an indirect one.
3+
4+
# REQUIRES: system-linux
5+
6+
# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown \
7+
# RUN: %s -o %t.o
8+
# RUN: link_fdata %s %t.o %t.fdata
9+
# RUN: llvm-strip --strip-unneeded %t.o
10+
# RUN: %clang %cflags -no-pie %t.o -o %t.exe -Wl,-q -nostdlib
11+
# RUN: llvm-bolt %t.exe -o %t.out --data %t.fdata \
12+
# RUN: --eliminate-unreachable --print-cfg | FileCheck %s
13+
14+
.globl _start
15+
.type _start, %function
16+
_start:
17+
.cfi_startproc
18+
# FDATA: 0 [unknown] 0 1 _start 0 0 1
19+
push %rbp
20+
mov %rsp, %rbp
21+
push %rbx
22+
push %r14
23+
subq $0x20, %rsp
24+
movq %rdi, %rcx
25+
b:
26+
jmpq *JUMP_TABLE(,%rcx,8)
27+
# FDATA: 1 _start #b# 1 _start #hotpath# 0 20
28+
# Unreachable direct jump here. Our CFG should still make sense and properly
29+
# place this instruction in a new basic block.
30+
jmp .lbb2
31+
.lbb1: je .lexit
32+
.lbb2:
33+
xorq %rax, %rax
34+
addq $0x20, %rsp
35+
pop %r14
36+
pop %rbx
37+
pop %rbp
38+
ret
39+
hotpath:
40+
movq $2, %rax
41+
addq $0x20, %rsp
42+
pop %r14
43+
pop %rbx
44+
pop %rbp
45+
ret
46+
.lexit:
47+
movq $1, %rax
48+
addq $0x20, %rsp
49+
pop %r14
50+
pop %rbx
51+
pop %rbp
52+
ret
53+
.cfi_endproc
54+
.size _start, .-_start
55+
56+
.rodata
57+
.globl JUMP_TABLE
58+
JUMP_TABLE:
59+
.quad .lbb1
60+
.quad .lbb2
61+
.quad hotpath
62+
63+
# No basic blocks above should have 4 successors! That is a bug.
64+
# CHECK-NOT: Successors: {{.*}} (mispreds: 0, count: 20), {{.*}} (mispreds: 0, count: 0), {{.*}} (mispreds: 0, count: 0), {{.*}} (mispreds: 0, count: 0)
65+
# Check successful removal of stray direct jmp
66+
# CHECK: UCE removed 1 block

clang-tools-extra/clang-include-fixer/find-all-symbols/STLPostfixHeaderMap.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ const HeaderMapCollector::RegexHeaderMap *getSTLPostfixHeaderMap() {
267267
{"unordered_set$", "<unordered_set>"},
268268
{"utility$", "<utility>"},
269269
{"valarray$", "<valarray>"},
270+
{"variant$", "<variant>"},
270271
{"vector$", "<vector>"},
271272
{"include/complex.h$", "<complex.h>"},
272273
{"include/ctype.h$", "<cctype>"},

0 commit comments

Comments
 (0)