Skip to content

Commit 351c1d7

Browse files
authored
Merge branch 'main' into GISel_divrem_const
2 parents dd0ff6d + 25f05c0 commit 351c1d7

File tree

1,580 files changed

+91243
-66080
lines changed

Some content is hidden

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

1,580 files changed

+91243
-66080
lines changed

.ci/monolithic-linux.sh

Lines changed: 18 additions & 7 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 "--- cmake"
59+
echo "::group::cmake"
6060
export PIP_BREAK_SYSTEM_PACKAGES=1
6161
pip install -q -r "${MONOREPO_ROOT}"/.ci/all_requirements.txt
6262

@@ -85,38 +85,49 @@ 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 "--- ninja"
88+
echo "::endgroup::"
89+
echo "::group::ninja"
90+
8991
# Targets are not escaped as they are passed as separate arguments.
9092
ninja -C "${BUILD_DIR}" -k 0 ${targets}
9193

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

9599
ninja -C "${BUILD_DIR}" ${runtime_targets}
100+
101+
echo "::endgroup::"
96102
fi
97103

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

103109
cmake \
104110
-D LIBCXX_TEST_PARAMS="std=c++26" \
105111
-D LIBCXXABI_TEST_PARAMS="std=c++26" \
106112
"${BUILD_DIR}"
107113

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

110117
ninja -C "${BUILD_DIR}" ${runtime_targets_needs_reconfig}
111118

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

114122
cmake \
115123
-D LIBCXX_TEST_PARAMS="enable_modules=clang" \
116124
-D LIBCXXABI_TEST_PARAMS="enable_modules=clang" \
117125
"${BUILD_DIR}"
118126

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

121130
ninja -C "${BUILD_DIR}" ${runtime_targets_needs_reconfig}
131+
132+
echo "::endgroup::"
122133
fi

.ci/monolithic-windows.sh

Lines changed: 6 additions & 2 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 "--- cmake"
49+
echo "::group::cmake"
5050
pip install -q -r "${MONOREPO_ROOT}"/.ci/all_requirements.txt
5151

5252
export CC=cl
@@ -78,6 +78,10 @@ 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 "--- ninja"
81+
echo "::endgroup::"
82+
echo "::group::ninja"
83+
8284
# Targets are not escaped as they are passed as separate arguments.
8385
ninja -C "${BUILD_DIR}" -k 0 ${targets}
86+
87+
echo "::endgroup"

.github/workflows/libcxx-restart-preempted-jobs.yaml

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

bolt/include/bolt/Core/BinaryContext.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,15 @@ struct SegmentInfo {
7373
uint64_t FileSize; /// Size in file.
7474
uint64_t Alignment; /// Alignment of the segment.
7575
bool IsExecutable; /// Is the executable bit set on the Segment?
76+
bool IsWritable; /// Is the segment writable.
7677

7778
void print(raw_ostream &OS) const {
7879
OS << "SegmentInfo { Address: 0x" << Twine::utohexstr(Address)
7980
<< ", Size: 0x" << Twine::utohexstr(Size) << ", FileOffset: 0x"
8081
<< Twine::utohexstr(FileOffset) << ", FileSize: 0x"
8182
<< Twine::utohexstr(FileSize) << ", Alignment: 0x"
82-
<< Twine::utohexstr(Alignment) << ", " << (IsExecutable ? "x" : " ")
83-
<< "}";
83+
<< Twine::utohexstr(Alignment) << ", " << (IsExecutable ? "x" : "")
84+
<< (IsWritable ? "w" : "") << " }";
8485
};
8586
};
8687

@@ -333,9 +334,14 @@ class BinaryContext {
333334
std::optional<StringRef> Source,
334335
unsigned CUID, unsigned DWARFVersion);
335336

337+
/// Input file segment info
338+
///
336339
/// [start memory address] -> [segment info] mapping.
337340
std::map<uint64_t, SegmentInfo> SegmentMapInfo;
338341

342+
/// Newly created segments.
343+
std::vector<SegmentInfo> NewSegments;
344+
339345
/// Symbols that are expected to be undefined in MCContext during emission.
340346
std::unordered_set<MCSymbol *> UndefinedSymbols;
341347

bolt/include/bolt/Rewrite/RewriteInstance.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,9 @@ class RewriteInstance {
300300
return FUNC(ELF64BE); \
301301
}
302302

303+
/// Update loadable segment information based on new sections.
304+
void updateSegmentInfo();
305+
303306
/// Patch ELF book-keeping info.
304307
void patchELFPHDRTable();
305308

0 commit comments

Comments
 (0)