Skip to content

Commit 9a9a7a4

Browse files
authored
Merge branch 'intel:sycl' into sycl
2 parents 6111d62 + 4a794df commit 9a9a7a4

File tree

4,493 files changed

+136958
-63346
lines changed

Some content is hidden

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

4,493 files changed

+136958
-63346
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
*~
1414
# Merge files created by git.
1515
*.orig
16+
# Reject files created by patch.
17+
*.rej
1618
# Byte compiled python modules.
1719
*.pyc
1820
# vim swap files

bolt/CMakeLists.txt

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set(BOLT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
55
set(CMAKE_CXX_STANDARD 14)
66

77
set(BOLT_ENABLE_RUNTIME OFF)
8-
if (CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "x86_64")
8+
if (CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
99
set(BOLT_ENABLE_RUNTIME ON)
1010
endif()
1111

@@ -16,26 +16,31 @@ architecture for use in BOLT tests")
1616

1717
set(BOLT_INCLUDE_TESTS OFF)
1818
if (LLVM_INCLUDE_TESTS)
19+
set(BOLT_CLANG_PRESENT OFF)
20+
set(BOLT_LLD_PRESENT OFF)
21+
22+
if ("clang" IN_LIST LLVM_ENABLE_PROJECTS AND BOLT_CLANG_EXE)
23+
message(WARNING "BOLT_CLANG_EXE is set and clang project is enabled. \
24+
BOLT_CLANG_EXE will be used for BOLT tests.")
25+
endif()
1926
if ("clang" IN_LIST LLVM_ENABLE_PROJECTS OR BOLT_CLANG_EXE)
20-
if ("clang" IN_LIST LLVM_ENABLE_PROJECTS AND BOLT_CLANG_EXE)
21-
message(WARNING "BOLT_CLANG_EXE is set and clang project is enabled. \
22-
BOLT_CLANG_EXE will be used for BOLT tests.")
23-
endif()
24-
if ("lld" IN_LIST LLVM_ENABLE_PROJECTS OR BOLT_LLD_EXE)
25-
if ("lld" IN_LIST LLVM_ENABLE_PROJECTS AND BOLT_LLD_EXE)
26-
message(WARNING "BOLT_LLD_EXE is set and lld project is enabled. \
27-
BOLT_LLD_EXE will be used for BOLT tests.")
28-
endif()
29-
set(BOLT_INCLUDE_TESTS ON)
30-
else()
31-
message(WARNING "Not including BOLT tests since lld is disabled. \
32-
Enable lld in LLVM_ENABLE_PROJECTS or provide a path to lld binary \
33-
in BOLT_LLD_EXE.")
34-
endif()
27+
set(BOLT_CLANG_PRESENT ON)
28+
endif()
29+
30+
if ("lld" IN_LIST LLVM_ENABLE_PROJECTS AND BOLT_LLD_EXE)
31+
message(WARNING "BOLT_LLD_EXE is set and lld project is enabled. \
32+
BOLT_LLD_EXE will be used for BOLT tests.")
33+
endif()
34+
if ("lld" IN_LIST LLVM_ENABLE_PROJECTS OR BOLT_LLD_EXE)
35+
set(BOLT_LLD_PRESENT ON)
36+
endif()
37+
38+
if (BOLT_CLANG_PRESENT AND BOLT_LLD_PRESENT)
39+
set(BOLT_INCLUDE_TESTS ON)
3540
else()
36-
message(WARNING "Not including BOLT tests since clang is disabled. \
37-
Enable clang in LLVM_ENABLE_PROJECTS or provide a path to clang \
38-
binary in BOLT_CLANG_EXE.")
41+
message(WARNING "Not including BOLT tests since clang or lld is disabled. \
42+
Add clang and lld to LLVM_ENABLE_PROJECTS or provide paths to clang \
43+
and lld binaries in BOLT_CLANG_EXE and BOLT_LLD_EXE.")
3944
endif()
4045
endif()
4146

bolt/include/bolt/Core/BinaryContext.h

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,9 @@ class BinaryContext {
204204
using DWOIdToCUMapType = std::unordered_map<uint64_t, DWARFUnit *>;
205205
DWOIdToCUMapType DWOCUs;
206206

207+
bool ContainsDwarf5{false};
208+
bool ContainsDwarfLegacy{false};
209+
207210
/// Preprocess DWO debug information.
208211
void preprocessDWODebugInfo();
209212

@@ -234,7 +237,13 @@ class BinaryContext {
234237
/// Get Number of DWOCUs in a map.
235238
uint32_t getNumDWOCUs() { return DWOCUs.size(); }
236239

237-
const std::map<unsigned, DwarfLineTable> &getDwarfLineTables() const {
240+
/// Returns true if DWARF5 is used.
241+
bool isDWARF5Used() const { return ContainsDwarf5; }
242+
243+
/// Returns true if DWARF4 or lower is used.
244+
bool isDWARFLegacyUsed() const { return ContainsDwarfLegacy; }
245+
246+
std::map<unsigned, DwarfLineTable> &getDwarfLineTables() {
238247
return DwarfLineTablesCUMap;
239248
}
240249

@@ -245,7 +254,8 @@ class BinaryContext {
245254
Expected<unsigned> getDwarfFile(StringRef Directory, StringRef FileName,
246255
unsigned FileNumber,
247256
Optional<MD5::MD5Result> Checksum,
248-
Optional<StringRef> Source, unsigned CUID);
257+
Optional<StringRef> Source, unsigned CUID,
258+
unsigned DWARFVersion);
249259

250260
/// [start memory address] -> [segment info] mapping.
251261
std::map<uint64_t, SegmentInfo> SegmentMapInfo;

bolt/include/bolt/Core/BinaryFunction.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1279,6 +1279,9 @@ class BinaryFunction {
12791279
case ELF::R_AARCH64_MOVW_UABS_G2:
12801280
case ELF::R_AARCH64_MOVW_UABS_G2_NC:
12811281
case ELF::R_AARCH64_MOVW_UABS_G3:
1282+
case ELF::R_AARCH64_PREL16:
1283+
case ELF::R_AARCH64_PREL32:
1284+
case ELF::R_AARCH64_PREL64:
12821285
Rels[Offset] = Relocation{Offset, Symbol, RelType, Addend, Value};
12831286
return;
12841287
case ELF::R_AARCH64_CALL26:

0 commit comments

Comments
 (0)