Skip to content

Commit e6b91da

Browse files
Merge branch 'sycl' into empty_task_removal
2 parents 4871246 + 5b1bce1 commit e6b91da

File tree

14,115 files changed

+1091192
-839927
lines changed

Some content is hidden

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

14,115 files changed

+1091192
-839927
lines changed

.github/workflows/sycl_containers.yaml

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,3 +135,118 @@ jobs:
135135
fpgaemu_tag=${{fromJson(steps.deps.outputs.deps).linux_staging.fpgaemu.github_tag}}
136136
cpu_tag=${{fromJson(steps.deps.outputs.deps).linux_staging.oclcpu.github_tag}}
137137
138+
base_image_ubuntu2204:
139+
if: github.repository == 'intel/llvm'
140+
name: Base Ubuntu 22.04 Docker image
141+
runs-on: ubuntu-latest
142+
steps:
143+
- name: Checkout
144+
uses: actions/checkout@v3
145+
with:
146+
fetch-depth: 2
147+
- name: Build and Push Container
148+
uses: ./devops/actions/build_container
149+
with:
150+
push: ${{ github.event_name != 'pull_request' }}
151+
file: ubuntu2204_base
152+
username: ${{ github.repository_owner }}
153+
password: ${{ secrets.GITHUB_TOKEN }}
154+
tags: |
155+
ghcr.io/${{ github.repository }}/ubuntu2204_base:${{ github.sha }}
156+
ghcr.io/${{ github.repository }}/ubuntu2204_base:latest
157+
build_image_ubuntu2204:
158+
if: github.repository == 'intel/llvm'
159+
name: Build Ubuntu Docker image
160+
runs-on: ubuntu-latest
161+
steps:
162+
- name: Checkout
163+
uses: actions/checkout@v3
164+
with:
165+
fetch-depth: 2
166+
- name: Build and Push Container
167+
uses: ./devops/actions/build_container
168+
with:
169+
push: ${{ github.event_name != 'pull_request' }}
170+
file: ubuntu2204_build
171+
username: ${{ github.repository_owner }}
172+
password: ${{ secrets.GITHUB_TOKEN }}
173+
tags: |
174+
ghcr.io/${{ github.repository }}/ubuntu2204_build:${{ github.sha }}
175+
ghcr.io/${{ github.repository }}/ubuntu2204_build:latest
176+
177+
# This job produces a Docker container with the latest versions of Intel
178+
# drivers, that can be found on GitHub.
179+
drivers_image_ubuntu2204:
180+
if: github.repository == 'intel/llvm'
181+
name: Intel Drivers Ubuntu 22.04 Docker image
182+
runs-on: ubuntu-latest
183+
needs: base_image_ubuntu2204
184+
steps:
185+
- name: Checkout
186+
uses: actions/checkout@v3
187+
with:
188+
fetch-depth: 2
189+
- name: Get dependencies configuration
190+
id: deps
191+
run: |
192+
DEPS=`cat devops/dependencies.json`
193+
DEPS="${DEPS//'%'/'%25'}"
194+
DEPS="${DEPS//$'\n'/'%0A'}"
195+
DEPS="${DEPS//$'\r'/'%0D'}"
196+
echo $DEPS
197+
echo "::set-output name=deps::$DEPS"
198+
- name: Build and Push Container
199+
uses: ./devops/actions/build_container
200+
with:
201+
push: ${{ github.event_name != 'pull_request' }}
202+
file: ubuntu2204_intel_drivers
203+
username: ${{ github.repository_owner }}
204+
password: ${{ secrets.GITHUB_TOKEN }}
205+
tags: |
206+
ghcr.io/${{ github.repository }}/ubuntu2204_intel_drivers:latest-${{ github.sha }}
207+
ghcr.io/${{ github.repository }}/ubuntu2204_intel_drivers:latest
208+
build-args: |
209+
compute_runtime_tag=${{fromJson(steps.deps.outputs.deps).linux.compute_runtime.github_tag}}
210+
igc_tag=${{fromJson(steps.deps.outputs.deps).linux.igc.github_tag}}
211+
tbb_tag=${{fromJson(steps.deps.outputs.deps).linux.tbb.github_tag}}
212+
fpgaemu_tag=${{fromJson(steps.deps.outputs.deps).linux.fpgaemu.github_tag}}
213+
cpu_tag=${{fromJson(steps.deps.outputs.deps).linux.oclcpu.github_tag}}
214+
215+
# This job produces a Docker container with the latest versions of Intel
216+
# drivers, that can be found on GitHub.
217+
drivers_image_ubuntu2204_unstable:
218+
if: github.repository == 'intel/llvm'
219+
name: Intel Drivers (unstable) Ubuntu 22.04 Docker image
220+
runs-on: ubuntu-latest
221+
needs: base_image_ubuntu2204
222+
steps:
223+
- name: Checkout
224+
uses: actions/checkout@v3
225+
with:
226+
fetch-depth: 2
227+
- name: Get dependencies configuration
228+
id: deps
229+
run: |
230+
DEPS=`cat devops/dependencies.json`
231+
DEPS="${DEPS//'%'/'%25'}"
232+
DEPS="${DEPS//$'\n'/'%0A'}"
233+
DEPS="${DEPS//$'\r'/'%0D'}"
234+
echo $DEPS
235+
echo "::set-output name=deps::$DEPS"
236+
- name: Build and Push Container
237+
uses: ./devops/actions/build_container
238+
with:
239+
push: ${{ github.event_name != 'pull_request' }}
240+
file: ubuntu2204_intel_drivers
241+
username: ${{ github.repository_owner }}
242+
password: ${{ secrets.GITHUB_TOKEN }}
243+
tags: |
244+
ghcr.io/${{ github.repository }}/ubuntu2204_intel_drivers:unstable-${{ github.sha }}
245+
ghcr.io/${{ github.repository }}/ubuntu2204_intel_drivers:unstable
246+
build-args: |
247+
compute_runtime_tag=${{fromJson(steps.deps.outputs.deps).linux_staging.compute_runtime.github_tag}}
248+
igc_tag=${{fromJson(steps.deps.outputs.deps).linux_staging.igc.github_tag}}
249+
tbb_tag=${{fromJson(steps.deps.outputs.deps).linux_staging.tbb.github_tag}}
250+
fpgaemu_tag=${{fromJson(steps.deps.outputs.deps).linux_staging.fpgaemu.github_tag}}
251+
cpu_tag=${{fromJson(steps.deps.outputs.deps).linux_staging.oclcpu.github_tag}}
252+

