Skip to content

Commit 661d332

Browse files
authored
Revert "Upstream merge 56 (#1934)"
This reverts commit eeeffde.
1 parent eeeffde commit 661d332

File tree

5,615 files changed

+124338
-203328
lines changed

Some content is hidden

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

5,615 files changed

+124338
-203328
lines changed

external/llvm-project/.ci/compute_projects.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@
7777
DEPENDENT_RUNTIMES_TO_TEST = {
7878
"clang": {"compiler-rt"},
7979
"clang-tools-extra": {"libc"},
80-
"libc": {"libc"},
8180
".ci": {"compiler-rt", "libc"},
8281
}
8382
DEPENDENT_RUNTIMES_TO_TEST_NEEDS_RECONFIG = {

external/llvm-project/.ci/compute_projects_test.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ def test_top_level_file(self):
187187
self.assertEqual(env_variables["runtimes_check_targets"], "")
188188
self.assertEqual(env_variables["runtimes_check_targets_needs_reconfig"], "")
189189

190-
def test_exclude_libcxx_in_projects(self):
190+
def test_exclude_runtiems_in_projects(self):
191191
env_variables = compute_projects.get_env_variables(
192192
["libcxx/CMakeLists.txt"], "Linux"
193193
)
@@ -197,16 +197,6 @@ def test_exclude_libcxx_in_projects(self):
197197
self.assertEqual(env_variables["runtimes_check_targets"], "")
198198
self.assertEqual(env_variables["runtimes_check_targets_needs_reconfig"], "")
199199

200-
def test_include_libc_in_runtimes(self):
201-
env_variables = compute_projects.get_env_variables(
202-
["libc/CMakeLists.txt"], "Linux"
203-
)
204-
self.assertEqual(env_variables["projects_to_build"], "clang;lld")
205-
self.assertEqual(env_variables["project_check_targets"], "")
206-
self.assertEqual(env_variables["runtimes_to_build"], "libc")
207-
self.assertEqual(env_variables["runtimes_check_targets"], "check-libc")
208-
self.assertEqual(env_variables["runtimes_check_targets_needs_reconfig"], "")
209-
210200
def test_exclude_docs(self):
211201
env_variables = compute_projects.get_env_variables(
212202
["llvm/docs/CIBestPractices.rst"], "Linux"

external/llvm-project/.ci/monolithic-linux.sh

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ runtime_targets_needs_reconfig="${5}"
5656

5757
lit_args="-v --xunit-xml-output ${BUILD_DIR}/test-results.xml --use-unique-output-file-name --timeout=1200 --time-tests"
5858

59-
echo "::group::cmake"
59+
echo "--- cmake"
6060
export PIP_BREAK_SYSTEM_PACKAGES=1
6161
pip install -q -r "${MONOREPO_ROOT}"/.ci/all_requirements.txt
6262

@@ -85,49 +85,38 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
8585
-D LLDB_ENFORCE_STRICT_TEST_REQUIREMENTS=ON \
8686
-D CMAKE_INSTALL_PREFIX="${INSTALL_DIR}"
8787

88-
echo "::endgroup::"
89-
echo "::group::ninja"
90-
88+
echo "--- ninja"
9189
# Targets are not escaped as they are passed as separate arguments.
9290
ninja -C "${BUILD_DIR}" -k 0 ${targets}
9391

94-
echo "::endgroup::"
95-
9692
if [[ "${runtime_targets}" != "" ]]; then
97-
echo "::group::ninja runtimes"
93+
echo "--- ninja runtimes"
9894

9995
ninja -C "${BUILD_DIR}" ${runtime_targets}
100-
101-
echo "::endgroup::"
10296
fi
10397

10498
# Compiling runtimes with just-built Clang and running their tests
10599
# as an additional testing for Clang.
106100
if [[ "${runtime_targets_needs_reconfig}" != "" ]]; then
107-
echo "::group::cmake runtimes C++26"
101+
echo "--- cmake runtimes C++26"
108102

109103
cmake \
110104
-D LIBCXX_TEST_PARAMS="std=c++26" \
111105
-D LIBCXXABI_TEST_PARAMS="std=c++26" \
112106
"${BUILD_DIR}"
113107

114-
echo "::endgroup::"
115-
echo "::group::ninja runtimes C++26"
108+
echo "--- ninja runtimes C++26"
116109

117110
ninja -C "${BUILD_DIR}" ${runtime_targets_needs_reconfig}
118111

119-
echo "::endgroup::"
120-
echo "::group::cmake runtimes clang modules"
112+
echo "--- cmake runtimes clang modules"
121113

122114
cmake \
123115
-D LIBCXX_TEST_PARAMS="enable_modules=clang" \
124116
-D LIBCXXABI_TEST_PARAMS="enable_modules=clang" \
125117
"${BUILD_DIR}"
126118

127-
echo "::endgroup::"
128-
echo "::group::ninja runtimes clang modules"
119+
echo "--- ninja runtimes clang modules"
129120

130121
ninja -C "${BUILD_DIR}" ${runtime_targets_needs_reconfig}
131-
132-
echo "::endgroup::"
133122
fi

external/llvm-project/.ci/monolithic-windows.sh

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ trap at-exit EXIT
4646
projects="${1}"
4747
targets="${2}"
4848

49-
echo "::group::cmake"
49+
echo "--- cmake"
5050
pip install -q -r "${MONOREPO_ROOT}"/.ci/all_requirements.txt
5151

5252
export CC=cl
@@ -78,10 +78,6 @@ cmake -S "${MONOREPO_ROOT}"/llvm -B "${BUILD_DIR}" \
7878
-D LLVM_PARALLEL_COMPILE_JOBS=${MAX_PARALLEL_COMPILE_JOBS} \
7979
-D LLVM_PARALLEL_LINK_JOBS=${MAX_PARALLEL_LINK_JOBS}
8080

81-
echo "::endgroup::"
82-
echo "::group::ninja"
83-
81+
echo "--- ninja"
8482
# Targets are not escaped as they are passed as separate arguments.
8583
ninja -C "${BUILD_DIR}" -k 0 ${targets}
86-
87-
echo "::endgroup"

external/llvm-project/.github/copilot-instructions.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

external/llvm-project/.github/new-prs-labeler.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -632,10 +632,6 @@ llvm:instcombine:
632632
- llvm/test/Transforms/InstCombine/**
633633
- llvm/test/Transforms/InstSimplify/**
634634

635-
llvm:vectorcombine:
636-
- llvm/lib/Transforms/Vectorize/VectorCombine.cpp
637-
- llvm/test/Transforms/VectorCombine/**
638-
639635
clangd:
640636
- clang-tools-extra/clangd/**
641637

external/llvm-project/.github/workflows/hlsl-test-all.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ jobs:
4343
- name: Checkout OffloadTest
4444
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
4545
with:
46-
repository: llvm/offload-test-suite
46+
repository: llvm-beanz/offload-test-suite
4747
ref: main
4848
path: OffloadTest
4949
- name: Checkout Golden Images
5050
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
5151
with:
52-
repository: llvm/offload-golden-images
52+
repository: llvm-beanz/offload-golden-images
5353
ref: main
5454
path: golden-images
5555
- name: Setup Windows

external/llvm-project/.github/workflows/libcxx-restart-preempted-jobs.yaml

Lines changed: 91 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ permissions:
2020

2121
jobs:
2222
restart:
23-
if: github.repository_owner == 'llvm' && (github.event.workflow_run.conclusion == 'failure')
23+
if: github.repository_owner == 'llvm' && (github.event.workflow_run.conclusion == 'failure' || github.event.workflow_run.conclusion == 'cancelled')
2424
name: "Restart Job"
2525
permissions:
2626
statuses: read
@@ -32,10 +32,7 @@ jobs:
3232
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea #v7.0.1
3333
with:
3434
script: |
35-
// The "The run was canceled by" message comes from a user manually canceling a workflow
36-
// the "higher priority" message comes from github canceling a workflow because the user updated the change.
37-
// And the "exit code 1" message indicates a genuine failure.
38-
const failure_regex = /(Process completed with exit code 1.)/
35+
const failure_regex = /Process completed with exit code 1./
3936
const preemption_regex = /(The runner has received a shutdown signal)|(The operation was canceled)/
4037
4138
const wf_run = context.payload.workflow_run
@@ -77,7 +74,7 @@ jobs:
7774
console.log('Check run was not completed. Skipping.');
7875
continue;
7976
}
80-
if (check_run.conclusion != 'failure') {
77+
if (check_run.conclusion != 'failure' && check_run.conclusion != 'cancelled') {
8178
console.log('Check run had conclusion: ' + check_run.conclusion + '. Skipping.');
8279
continue;
8380
}
@@ -156,3 +153,91 @@ jobs:
156153
run_id: context.payload.workflow_run.id
157154
})
158155
await create_check_run('success', 'Restarted workflow run due to preempted job')
156+
157+
restart-test:
158+
if: github.repository_owner == 'llvm' && (github.event.workflow_run.conclusion == 'failure' || github.event.workflow_run.conclusion == 'cancelled') && github.event.actor.login == 'ldionne' # TESTING ONLY
159+
name: "Restart Job (test)"
160+
permissions:
161+
statuses: read
162+
checks: write
163+
actions: write
164+
runs-on: ubuntu-24.04
165+
steps:
166+
- name: "Restart Job (test)"
167+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea #v7.0.1
168+
with:
169+
script: |
170+
const FAILURE_REGEX = /Process completed with exit code 1./
171+
const PREEMPTION_REGEX = /(The runner has received a shutdown signal)|(The operation was canceled)/
172+
173+
function log(msg) {
174+
core.notice(msg)
175+
}
176+
177+
const wf_run = context.payload.workflow_run
178+
log(`Running on "${wf_run.display_title}" by @${wf_run.actor.login} (event: ${wf_run.event})\nWorkflow run URL: ${wf_run.html_url}`)
179+
180+
log('Listing check runs for suite')
181+
const check_suites = await github.rest.checks.listForSuite({
182+
owner: context.repo.owner,
183+
repo: context.repo.repo,
184+
check_suite_id: context.payload.workflow_run.check_suite_id,
185+
per_page: 100 // FIXME: We don't have 100 check runs yet, but we should handle this better.
186+
})
187+
188+
preemptions = [];
189+
legitimate_failures = [];
190+
for (check_run of check_suites.data.check_runs) {
191+
log(`Checking check run: ${check_run.id}`);
192+
if (check_run.status != 'completed') {
193+
log('Check run was not completed. Skipping.');
194+
continue;
195+
}
196+
197+
if (check_run.conclusion != 'failure' && check_run.conclusion != 'cancelled') {
198+
log(`Check run had conclusion: ${check_run.conclusion}. Skipping.`);
199+
continue;
200+
}
201+
202+
annotations = await github.rest.checks.listAnnotations({
203+
owner: context.repo.owner,
204+
repo: context.repo.repo,
205+
check_run_id: check_run.id
206+
})
207+
208+
preemption_annotation = annotations.data.find(function(annotation) {
209+
return annotation.annotation_level == 'failure' &&
210+
annotation.message.match(PREEMPTION_REGEX) != null;
211+
});
212+
if (preemption_annotation != null) {
213+
log(`Found preemption message: ${preemption_annotation.message}`);
214+
preemptions.push(check_run);
215+
break;
216+
}
217+
218+
failure_annotation = annotations.data.find(function(annotation) {
219+
return annotation.annotation_level == 'failure' &&
220+
annotation.message.match(FAILURE_REGEX) != null;
221+
});
222+
if (failure_annotation != null) {
223+
log(`Found legitimate failure annotation: ${failure_annotation.message}`);
224+
legitimate_failures.push(check_run);
225+
break;
226+
}
227+
}
228+
229+
if (preemptions) {
230+
log('Found some preempted jobs');
231+
if (legitimate_failures) {
232+
log('Also found some legitimate failures, so not restarting the workflow.');
233+
} else {
234+
log('Did not find any legitimate failures. Restarting workflow.');
235+
await github.rest.actions.reRunWorkflowFailedJobs({
236+
owner: context.repo.owner,
237+
repo: context.repo.repo,
238+
run_id: context.payload.workflow_run.id
239+
})
240+
}
241+
} else {
242+
log('Did not find any preempted jobs. Not restarting the workflow.');
243+
}

external/llvm-project/amd/comgr/include/amd_comgr.h.in

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1563,6 +1563,9 @@ amd_comgr_action_info_get_working_directory_path(
15631563
*
15641564
* @retval ::AMD_COMGR_STATUS_ERROR_INVALID_ARGUMENT @p
15651565
* action_info is an invalid action info object.
1566+
*
1567+
* @retval ::AMD_COMGR_STATUS_ERROR_OUT_OF_RESOURCES
1568+
* Unable to update action info object as out of resources.
15661569
*/
15671570
amd_comgr_status_t AMD_COMGR_API
15681571
amd_comgr_action_info_set_logging(
@@ -1581,6 +1584,9 @@ amd_comgr_action_info_set_logging(
15811584
*
15821585
* @retval ::AMD_COMGR_STATUS_ERROR_INVALID_ARGUMENT @p
15831586
* action_info is an invalid action info object. @p logging is NULL.
1587+
*
1588+
* @retval ::AMD_COMGR_STATUS_ERROR_OUT_OF_RESOURCES
1589+
* Unable to update the data object as out of resources.
15841590
*/
15851591
amd_comgr_status_t AMD_COMGR_API
15861592
amd_comgr_action_info_get_logging(

external/llvm-project/amd/comgr/src/comgr-compiler.cpp

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -810,16 +810,10 @@ amd_comgr_status_t AMDGPUCompiler::createTmpDirs() {
810810
return AMD_COMGR_STATUS_SUCCESS;
811811
}
812812

813-
amd_comgr_status_t AMDGPUCompiler::removeTmpDirs() {
814-
if (TmpDir.empty()) {
815-
return AMD_COMGR_STATUS_SUCCESS;
816-
}
817-
ProfilePoint Point("RemoveDir");
818-
819-
#ifdef _WIN32
820813
// On windows fs::remove_directories takes huge time so use fs::remove.
814+
amd_comgr_status_t removeDirectory(const StringRef DirName) {
821815
std::error_code EC;
822-
for (fs::directory_iterator Dir(TmpDir, EC), DirEnd; Dir != DirEnd && !EC;
816+
for (fs::directory_iterator Dir(DirName, EC), DirEnd; Dir != DirEnd && !EC;
823817
Dir.increment(EC)) {
824818
const StringRef Path = Dir->path();
825819

@@ -849,16 +843,25 @@ amd_comgr_status_t AMDGPUCompiler::removeTmpDirs() {
849843
}
850844
}
851845

852-
if (fs::remove(TmpDir)) {
846+
if (fs::remove(DirName)) {
853847
return AMD_COMGR_STATUS_ERROR;
854848
}
855849

856850
return AMD_COMGR_STATUS_SUCCESS;
857-
#else
851+
}
852+
853+
amd_comgr_status_t AMDGPUCompiler::removeTmpDirs() {
854+
if (TmpDir.empty()) {
855+
return AMD_COMGR_STATUS_SUCCESS;
856+
}
857+
ProfilePoint Point("RemoveDir");
858+
#ifndef _WIN32
858859
if (fs::remove_directories(TmpDir)) {
859860
return AMD_COMGR_STATUS_ERROR;
860861
}
861862
return AMD_COMGR_STATUS_SUCCESS;
863+
#else
864+
return removeDirectory(TmpDir);
862865
#endif
863866
}
864867

0 commit comments

Comments
 (0)