Skip to content

Commit 626beed

Browse files
authored
Merge branch 'sycl' into private/bb-sycl/Lin_GPU_RT_Uplift_22.11.22682
2 parents 36783d3 + cb4e702 commit 626beed

File tree

2,943 files changed

+162494
-64977
lines changed

Some content is hidden

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

2,943 files changed

+162494
-64977
lines changed

.github/CODEOWNERS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,8 @@ esimd/ @intel/dpcpp-esimd-reviewers
5656
sycl/include/sycl/ext/intel/esimd.hpp @intel/dpcpp-esimd-reviewers
5757
sycl/doc/extensions/experimental/sycl_ext_intel_esimd/ @intel/dpcpp-esimd-reviewers
5858
llvm/lib/SYCLLowerIR/CMakeLists.txt @intel/dpcpp-tools-reviewers @intel/dpcpp-esimd-reviewers
59+
60+
# DevOps configs
61+
.github/workflows/ @intel/dpcpp-devops-reviewers
62+
buildbot/ @intel/dpcpp-devops-reviewers
63+
devops/ @intel/dpcpp-devops-reviewers

.github/workflows/sycl_linux_build_and_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ on:
3939
intel_drivers_image:
4040
type: string
4141
required: false
42-
default: "ghcr.io/intel/llvm/ubuntu2004_intel_drivers:unstable"
42+
default: "ghcr.io/intel/llvm/ubuntu2004_intel_drivers:latest"
4343
lts_config:
4444
type: string
4545
required: false

.github/workflows/sycl_precommit.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ on:
66
- sycl
77
# Do not run builds if changes are only in the following locations
88
paths-ignore:
9+
- '.github/ISSUE_TEMPLATE/**'
10+
- '.github/CODEOWNERS'
911
- 'devops/containers/**'
1012
- 'devops/scripts/install_drivers.sh'
1113
- 'devops/scripts/install_build_tools.sh'

bolt/lib/Passes/LongJmp.cpp

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -322,14 +322,20 @@ uint64_t LongJmpPass::tentativeLayoutRelocMode(
322322
uint32_t CurrentIndex = 0;
323323
if (opts::HotFunctionsAtEnd) {
324324
for (BinaryFunction *BF : SortedFunctions) {
325-
if (BF->hasValidIndex() && LastHotIndex == -1u)
325+
if (BF->hasValidIndex()) {
326326
LastHotIndex = CurrentIndex;
327+
break;
328+
}
329+
327330
++CurrentIndex;
328331
}
329332
} else {
330333
for (BinaryFunction *BF : SortedFunctions) {
331-
if (!BF->hasValidIndex() && LastHotIndex == -1u)
334+
if (!BF->hasValidIndex()) {
332335
LastHotIndex = CurrentIndex;
336+
break;
337+
}
338+
333339
++CurrentIndex;
334340
}
335341
}
@@ -386,17 +392,23 @@ void LongJmpPass::tentativeLayout(
386392
}
387393

388394
// Relocation mode
389-
uint64_t EstimatedTextSize = tentativeLayoutRelocMode(BC, SortedFunctions, 0);
395+
uint64_t EstimatedTextSize = 0;
396+
if (opts::UseOldText) {
397+
EstimatedTextSize = tentativeLayoutRelocMode(BC, SortedFunctions, 0);
398+
399+
// Initial padding
400+
if (EstimatedTextSize <= BC.OldTextSectionSize) {
401+
DotAddress = BC.OldTextSectionAddress;
402+
uint64_t Pad =
403+
offsetToAlignment(DotAddress, llvm::Align(opts::AlignText));
404+
if (Pad + EstimatedTextSize <= BC.OldTextSectionSize) {
405+
DotAddress += Pad;
406+
}
407+
}
408+
}
390409

391-
// Initial padding
392-
if (opts::UseOldText && EstimatedTextSize <= BC.OldTextSectionSize) {
393-
DotAddress = BC.OldTextSectionAddress;
394-
uint64_t Pad = offsetToAlignment(DotAddress, llvm::Align(opts::AlignText));
395-
if (Pad + EstimatedTextSize <= BC.OldTextSectionSize)
396-
DotAddress += Pad;
397-
} else {
410+
if (!EstimatedTextSize || EstimatedTextSize > BC.OldTextSectionSize)
398411
DotAddress = alignTo(BC.LayoutStartAddress, opts::AlignText);
399-
}
400412

401413
tentativeLayoutRelocMode(BC, SortedFunctions, DotAddress);
402414
}

