Skip to content

Commit 85bcaad

Browse files
committed
Merge remote-tracking branch 'origin/main' into opencl-headers-implement-local-block-io
2 parents 783002b + 1d5d125 commit 85bcaad

File tree

1,293 files changed

+75376
-58470
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,293 files changed

+75376
-58470
lines changed

.github/workflows/libclang-python-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ on:
1010
- 'main'
1111
paths:
1212
- 'clang/bindings/python/**'
13-
- 'clang/test/bindings/python/**'
1413
- 'clang/tools/libclang/**'
14+
- 'clang/CMakeList.txt'
1515
- '.github/workflows/libclang-python-tests.yml'
1616
- '.github/workflows/llvm-project-tests.yml'
1717
pull_request:
1818
paths:
1919
- 'clang/bindings/python/**'
20-
- 'clang/test/bindings/python/**'
2120
- 'clang/tools/libclang/**'
21+
- 'clang/CMakeList.txt'
2222
- '.github/workflows/libclang-python-tests.yml'
2323
- '.github/workflows/llvm-project-tests.yml'
2424

.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)