.github/workflows/sycl_post_commit.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ on:
99
- sycl
1010
paths:
1111
- .github/workflows/sycl_post_commit.yml
12+
- .github/workflows/sycl_gen_test_matrix.yml
13+
- .github/workflows/sycl_linux_build_and_test.yml
14+
- .github/workflows/sycl_windows_build_and_test.yml
15+
- .github/workflows/sycl_macos_build_and_test.yml
16+
workflow_dispatch:
1217

1318
jobs:
1419
# This job generates matrix of tests for LLVM Test Suite

.github/workflows/sycl_precommit.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
- '.github/ISSUE_TEMPLATE/**'
1010
- '.github/CODEOWNERS'
1111
- '.github/workflows/sycl_update_gpu_driver.yml'
12+
- '.github/workflows/sycl_containers.yaml'
13+
- '.github/workflows/sycl_windows_build_and_test.yml'
14+
- '.github/workflows/sycl_macos_build_and_test.yml'
1215
- 'devops/containers/**'
1316
- 'devops/scripts/install_drivers.sh'
1417
- 'devops/scripts/install_build_tools.sh'

.github/workflows/sycl_windows_build_and_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: [Windows, build]
1515
# TODO use cached checkout
1616
steps:
17-
- uses: ilammy/msvc-dev-cmd@9f8ae839b01883414208f29e3e24524387f48e1f
17+
- uses: ilammy/msvc-dev-cmd@7315a94840631165970262a99c72cfb48a65d25d
1818
with:
1919
arch: amd64
2020
- name: Set env