bolt/lib/Passes/LoopInversionPass.cpp

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,16 @@ bool LoopInversionPass::runOnFunction(BinaryFunction &BF) {
5454
}
5555
}
5656

57-
assert(SecondSucc != nullptr && "Unable to find second BB successor");
58-
const uint64_t BBCount = SuccBB->getBranchInfo(*BB).Count;
59-
const uint64_t OtherCount = SuccBB->getBranchInfo(*SecondSucc).Count;
60-
if ((BBCount < OtherCount) && (BBIndex > SuccBBIndex))
57+
assert(SecondSucc != nullptr && "Unable to find a second BB successor");
58+
const uint64_t LoopCount = SuccBB->getBranchInfo(*BB).Count;
59+
const uint64_t ExitCount = SuccBB->getBranchInfo(*SecondSucc).Count;
60+
61+
if (LoopCount < ExitCount) {
62+
if (BBIndex > SuccBBIndex)
63+
continue;
64+
} else if (BBIndex < SuccBBIndex) {
6165
continue;
66+
}
6267

6368
IsChanged = true;
6469
BB->setLayoutIndex(SuccBBIndex);

bolt/lib/Target/X86/X86MCPlusBuilder.cpp

Lines changed: 6 additions & 228 deletions
Original file line numberDiff line numberDiff line change
@@ -64,219 +64,6 @@ unsigned getShortArithOpcode(unsigned Opcode) {
6464
return X86::getShortOpcodeArith(Opcode);
6565
}
6666

