Skip to content

Commit baf7c96

Browse files
committed
Revert "merge main into amd-staging (llvm#680)"
This reverts commit 19a3cf0.
1 parent 4a21bf4 commit baf7c96

File tree

331 files changed

+3012
-13595
lines changed

Some content is hidden

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

331 files changed

+3012
-13595
lines changed

.ci/metrics/metrics.py

Lines changed: 34 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ class JobMetrics:
2424
status: int
2525
created_at_ns: int
2626
workflow_id: int
27-
workflow_name: str
2827

2928

3029
@dataclass
@@ -44,60 +43,40 @@ def get_sampled_workflow_metrics(github_repo: github.Repository):
4443
Returns a list of GaugeMetric objects, containing the relevant metrics about
4544
the workflow
4645
"""
47-
queued_job_counts = {}
48-
running_job_counts = {}
4946

5047
# Other states are available (pending, waiting, etc), but the meaning
5148
# is not documented (See #70540).
5249
# "queued" seems to be the info we want.
53-
for queued_workflow in github_repo.get_workflow_runs(status="queued"):
54-
if queued_workflow.name not in WORKFLOWS_TO_TRACK:
55-
continue
56-
for queued_workflow_job in queued_workflow.jobs():
57-
job_name = queued_workflow_job.name
58-
# Workflows marked as queued can potentially only have some jobs
59-
# queued, so make sure to also count jobs currently in progress.
60-
if queued_workflow_job.status == "queued":
61-
if job_name not in queued_job_counts:
62-
queued_job_counts[job_name] = 1
63-
else:
64-
queued_job_counts[job_name] += 1
65-
elif queued_workflow_job.status == "in_progress":
66-
if job_name not in running_job_counts:
67-
running_job_counts[job_name] = 1
68-
else:
69-
running_job_counts[job_name] += 1
70-
71-
for running_workflow in github_repo.get_workflow_runs(status="in_progress"):
72-
if running_workflow.name not in WORKFLOWS_TO_TRACK:
73-
continue
74-
for running_workflow_job in running_workflow.jobs():
75-
job_name = running_workflow_job.name
76-
if running_workflow_job.status != "in_progress":
77-
continue
78-
79-
if job_name not in running_job_counts:
80-
running_job_counts[job_name] = 1
81-
else:
82-
running_job_counts[job_name] += 1
50+
queued_workflow_count = len(
51+
[
52+
x
53+
for x in github_repo.get_workflow_runs(status="queued")
54+
if x.name in WORKFLOWS_TO_TRACK
55+
]
56+
)
57+
running_workflow_count = len(
58+
[
59+
x
60+
for x in github_repo.get_workflow_runs(status="in_progress")
61+
if x.name in WORKFLOWS_TO_TRACK
62+
]
63+
)
8364

8465
workflow_metrics = []
85-
for queued_job in queued_job_counts:
86-
workflow_metrics.append(
87-
GaugeMetric(
88-
f"workflow_queue_size_{queued_job}",
89-
queued_job_counts[queued_job],
90-
time.time_ns(),
91-
)
66+
workflow_metrics.append(
67+
GaugeMetric(
68+
"workflow_queue_size",
69+
queued_workflow_count,
70+
time.time_ns(),
9271
)
93-
for running_job in running_job_counts:
94-
workflow_metrics.append(
95-
GaugeMetric(
96-
f"running_workflow_count_{running_job}",
97-
running_job_counts[running_job],
98-
time.time_ns(),
99-
)
72+
)
73+
workflow_metrics.append(
74+
GaugeMetric(
75+
"running_workflow_count",
76+
running_workflow_count,
77+
time.time_ns(),
10078
)
79+
)
10180
# Always send a hearbeat metric so we can monitor is this container is still able to log to Grafana.
10281
workflow_metrics.append(
10382
GaugeMetric("metrics_container_heartbeat", 1, time.time_ns())
@@ -178,7 +157,7 @@ def get_per_workflow_metrics(
178157
# longer in a testing state and we can directly assert the workflow
179158
# result.
180159
for step in workflow_job.steps:
181-
if step.conclusion != "success" and step.conclusion != "skipped":
160+
if step.conclusion != "success":
182161
job_result = 0
183162
break
184163

@@ -200,7 +179,6 @@ def get_per_workflow_metrics(
200179
job_result,
201180
created_at_ns,
202181
workflow_run.id,
203-
workflow_run.name,
204182
)
205183
)
206184

@@ -257,6 +235,8 @@ def upload_metrics(workflow_metrics, metrics_userid, api_key):
257235
def main():
258236
# Authenticate with Github
259237
auth = Auth.Token(os.environ["GITHUB_TOKEN"])
238+
github_object = Github(auth=auth)
239+
github_repo = github_object.get_repo("llvm/llvm-project")
260240

261241
grafana_api_key = os.environ["GRAFANA_API_KEY"]
262242
grafana_metrics_userid = os.environ["GRAFANA_METRICS_USERID"]
@@ -268,19 +248,20 @@ def main():
268248
# Enter the main loop. Every five minutes we wake up and dump metrics for
269249
# the relevant jobs.
270250
while True:
271-
github_object = Github(auth=auth)
272-
github_repo = github_object.get_repo("llvm/llvm-project")
273-
274251
current_metrics = get_per_workflow_metrics(github_repo, workflows_to_track)
275252
current_metrics += get_sampled_workflow_metrics(github_repo)
253+
# Always send a hearbeat metric so we can monitor is this container is still able to log to Grafana.
254+
current_metrics.append(
255+
GaugeMetric("metrics_container_heartbeat", 1, time.time_ns())
256+
)
276257

277258
upload_metrics(current_metrics, grafana_metrics_userid, grafana_api_key)
278259
print(f"Uploaded {len(current_metrics)} metrics", file=sys.stderr)
279260

280261
for workflow_metric in reversed(current_metrics):
281262
if isinstance(workflow_metric, JobMetrics):
282263
workflows_to_track[
283-
workflow_metric.workflow_name
264+
workflow_metric.job_name
284265
] = workflow_metric.workflow_id
285266

286267
time.sleep(SCRAPE_INTERVAL_SECONDS)

.github/workflows/premerge.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ jobs:
144144
call C:\\BuildTools\\Common7\\Tools\\VsDevCmd.bat -arch=amd64 -host_arch=amd64
145145
bash .ci/monolithic-windows.sh "${{ steps.vars.outputs.windows-projects }}" "${{ steps.vars.outputs.windows-check-targets }}"
146146
147-
premerge-check-macos:
147+
permerge-check-macos:
148148
runs-on: macos-14
149149
if: >-
150150
github.repository_owner == 'llvm' &&

.github/workflows/release-binaries.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,13 +133,13 @@ jobs:
133133
# add extra CMake args to disable them.
134134
# See https://github.com/llvm/llvm-project/issues/99767
135135
if [ "$RUNNER_OS" = "macOS" ]; then
136-
target_cmake_flags="$target_cmake_flags -DBOOTSTRAP_BOOTSTRAP_COMPILER_RT_ENABLE_IOS=OFF"
136+
target_cmake_flags="$target_cmake_flags -DBOOTSTRAP_COMPILER_RT_ENABLE_IOS=OFF"
137137
if [ "$RUNNER_ARCH" = "ARM64" ]; then
138138
arches=arm64
139139
else
140140
arches=x86_64
141141
fi
142-
target_cmake_flags="$target_cmake_flags -DBOOTSTRAP_BOOTSTRAP_DARWIN_osx_ARCHS=$arches -DBOOTSTRAP_BOOTSTRAP_DARWIN_osx_BUILTIN_ARCHS=$arches"
142+
target_cmake_flags="$target_cmake_flags -DBOOTSTRAP_DARWIN_osx_ARCHS=$arches -DBOOTSTRAP_DARWIN_osx_BUILTIN_ARCHS=$arches"
143143
fi
144144
145145
build_flang="true"

clang/docs/LanguageExtensions.rst

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -2866,47 +2866,6 @@ etc.).
28662866
28672867
Query for this feature with ``__has_builtin(__builtin_assume_separate_storage)``.
28682868
2869-
``__builtin_assume_dereferenceable``
2870-
-------------------------------------
2871-
2872-
``__builtin_assume_dereferenceable`` is used to provide the optimizer with the
2873-
knowledge that the pointer argument P is dereferenceable up to at least the
2874-
specified number of bytes.
2875-
2876-
**Syntax**:
2877-
2878-
.. code-block:: c++
2879-
2880-
__builtin_assume_dereferenceable(const void *, size_t)
2881-
2882-
**Example of Use**:
2883-
2884-
.. code-block:: c++
2885-
2886-
int foo(int *x, int y) {
2887-
__builtin_assume_dereferenceable(x, sizeof(int));
2888-
int z = 0;
2889-
if (y == 1) {
2890-
// The optimizer may execute the load of x unconditionally due to
2891-
// __builtin_assume_dereferenceable guaranteeing sizeof(int) bytes can
2892-
// be loaded speculatively without trapping.
2893-
z = *x;
2894-
}
2895-
return z;
2896-
}
2897-
2898-
**Description**:
2899-
2900-
The arguments to this function provide a start pointer ``P`` and a size ``S``.
2901-
``S`` must be at least 1 and a constant. The optimizer may assume that ``S``
2902-
bytes are dereferenceable starting at ``P``. Note that this does not necessarily
2903-
imply that ``P`` is non-null as ``nullptr`` can be dereferenced in some cases.
2904-
The assumption also does not imply that ``P`` is not dereferenceable past ``S``
2905-
bytes.
2906-
2907-
2908-
Query for this feature with ``__has_builtin(__builtin_assume_dereferenceable)``.
2909-
29102869
29112870
``__builtin_offsetof``
29122871
----------------------

clang/docs/ReleaseNotes.rst

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ C Language Changes
9393

9494
- Clang now allows an ``inline`` specifier on a typedef declaration of a
9595
function type in Microsoft compatibility mode. #GH124869
96-
- Clang now allows ``restrict`` qualifier for array types with pointer elements (#GH92847).
9796

9897
C2y Feature Support
9998
^^^^^^^^^^^^^^^^^^^
@@ -125,10 +124,6 @@ Attribute Changes in Clang
125124

126125
- The ``no_sanitize`` attribute now accepts both ``gnu`` and ``clang`` names.
127126
- Clang now diagnoses use of declaration attributes on void parameters. (#GH108819)
128-
- Clang now allows ``__attribute__((model("small")))`` and
129-
``__attribute__((model("large")))`` on non-TLS globals in x86-64 compilations.
130-
This forces the global to be considered small or large in regards to the
131-
x86-64 code model, regardless of the code model specified for the compilation.
132127

133128
Improvements to Clang's diagnostics
134129
-----------------------------------

clang/include/clang/AST/OperationKinds.def

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -370,9 +370,6 @@ CAST_OPERATION(HLSLArrayRValue)
370370
// Aggregate by Value cast (HLSL only).
371371
CAST_OPERATION(HLSLElementwiseCast)
372372

373-
// Splat cast for Aggregates (HLSL only).
374-
CAST_OPERATION(HLSLAggregateSplatCast)
375-
376373
//===- Binary Operations -------------------------------------------------===//
377374
// Operators listed in order of precedence.
378375
// Note that additions to this should also update the StmtVisitor class,

clang/include/clang/Basic/Attr.td

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,6 @@ class TargetArch<list<string> arches> : TargetSpec {
459459
}
460460
def TargetARM : TargetArch<["arm", "thumb", "armeb", "thumbeb"]>;
461461
def TargetAArch64 : TargetArch<["aarch64", "aarch64_be", "aarch64_32"]>;
462-
def TargetAMDGPU : TargetArch<["amdgcn", "r600"]>;
463462
def TargetAnyArm : TargetArch<!listconcat(TargetARM.Arches, TargetAArch64.Arches)>;
464463
def TargetAVR : TargetArch<["avr"]>;
465464
def TargetBPF : TargetArch<["bpfel", "bpfeb"]>;
@@ -470,9 +469,7 @@ def TargetMSP430 : TargetArch<["msp430"]>;
470469
def TargetM68k : TargetArch<["m68k"]>;
471470
def TargetRISCV : TargetArch<["riscv32", "riscv64"]>;
472471
def TargetX86 : TargetArch<["x86"]>;
473-
def TargetX86_64 : TargetArch<["x86_64"]>;
474472
def TargetAnyX86 : TargetArch<["x86", "x86_64"]>;
475-
def TargetSPIRV : TargetArch<["spirv", "spirv32", "spirv64"]>;
476473
def TargetWebAssembly : TargetArch<["wasm32", "wasm64"]>;
477474
def TargetNVPTX : TargetArch<["nvptx", "nvptx64"]>;
478475
def TargetWindows : TargetSpec {
@@ -3127,20 +3124,11 @@ def PragmaClangTextSection : InheritableAttr {
31273124
let Documentation = [InternalOnly];
31283125
}
31293126

3130-
// The code model attribute only applies to LoongArch and x86-64, but for NVPTX
3131-
// compilations that share code with the host, we want to ignore the attribute
3132-
// rather than warn on it.
3133-
def CodeModel
3134-
: InheritableAttr,
3135-
TargetSpecificAttr<TargetArch<!listconcat(
3136-
TargetLoongArch.Arches, TargetX86_64.Arches, TargetNVPTX.Arches,
3137-
TargetAMDGPU.Arches, TargetSPIRV.Arches)>> {
3127+
def CodeModel : InheritableAttr, TargetSpecificAttr<TargetLoongArch> {
31383128
let Spellings = [GCC<"model">];
3139-
let Args = [EnumArgument<
3140-
"Model", "llvm::CodeModel::Model",
3141-
/*is_string=*/1, ["small", "normal", "medium", "large", "extreme"],
3142-
["Small", "Small", "Medium", "Large", "Large"],
3143-
/*opt=*/0, /*fake=*/0, /*isExternalType=*/1, /*isCovered=*/0>];
3129+
let Args = [EnumArgument<"Model", "llvm::CodeModel::Model", /*is_string=*/1,
3130+
["normal", "medium", "extreme"], ["Small", "Medium", "Large"],
3131+
/*opt=*/0, /*fake=*/0, /*isExternalType=*/1, /*isCovered=*/0>];
31443132
let Subjects = SubjectList<[NonTLSGlobalVar], ErrorDiag>;
31453133
let Documentation = [CodeModelDocs];
31463134
}

clang/include/clang/Basic/AttrDocs.td

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,16 +62,6 @@ def CodeModelDocs : Documentation {
6262
let Content = [{
6363
The ``model`` attribute allows overriding the translation unit's
6464
code model (specified by ``-mcmodel``) for a specific global variable.
65-
66-
On LoongArch, allowed values are "normal", "medium", "extreme".
67-
68-
On x86-64, allowed values are ``"small"`` and ``"large"``. ``"small"`` is
69-
roughly equivalent to ``-mcmodel=small``, meaning the global is considered
70-
"small" placed closer to the ``.text`` section relative to "large" globals, and
71-
to prefer using 32-bit relocations to access the global. ``"large"`` is roughly
72-
equivalent to ``-mcmodel=large``, meaning the global is considered "large" and
73-
placed further from the ``.text`` section relative to "small" globals, and
74-
64-bit relocations must be used to access the global.
7565
}];
7666
let Heading = "model";
7767
}
@@ -8492,7 +8482,7 @@ that is a pointer to the type with the attribute.
84928482
}
84938483

84948484
The above example will result in a call to ``bar`` being passed the address of
8495-
``y`` when ``y`` goes out of scope, then a call to ``foo`` being passed the
8485+
`y`` when ``y`` goes out of scope, then a call to ``foo`` being passed the
84968486
address of ``x`` when ``x`` goes out of scope. If two or more variables share
84978487
the same scope, their ``cleanup`` callbacks are invoked in the reverse order
84988488
the variables were declared in. It is not possible to check the return value

clang/include/clang/Basic/Builtins.td

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -839,12 +839,6 @@ def BuiltinAssumeAligned : Builtin {
839839
let Prototype = "void*(void const*, size_t, ...)";
840840
}
841841

842-
def BuiltinAssumeDereferenceable : Builtin {
843-
let Spellings = ["__builtin_assume_dereferenceable"];
844-
let Attributes = [NoThrow, Const];
845-
let Prototype = "void(void const*, _Constant size_t)";
846-
}
847-
848842
def BuiltinFree : Builtin {
849843
let Spellings = ["__builtin_free"];
850844
let Attributes = [FunctionWithBuiltinPrefix, NoThrow];

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7413,11 +7413,6 @@ def warn_c23_compat_utf8_string : Warning<
74137413
def note_cxx20_c23_compat_utf8_string_remove_u8 : Note<
74147414
"remove 'u8' prefix to avoid a change of behavior; "
74157415
"Clang encodes unprefixed narrow string literals as UTF-8">;
7416-
def warn_c23_compat_restrict_on_array_of_pointers : Warning<
7417-
"'restrict' qualifier on an array of pointers is incompatible with C standards before C23">,
7418-
InGroup<CPre23Compat>, DefaultIgnore;
7419-
def ext_restrict_on_array_of_pointers_c23 : Extension<
7420-
"'restrict' qualifier on an array of pointers is a C23 extension">, InGroup<C23>;
74217416
def err_array_init_different_type : Error<
74227417
"cannot initialize array %diff{of type $ with array of type $|"
74237418
"with different type of array}0,1">;
@@ -12633,9 +12628,6 @@ def err_hlsl_pointers_unsupported : Error<
1263312628
"%select{pointers|references}0 are unsupported in HLSL">;
1263412629
def err_hlsl_missing_resource_class : Error<"HLSL resource needs to have [[hlsl::resource_class()]] attribute">;
1263512630
def err_hlsl_attribute_needs_intangible_type: Error<"attribute %0 can be used only on HLSL intangible type %1">;
12636-
def err_hlsl_incorrect_num_initializers: Error<
12637-
"too %select{few|many}0 initializers in list for type %1 "
12638-
"(expected %2 but found %3)">;
1263912631

1264012632
def err_hlsl_operator_unsupported : Error<
1264112633
"the '%select{&|*|->}0' operator is unsupported in HLSL">;

0 commit comments

Comments
 (0)