bolt/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ if (BOLT_ENABLE_RUNTIME)
5555
-DCMAKE_BUILD_TYPE=Release
5656
-DCMAKE_MAKE_PROGRAM=${CMAKE_MAKE_PROGRAM}
5757
-DCMAKE_INSTALL_PREFIX=${LLVM_BINARY_DIR}
58+
-DLLVM_LIBDIR_SUFFIX=${LLVM_LIBDIR_SUFFIX}
5859
BUILD_ALWAYS True
5960
)
6061
install(CODE "execute_process\(COMMAND \${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX=\${CMAKE_INSTALL_PREFIX} -P ${CMAKE_CURRENT_BINARY_DIR}/bolt_rt-bins/cmake_install.cmake \)"
@@ -87,3 +88,6 @@ option(BOLT_INCLUDE_DOCS "Generate build targets for the BOLT docs."
8788
if (BOLT_INCLUDE_DOCS)
8889
add_subdirectory(docs)
8990
endif()
91+
92+
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/bolt/RuntimeLibs/RuntimeLibraryVariables.inc.in
93+
${CMAKE_CURRENT_BINARY_DIR}/include/bolt/RuntimeLibs/RuntimeLibraryVariables.inc @ONLY)

bolt/include/bolt/Core/BinaryContext.h

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,10 @@ class BinaryContext {
179179
using NameToSectionMapType = std::multimap<std::string, BinarySection *>;
180180
NameToSectionMapType NameToSection;
181181

182+
/// Map section references to BinarySection for matching sections in the
183+
/// input file to internal section representation.
184+
DenseMap<SectionRef, BinarySection *> SectionRefToBinarySection;
185+
182186
/// Low level section registration.
183187
BinarySection &registerSection(BinarySection *Section);
184188

@@ -224,6 +228,9 @@ class BinaryContext {
224228
/// DWARF line info for CUs.
225229
std::map<unsigned, DwarfLineTable> DwarfLineTablesCUMap;
226230

231+
/// Internal helper for removing section name from a lookup table.
232+
void deregisterSectionName(const BinarySection &Section);
233+
227234
public:
228235
static Expected<std::unique_ptr<BinaryContext>>
229236
createBinaryContext(const ObjectFile *File, bool IsPIC,
@@ -951,13 +958,13 @@ class BinaryContext {
951958
BinarySection &registerSection(SectionRef Section);
952959

953960
/// Register a copy of /p OriginalSection under a different name.
954-
BinarySection &registerSection(StringRef SectionName,
961+
BinarySection &registerSection(const Twine &SectionName,
955962
const BinarySection &OriginalSection);
956963

957964
/// Register or update the information for the section with the given
958965
/// /p Name. If the section already exists, the information in the
959966
/// section will be updated with the new data.
960-
BinarySection &registerOrUpdateSection(StringRef Name, unsigned ELFType,
967+
BinarySection &registerOrUpdateSection(const Twine &Name, unsigned ELFType,
961968
unsigned ELFFlags,
962969
uint8_t *Data = nullptr,
963970
uint64_t Size = 0,
@@ -967,7 +974,7 @@ class BinaryContext {
967974
/// with the given /p Name. If the section already exists, the
968975
/// information in the section will be updated with the new data.
969976
BinarySection &
970-
registerOrUpdateNoteSection(StringRef Name, uint8_t *Data = nullptr,
977+
registerOrUpdateNoteSection(const Twine &Name, uint8_t *Data = nullptr,
971978
uint64_t Size = 0, unsigned Alignment = 1,
972979
bool IsReadOnly = true,
973980
unsigned ELFType = ELF::SHT_PROGBITS) {
@@ -976,10 +983,16 @@ class BinaryContext {
976983
Size, Alignment);
977984
}
978985

986+
/// Remove sections that were preregistered but never used.
987+
void deregisterUnusedSections();
988+
979989
/// Remove the given /p Section from the set of all sections. Return
980990
/// true if the section was removed (and deleted), otherwise false.
981991
bool deregisterSection(BinarySection &Section);
982992

993+
/// Re-register \p Section under the \p NewName.
994+
void renameSection(BinarySection &Section, const Twine &NewName);
995+
983996
/// Iterate over all registered sections.
984997
iterator_range<FilteredSectionIterator> sections() {
985998
auto notNull = [](const SectionIterator &Itr) { return (bool)*Itr; };
@@ -1073,20 +1086,26 @@ class BinaryContext {
10731086
return const_cast<BinaryContext *>(this)->getSectionForAddress(Address);
10741087
}
10751088

1089+
/// Return internal section representation for a section in a file.
1090+
BinarySection *getSectionForSectionRef(SectionRef Section) const {
1091+
return SectionRefToBinarySection.lookup(Section);
1092+
}
1093+
10761094
/// Return section(s) associated with given \p Name.
10771095
iterator_range<NameToSectionMapType::iterator>
1078-
getSectionByName(StringRef Name) {
1079-
return make_range(NameToSection.equal_range(std::string(Name)));
1096+
getSectionByName(const Twine &Name) {
1097+
return make_range(NameToSection.equal_range(Name.str()));
10801098
}
10811099
iterator_range<NameToSectionMapType::const_iterator>
1082-
getSectionByName(StringRef Name) const {
1083-
return make_range(NameToSection.equal_range(std::string(Name)));
1100+
getSectionByName(const Twine &Name) const {
1101+
return make_range(NameToSection.equal_range(Name.str()));
10841102
}
10851103

10861104
/// Return the unique section associated with given \p Name.
10871105
/// If there is more than one section with the same name, return an error
10881106
/// object.
1089-
ErrorOr<BinarySection &> getUniqueSectionByName(StringRef SectionName) const {
1107+
ErrorOr<BinarySection &>
1108+
getUniqueSectionByName(const Twine &SectionName) const {
10901109
auto Sections = getSectionByName(SectionName);
10911110
if (Sections.begin() != Sections.end() &&
10921111
std::next(Sections.begin()) == Sections.end())
@@ -1217,10 +1236,10 @@ class BinaryContext {
12171236
return Size;
12181237
}
12191238

1220-
/// Verify that assembling instruction \p Inst results in the same sequence of
1221-
/// bytes as \p Encoding.
1222-
bool validateEncoding(const MCInst &Instruction,
1223-
ArrayRef<uint8_t> Encoding) const;
1239+
/// Validate that disassembling the \p Sequence of bytes into an instruction
1240+
/// and assembling the instruction again, results in a byte sequence identical
1241+
/// to the original one.
1242+
bool validateInstructionEncoding(ArrayRef<uint8_t> Sequence) const;
12241243

12251244
/// Return a function execution count threshold for determining whether
12261245
/// the function is 'hot'. Consider it hot if count is above the average exec

0 commit comments

Comments
 (0)