67-
bool isADD(unsigned Opcode) {
68-
switch (Opcode) {
69-
default:
70-
return false;
71-
case X86::ADD16i16:
72-
case X86::ADD16mi:
73-
case X86::ADD16mi8:
74-
case X86::ADD16mr:
75-
case X86::ADD16ri:
76-
case X86::ADD16ri8:
77-
case X86::ADD16ri8_DB:
78-
case X86::ADD16ri_DB:
79-
case X86::ADD16rm:
80-
case X86::ADD16rr:
81-
case X86::ADD16rr_DB:
82-
case X86::ADD16rr_REV:
83-
case X86::ADD32i32:
84-
case X86::ADD32mi:
85-
case X86::ADD32mi8:
86-
case X86::ADD32mr:
87-
case X86::ADD32ri:
88-
case X86::ADD32ri8:
89-
case X86::ADD32ri8_DB:
90-
case X86::ADD32ri_DB:
91-
case X86::ADD32rm:
92-
case X86::ADD32rr:
93-
case X86::ADD32rr_DB:
94-
case X86::ADD32rr_REV:
95-
case X86::ADD64i32:
96-
case X86::ADD64mi32:
97-
case X86::ADD64mi8:
98-
case X86::ADD64mr:
99-
case X86::ADD64ri32:
100-
case X86::ADD64ri32_DB:
101-
case X86::ADD64ri8:
102-
case X86::ADD64ri8_DB:
103-
case X86::ADD64rm:
104-
case X86::ADD64rr:
105-
case X86::ADD64rr_DB:
106-
case X86::ADD64rr_REV:
107-
case X86::ADD8i8:
108-
case X86::ADD8mi:
109-
case X86::ADD8mi8:
110-
case X86::ADD8mr:
111-
case X86::ADD8ri:
112-
case X86::ADD8ri8:
113-
case X86::ADD8rm:
114-
case X86::ADD8rr:
115-
case X86::ADD8rr_REV:
116-
return true;
117-
}
118-
}
119-
120-
bool isAND(unsigned Opcode) {
121-
switch (Opcode) {
122-
default:
123-
return false;
124-
case X86::AND16i16:
125-
case X86::AND16mi:
126-
case X86::AND16mi8:
127-
case X86::AND16mr:
128-
case X86::AND16ri:
129-
case X86::AND16ri8:
130-
case X86::AND16rm:
131-
case X86::AND16rr:
132-
case X86::AND16rr_REV:
133-
case X86::AND32i32:
134-
case X86::AND32mi:
135-
case X86::AND32mi8:
136-
case X86::AND32mr:
137-
case X86::AND32ri:
138-
case X86::AND32ri8:
139-
case X86::AND32rm:
140-
case X86::AND32rr:
141-
case X86::AND32rr_REV:
142-
case X86::AND64i32:
143-
case X86::AND64mi32:
144-
case X86::AND64mi8:
145-
case X86::AND64mr:
146-
case X86::AND64ri32:
147-
case X86::AND64ri8:
148-
case X86::AND64rm:
149-
case X86::AND64rr:
150-
case X86::AND64rr_REV:
151-
case X86::AND8i8:
152-
case X86::AND8mi:
153-
case X86::AND8mi8:
154-
case X86::AND8mr:
155-
case X86::AND8ri:
156-
case X86::AND8ri8:
157-
case X86::AND8rm:
158-
case X86::AND8rr:
159-
case X86::AND8rr_REV:
160-
return true;
161-
}
162-
}
163-
164-
bool isCMP(unsigned Opcode) {
165-
switch (Opcode) {
166-
default:
167-
return false;
168-
case X86::CMP16i16:
169-
case X86::CMP16mi:
170-
case X86::CMP16mi8:
171-
case X86::CMP16mr:
172-
case X86::CMP16ri:
173-
case X86::CMP16ri8:
174-
case X86::CMP16rm:
175-
case X86::CMP16rr:
176-
case X86::CMP16rr_REV:
177-
case X86::CMP32i32:
178-
case X86::CMP32mi:
179-
case X86::CMP32mi8:
180-
case X86::CMP32mr:
181-
case X86::CMP32ri:
182-
case X86::CMP32ri8:
183-
case X86::CMP32rm:
184-
case X86::CMP32rr:
185-
case X86::CMP32rr_REV:
186-
case X86::CMP64i32:
187-
case X86::CMP64mi32:
188-
case X86::CMP64mi8:
189-
case X86::CMP64mr:
190-
case X86::CMP64ri32:
191-
case X86::CMP64ri8:
192-
case X86::CMP64rm:
193-
case X86::CMP64rr:
194-
case X86::CMP64rr_REV:
195-
case X86::CMP8i8:
196-
case X86::CMP8mi:
197-
case X86::CMP8mi8:
198-
case X86::CMP8mr:
199-
case X86::CMP8ri:
200-
case X86::CMP8ri8:
201-
case X86::CMP8rm:
202-
case X86::CMP8rr:
203-
case X86::CMP8rr_REV:
204-
return true;
205-
}
206-
}
207-
208-
bool isSUB(unsigned Opcode) {
209-
switch (Opcode) {
210-
default:
211-
return false;
212-
case X86::SUB16i16:
213-
case X86::SUB16mi:
214-
case X86::SUB16mi8:
215-
case X86::SUB16mr:
216-
case X86::SUB16ri:
217-
case X86::SUB16ri8:
218-
case X86::SUB16rm:
219-
case X86::SUB16rr:
220-
case X86::SUB16rr_REV:
221-
case X86::SUB32i32:
222-
case X86::SUB32mi:
223-
case X86::SUB32mi8:
224-
case X86::SUB32mr:
225-
case X86::SUB32ri:
226-
case X86::SUB32ri8:
227-
case X86::SUB32rm:
228-
case X86::SUB32rr:
229-
case X86::SUB32rr_REV:
230-
case X86::SUB64i32:
231-
case X86::SUB64mi32:
232-
case X86::SUB64mi8:
233-
case X86::SUB64mr:
234-
case X86::SUB64ri32:
235-
case X86::SUB64ri8:
236-
case X86::SUB64rm:
237-
case X86::SUB64rr:
238-
case X86::SUB64rr_REV:
239-
case X86::SUB8i8:
240-
case X86::SUB8mi:
241-
case X86::SUB8mi8:
242-
case X86::SUB8mr:
243-
case X86::SUB8ri:
244-
case X86::SUB8ri8:
245-
case X86::SUB8rm:
246-
case X86::SUB8rr:
247-
case X86::SUB8rr_REV:
248-
return true;
249-
}
250-
}
251-
252-
bool isTEST(unsigned Opcode) {
253-
switch (Opcode) {
254-
default:
255-
return false;
256-
case X86::TEST16i16:
257-
case X86::TEST16mi:
258-
case X86::TEST16mr:
259-
case X86::TEST16ri:
260-
case X86::TEST16rr:
261-
case X86::TEST32i32:
262-
case X86::TEST32mi:
263-
case X86::TEST32mr:
264-
case X86::TEST32ri:
265-
case X86::TEST32rr:
266-
case X86::TEST64i32:
267-
case X86::TEST64mi32:
268-
case X86::TEST64mr:
269-
case X86::TEST64ri32:
270-
case X86::TEST64rr:
271-
case X86::TEST8i8:
272-
case X86::TEST8mi:
273-
case X86::TEST8mr:
274-
case X86::TEST8ri:
275-
case X86::TEST8rr:
276-
return true;
277-
}
278-
}
279-
28067
bool isMOVSX64rm32(const MCInst &Inst) {
28168
return Inst.getOpcode() == X86::MOVSX64rm32;
28269
}
@@ -296,17 +83,7 @@ class X86MCPlusBuilder : public MCPlusBuilder {
29683
}
29784

29885
bool isNoop(const MCInst &Inst) const override {
299-
switch (Inst.getOpcode()) {
300-
case X86::NOOP:
301-
case X86::NOOPL:
302-
case X86::NOOPLr:
303-
case X86::NOOPQ:
304-
case X86::NOOPQr:
305-
case X86::NOOPW:
306-
case X86::NOOPWr:
307-
return true;
308-
}
309-
return false;
86+
return X86::isNOP(Inst.getOpcode());
31087
}
31188

31289
unsigned getCondCode(const MCInst &Inst) const override {
@@ -546,7 +323,7 @@ class X86MCPlusBuilder : public MCPlusBuilder {
546323
}
547324

548325
bool isSUB(const MCInst &Inst) const override {
549-
return ::isSUB(Inst.getOpcode());
326+
return X86::isSUB(Inst.getOpcode());
550327
}
551328

552329
bool isADDri(const MCInst &Inst) const {
@@ -3074,10 +2851,11 @@ class X86MCPlusBuilder : public MCPlusBuilder {
30742851

30752852
// Get the HasLHS value so that iteration can be done
30762853
bool HasLHS;
3077-
if (isAND(Inst.getOpcode()) || isADD(Inst.getOpcode()) || isSUB(Inst)) {
2854+
if (X86::isAND(Inst.getOpcode()) || X86::isADD(Inst.getOpcode()) ||
2855+
X86::isSUB(Inst.getOpcode())) {
30782856
HasLHS = true;
3079-
} else if (isPop(Inst) || isPush(Inst) || isCMP(Inst.getOpcode()) ||
3080-
isTEST(Inst.getOpcode())) {
2857+
} else if (isPop(Inst) || isPush(Inst) || X86::isCMP(Inst.getOpcode()) ||
2858+
X86::isTEST(Inst.getOpcode())) {
30812859
HasLHS = false;
30822860
} else {
30832861
switch (Inst.getOpcode()) {

0 commit comments

Comments
 (0)