Skip to content

Commit b177725

Browse files
committed
merge main into amd-staging
2 parents ac6c5a6 + 894eaf4 commit b177725

File tree

200 files changed

+9508
-1149
lines changed

Some content is hidden

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

200 files changed

+9508
-1149
lines changed

.ci/premerge_advisor_explain.py

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
2+
# See https://llvm.org/LICENSE.txt for license information.
3+
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
4+
"""Script for getting explanations from the premerge advisor."""
5+
6+
import argparse
7+
import os
8+
import platform
9+
import sys
10+
11+
import requests
12+
13+
import generate_test_report_lib
14+
15+
PREMERGE_ADVISOR_URL = (
16+
"http://premerge-advisor.premerge-advisor.svc.cluster.local:5000/explain"
17+
)
18+
19+
20+
def main(commit_sha: str, build_log_files: list[str]):
21+
junit_objects, ninja_logs = generate_test_report_lib.load_info_from_files(
22+
build_log_files
23+
)
24+
test_failures = generate_test_report_lib.get_failures(junit_objects)
25+
current_platform = f"{platform.system()}-{platform.machine()}".lower()
26+
explanation_request = {
27+
"base_commit_sha": commit_sha,
28+
"platform": current_platform,
29+
"failures": [],
30+
}
31+
if test_failures:
32+
for _, failures in test_failures.items():
33+
for name, failure_messsage in failures:
34+
explanation_request["failures"].append(
35+
{"name": name, "message": failure_messsage}
36+
)
37+
else:
38+
ninja_failures = generate_test_report_lib.find_failure_in_ninja_logs(ninja_logs)
39+
for name, failure_message in ninja_failures:
40+
explanation_request["failures"].append(
41+
{"name": name, "message": failure_message}
42+
)
43+
advisor_response = requests.get(PREMERGE_ADVISOR_URL, json=explanation_request)
44+
if advisor_response.status_code == 200:
45+
print(advisor_response.json())
46+
else:
47+
print(advisor_response.reason)
48+
49+
50+
if __name__ == "__main__":
51+
parser = argparse.ArgumentParser()
52+
parser.add_argument("commit_sha", help="The base commit SHA for the test.")
53+
parser.add_argument(
54+
"build_log_files", help="Paths to JUnit report files and ninja logs.", nargs="*"
55+
)
56+
args = parser.parse_args()
57+
58+
# Skip looking for results on AArch64 for now because the premerge advisor
59+
# service is not available on AWS currently.
60+
if platform.machine() == "arm64":
61+
sys.exit(0)
62+
63+
main(args.commit_sha, args.build_log_files)

.ci/utils.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ function at-exit {
4343
python "${MONOREPO_ROOT}"/.ci/premerge_advisor_upload.py \
4444
$(git rev-parse HEAD~1) $GITHUB_RUN_NUMBER \
4545
"${BUILD_DIR}"/test-results.*.xml "${MONOREPO_ROOT}"/ninja*.log
46+
if [[ "$GITHUB_ACTIONS" != "" ]]; then
47+
python "${MONOREPO_ROOT}"/.ci/premerge_advisor_explain.py \
48+
$(git rev-parse HEAD~1) "${BUILD_DIR}"/test-results.*.xml \
49+
"${MONOREPO_ROOT}"/ninja*.log
50+
fi
4651
fi
4752
}
4853
trap at-exit EXIT

.github/CODEOWNERS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,13 @@
5353
/mlir/include/mlir/Interfaces/DestinationStyleOpInterface.* @matthias-springer
5454
/mlir/lib/Interfaces/DestinationStyleOpInterface.* @matthias-springer
5555

56+
# AMDGPU and ROCDL dialects in MLIR.
57+
/mlir/include/mlir/Dialect/AMDGPU @krzysz00 @kuhar
58+
/mlir/lib/Dialect/AMDGPU @krzysz00 @kuhar
59+
/mlir/lib/Conversion/*AMDGPU* @krzysz00 @kuhar
60+
/mlir/lib/Conversion/*ToROCDL @krzysz00 @kuhar
61+
/mlir/include/mlir/Dialect/LLVMIR/ROCDL* @krzysz00 @kuhar
62+
5663
# Bufferization Dialect in MLIR.
5764
/mlir/include/mlir/Dialect/Bufferization @matthias-springer
5865
/mlir/lib/Dialect/Bufferization @matthias-springer

.github/workflows/pr-code-lint.yml

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
run:
2121
shell: bash
2222
container:
23-
image: 'ghcr.io/llvm/ci-ubuntu-24.04:latest'
23+
image: 'ghcr.io/llvm/ci-ubuntu-24.04-lint'
2424
timeout-minutes: 60
2525
concurrency:
2626
group: ${{ github.workflow }}-${{ github.ref }}
@@ -31,6 +31,11 @@ jobs:
3131
with:
3232
fetch-depth: 2
3333

34+
# FIXME: same as in ".github/workflows/pr-code-format.yml"
35+
- name: Set Safe Directory
36+
run: |
37+
chown -R root $(pwd)
38+
3439
- name: Get changed files
3540
id: changed-files
3641
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46.0.5
@@ -46,22 +51,6 @@ jobs:
4651
run: |
4752
echo "Changed files:"
4853
echo "$CHANGED_FILES"
49-
50-
# The clang tidy version should always be upgraded to the first version
51-
# of a release cycle (x.1.0) or the last version of a release cycle, or
52-
# if there have been relevant clang-format backports.
53-
- name: Install clang-tidy
54-
uses: aminya/setup-cpp@a276e6e3d1db9160db5edc458e99a30d3b109949 # v1.7.1
55-
with:
56-
clang-tidy: 21.1.0
57-
58-
- name: Setup Python env
59-
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
60-
with:
61-
python-version: '3.13'
62-
63-
- name: Install Python dependencies
64-
run: python3 -m pip install -r llvm/utils/git/requirements_linting.txt
6554
6655
# TODO: create special mapping for 'codegen' targets, for now build predefined set
6756
# TODO: add entrypoint in 'compute_projects.py' that only adds a project and its direct dependencies

bolt/lib/Rewrite/RewriteInstance.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2665,8 +2665,9 @@ void RewriteInstance::readRelocations(const SectionRef &Section) {
26652665
return;
26662666
}
26672667
const bool SkipRelocs = StringSwitch<bool>(RelocatedSectionName)
2668-
.Cases(".plt", ".rela.plt", ".got.plt",
2669-
".eh_frame", ".gcc_except_table", true)
2668+
.Cases({".plt", ".rela.plt", ".got.plt",
2669+
".eh_frame", ".gcc_except_table"},
2670+
true)
26702671
.Default(false);
26712672
if (SkipRelocs) {
26722673
LLVM_DEBUG(

clang/include/clang/Basic/BuiltinsX86.td

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,8 @@ let Features = "sse", Attributes = [NoThrow, Const, RequiredVectorWidth<128>] in
185185
def cvttss2si : X86Builtin<"int(_Vector<4, float>)">;
186186
}
187187

188-
let Features = "sse", Attributes = [NoThrow, RequiredVectorWidth<128>] in {
188+
let Features = "sse",
189+
Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<128>] in {
189190
def movmskps : X86Builtin<"int(_Vector<4, float>)">;
190191
}
191192

@@ -211,11 +212,6 @@ let Features = "sse2", Attributes = [NoThrow, RequiredVectorWidth<128>] in {
211212
def maskmovdqu : X86Builtin<"void(_Vector<16, char>, _Vector<16, char>, char *)">;
212213
}
213214

214-
let Features = "sse2", Attributes = [NoThrow, Const, RequiredVectorWidth<128>] in {
215-
def movmskpd : X86Builtin<"int(_Vector<2, double>)">;
216-
def pmovmskb128 : X86Builtin<"int(_Vector<16, char>)">;
217-
}
218-
219215
let Features = "sse2", Attributes = [NoThrow] in {
220216
def movnti : X86Builtin<"void(int *, int)">;
221217
}
@@ -224,6 +220,8 @@ let Features = "sse2", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWi
224220
def pshuflw : X86Builtin<"_Vector<8, short>(_Vector<8, short>, _Constant int)">;
225221
def pshufd : X86Builtin<"_Vector<4, int>(_Vector<4, int>, _Constant int)">;
226222
def pshufhw : X86Builtin<"_Vector<8, short>(_Vector<8, short>, _Constant int)">;
223+
def movmskpd : X86Builtin<"int(_Vector<2, double>)">;
224+
def pmovmskb128 : X86Builtin<"int(_Vector<16, char>)">;
227225
}
228226

229227
let Features = "sse2", Attributes = [NoThrow, Const, RequiredVectorWidth<128>] in {
@@ -334,8 +332,8 @@ let Features = "sse4.1", Attributes = [NoThrow, Const, RequiredVectorWidth<128>]
334332
def dpps : X86Builtin<"_Vector<4, float>(_Vector<4, float>, _Vector<4, float>, _Constant char)">;
335333
def dppd : X86Builtin<"_Vector<2, double>(_Vector<2, double>, "
336334
"_Vector<2,double>, _Constant char)">;
337-
def mpsadbw128 : X86Builtin<"_Vector<16, char>(_Vector<16, char>, _Vector<16, char>, _Constant char)">;
338-
def phminposuw128 : X86Builtin<"_Vector<8, short>(_Vector<8, short>)">;
335+
def mpsadbw128 : X86Builtin<"_Vector<16, char>(_Vector<16, char>, "
336+
"_Vector<16, char>, _Constant char)">;
339337
}
340338

341339
let Features = "sse4.1",
@@ -358,6 +356,7 @@ let Features = "sse4.1", Attributes = [NoThrow, Const, Constexpr, RequiredVector
358356

359357
def pmuldq128 : X86Builtin<"_Vector<2, long long int>(_Vector<4, int>, _Vector<4, int>)">;
360358
def packusdw128 : X86Builtin<"_Vector<8, short>(_Vector<4, int>, _Vector<4, int>)">;
359+
def phminposuw128 : X86Builtin<"_Vector<8, short>(_Vector<8, short>)">;
361360

362361
def vec_ext_v16qi : X86Builtin<"char(_Vector<16, char>, _Constant int)">;
363362
def vec_set_v16qi : X86Builtin<"_Vector<16, char>(_Vector<16, char>, char, _Constant int)">;
@@ -498,9 +497,6 @@ let Features = "avx", Attributes = [NoThrow, Const, RequiredVectorWidth<256>] in
498497
def dpps256 : X86Builtin<"_Vector<8, float>(_Vector<8, float>, _Vector<8, float>, _Constant char)">;
499498
def cmppd256 : X86Builtin<"_Vector<4, double>(_Vector<4, double>, _Vector<4, double>, _Constant char)">;
500499
def cmpps256 : X86Builtin<"_Vector<8, float>(_Vector<8, float>, _Vector<8, float>, _Constant char)">;
501-
def vextractf128_pd256 : X86Builtin<"_Vector<2, double>(_Vector<4, double>, _Constant int)">;
502-
def vextractf128_ps256 : X86Builtin<"_Vector<4, float>(_Vector<8, float>, _Constant int)">;
503-
def vextractf128_si256 : X86Builtin<"_Vector<4, int>(_Vector<8, int>, _Constant int)">;
504500
def cvtpd2ps256 : X86Builtin<"_Vector<4, float>(_Vector<4, double>)">;
505501
def cvtps2dq256 : X86Builtin<"_Vector<8, int>(_Vector<8, float>)">;
506502
def cvttpd2dq256 : X86Builtin<"_Vector<4, int>(_Vector<4, double>)">;
@@ -521,6 +517,9 @@ let Features = "avx", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWid
521517
def blendps256 : X86Builtin<"_Vector<8, float>(_Vector<8, float>, _Vector<8, float>, _Constant int)">;
522518
def blendvpd256 : X86Builtin<"_Vector<4, double>(_Vector<4, double>, _Vector<4, double>, _Vector<4, double>)">;
523519
def blendvps256 : X86Builtin<"_Vector<8, float>(_Vector<8, float>, _Vector<8, float>, _Vector<8, float>)">;
520+
def vextractf128_pd256 : X86Builtin<"_Vector<2, double>(_Vector<4, double>, _Constant int)">;
521+
def vextractf128_ps256 : X86Builtin<"_Vector<4, float>(_Vector<8, float>, _Constant int)">;
522+
def vextractf128_si256 : X86Builtin<"_Vector<4, int>(_Vector<8, int>, _Constant int)">;
524523
def vinsertf128_pd256 : X86Builtin<"_Vector<4, double>(_Vector<4, double>, _Vector<2, double>, _Constant int)">;
525524
def vinsertf128_ps256 : X86Builtin<"_Vector<8, float>(_Vector<8, float>, _Vector<4, float>, _Constant int)">;
526525
def vinsertf128_si256 : X86Builtin<"_Vector<8, int>(_Vector<8, int>, _Vector<4, int>, _Constant int)">;
@@ -562,11 +561,8 @@ let Features = "avx",
562561
def vtestnzcps256 : X86Builtin<"int(_Vector<8, float>, _Vector<8, float>)">;
563562
def ptestz256 : X86Builtin<"int(_Vector<4, long long int>, _Vector<4, long long int>)">;
564563
def ptestc256 : X86Builtin<"int(_Vector<4, long long int>, _Vector<4, long long int>)">;
565-
def ptestnzc256 : X86Builtin<"int(_Vector<4, long long int>, _Vector<4, long long int>)">;
566-
}
567-
568-
let Features = "avx",
569-
Attributes = [NoThrow, Const, RequiredVectorWidth<256>] in {
564+
def ptestnzc256
565+
: X86Builtin<"int(_Vector<4, long long int>, _Vector<4, long long int>)">;
570566
def movmskpd256 : X86Builtin<"int(_Vector<4, double>)">;
571567
def movmskps256 : X86Builtin<"int(_Vector<8, float>)">;
572568
}
@@ -605,9 +601,8 @@ let Features = "avx", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWid
605601

606602
let Features = "avx2", Attributes = [NoThrow, Const, RequiredVectorWidth<256>] in {
607603
def mpsadbw256 : X86Builtin<"_Vector<32, char>(_Vector<32, char>, _Vector<32, char>, _Constant char)">;
608-
def palignr256 : X86Builtin<"_Vector<32, char>(_Vector<32, char>, _Vector<32, char>, _Constant int)">;
609-
610-
def pmovmskb256 : X86Builtin<"int(_Vector<32, char>)">;
604+
def palignr256 : X86Builtin<"_Vector<32, char>(_Vector<32, char>, "
605+
"_Vector<32, char>, _Constant int)">;
611606
def psadbw256 : X86Builtin<"_Vector<4, long long int>(_Vector<32, char>, _Vector<32, char>)">;
612607
def psignb256 : X86Builtin<"_Vector<32, char>(_Vector<32, char>, _Vector<32, char>)">;
613608
def psignw256 : X86Builtin<"_Vector<16, short>(_Vector<16, short>, _Vector<16, short>)">;
@@ -627,11 +622,11 @@ let Features = "avx2", Attributes = [NoThrow, Const, RequiredVectorWidth<256>] i
627622
def permvarsf256 : X86Builtin<"_Vector<8, float>(_Vector<8, float>, _Vector<8, int>)">;
628623
def permti256 : X86Builtin<"_Vector<4, long long int>(_Vector<4, long long int>, _Vector<4, long long int>, _Constant int)">;
629624
def permdi256 : X86Builtin<"_Vector<4, long long int>(_Vector<4, long long int>, _Constant int)">;
630-
def extract128i256 : X86Builtin<"_Vector<2, long long int>(_Vector<4, long long int>, _Constant int)">;
631625
}
632626

633627

634628
let Features = "avx2", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<256>] in {
629+
def pmovmskb256 : X86Builtin<"int(_Vector<32, char>)">;
635630
def pavgb256 : X86Builtin<"_Vector<32, unsigned char>(_Vector<32, unsigned char>, _Vector<32, unsigned char>)">;
636631
def pavgw256 : X86Builtin<"_Vector<16, unsigned short>(_Vector<16, unsigned short>, _Vector<16, unsigned short>)">;
637632

@@ -694,6 +689,7 @@ let Features = "avx2", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWi
694689
def psrlv4si : X86Builtin<"_Vector<4, int>(_Vector<4, int>, _Vector<4, int>)">;
695690
def psllv2di : X86Builtin<"_Vector<2, long long int>(_Vector<2, long long int>, _Vector<2, long long int>)">;
696691
def psrlv2di : X86Builtin<"_Vector<2, long long int>(_Vector<2, long long int>, _Vector<2, long long int>)">;
692+
def extract128i256 : X86Builtin<"_Vector<2, long long int>(_Vector<4, long long int>, _Constant int)">;
697693
}
698694

699695
let Features = "avx2", Attributes = [NoThrow, RequiredVectorWidth<256>] in {
@@ -1095,7 +1091,7 @@ let Features = "avx512vl", Attributes = [NoThrow, Const, RequiredVectorWidth<256
10951091
def alignq256 : X86Builtin<"_Vector<4, long long int>(_Vector<4, long long int>, _Vector<4, long long int>, _Constant int)">;
10961092
}
10971093

1098-
let Features = "avx512f", Attributes = [NoThrow, Const, RequiredVectorWidth<512>] in {
1094+
let Features = "avx512f", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<512>] in {
10991095
def extractf64x4_mask : X86Builtin<"_Vector<4, double>(_Vector<8, double>, _Constant int, _Vector<4, double>, unsigned char)">;
11001096
def extractf32x4_mask : X86Builtin<"_Vector<4, float>(_Vector<16, float>, _Constant int, _Vector<4, float>, unsigned char)">;
11011097
}
@@ -2960,24 +2956,24 @@ let Features = "avx512vl", Attributes = [NoThrow, RequiredVectorWidth<256>] in {
29602956
def pmovqw256mem_mask : X86Builtin<"void(_Vector<8, short *>, _Vector<4, long long int>, unsigned char)">;
29612957
}
29622958

2963-
let Features = "avx512dq", Attributes = [NoThrow, Const, RequiredVectorWidth<512>] in {
2959+
let Features = "avx512dq", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<512>] in {
29642960
def extractf32x8_mask : X86Builtin<"_Vector<8, float>(_Vector<16, float>, _Constant int, _Vector<8, float>, unsigned char)">;
29652961
def extractf64x2_512_mask : X86Builtin<"_Vector<2, double>(_Vector<8, double>, _Constant int, _Vector<2, double>, unsigned char)">;
29662962
def extracti32x8_mask : X86Builtin<"_Vector<8, int>(_Vector<16, int>, _Constant int, _Vector<8, int>, unsigned char)">;
29672963
def extracti64x2_512_mask : X86Builtin<"_Vector<2, long long int>(_Vector<8, long long int>, _Constant int, _Vector<2, long long int>, unsigned char)">;
29682964
}
29692965

2970-
let Features = "avx512f", Attributes = [NoThrow, Const, RequiredVectorWidth<512>] in {
2966+
let Features = "avx512f", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<512>] in {
29712967
def extracti32x4_mask : X86Builtin<"_Vector<4, int>(_Vector<16, int>, _Constant int, _Vector<4, int>, unsigned char)">;
29722968
def extracti64x4_mask : X86Builtin<"_Vector<4, long long int>(_Vector<8, long long int>, _Constant int, _Vector<4, long long int>, unsigned char)">;
29732969
}
29742970

2975-
let Features = "avx512dq,avx512vl", Attributes = [NoThrow, Const, RequiredVectorWidth<256>] in {
2971+
let Features = "avx512dq,avx512vl", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<256>] in {
29762972
def extractf64x2_256_mask : X86Builtin<"_Vector<2, double>(_Vector<4, double>, _Constant int, _Vector<2, double>, unsigned char)">;
29772973
def extracti64x2_256_mask : X86Builtin<"_Vector<2, long long int>(_Vector<4, long long int>, _Constant int, _Vector<2, long long int>, unsigned char)">;
29782974
}
29792975

2980-
let Features = "avx512vl", Attributes = [NoThrow, Const, RequiredVectorWidth<256>] in {
2976+
let Features = "avx512vl", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<256>] in {
29812977
def extractf32x4_256_mask : X86Builtin<"_Vector<4, float>(_Vector<8, float>, _Constant int, _Vector<4, float>, unsigned char)">;
29822978
def extracti32x4_256_mask : X86Builtin<"_Vector<4, int>(_Vector<8, int>, _Constant int, _Vector<4, int>, unsigned char)">;
29832979
}

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13676,6 +13676,9 @@ def err_acc_reduction_recipe_no_op
1367613676
"not have a valid operation available">;
1367713677
def note_acc_reduction_recipe_noop_field
1367813678
: Note<"while forming combiner for compound type %0">;
13679+
def note_acc_reduction_combiner_forming
13680+
: Note<"while forming %select{|binary operator '%1'|conditional "
13681+
"operator|final assignment operator}0">;
1367913682

1368013683
// AMDGCN builtins diagnostics
1368113684
def err_amdgcn_load_lds_size_invalid_value : Error<"invalid size value">;

clang/include/clang/Driver/Distro.h

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ class Distro {
3030
// the first and last known member in the family, e.g. IsRedHat().
3131
AlpineLinux,
3232
ArchLinux,
33-
DebianLenny,
34-
DebianSqueeze,
35-
DebianWheezy,
3633
DebianJessie,
3734
DebianStretch,
3835
DebianBuster,
@@ -42,16 +39,13 @@ class Distro {
4239
DebianForky,
4340
DebianDuke,
4441
Exherbo,
45-
RHEL5,
46-
RHEL6,
4742
RHEL7,
43+
RHEL8,
44+
RHEL9,
45+
RHEL10,
4846
Fedora,
4947
Gentoo,
5048
OpenSUSE,
51-
UbuntuMaverick,
52-
UbuntuNatty,
53-
UbuntuOneiric,
54-
UbuntuPrecise,
5549
UbuntuQuantal,
5650
UbuntuRaring,
5751
UbuntuSaucy,
@@ -121,17 +115,17 @@ class Distro {
121115
/// @{
122116

123117
bool IsRedhat() const {
124-
return DistroVal == Fedora || (DistroVal >= RHEL5 && DistroVal <= RHEL7);
118+
return DistroVal == Fedora || (DistroVal >= RHEL7 && DistroVal <= RHEL10);
125119
}
126120

127121
bool IsOpenSUSE() const { return DistroVal == OpenSUSE; }
128122

129123
bool IsDebian() const {
130-
return DistroVal >= DebianLenny && DistroVal <= DebianDuke;
124+
return DistroVal >= DebianJessie && DistroVal <= DebianDuke;
131125
}
132126

133127
bool IsUbuntu() const {
134-
return DistroVal >= UbuntuMaverick && DistroVal <= UbuntuResolute;
128+
return DistroVal >= UbuntuQuantal && DistroVal <= UbuntuResolute;
135129
}
136130

137131
bool IsAlpineLinux() const { return DistroVal == AlpineLinux; }

clang/include/clang/StaticAnalyzer/Core/PathSensitive/FunctionSummary.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ class FunctionSummariesTy {
4848
/// The number of times the function has been inlined.
4949
unsigned TimesInlined : 32;
5050

51+
/// Running time for syntax-based AST analysis in milliseconds.
52+
std::optional<unsigned> SyntaxRunningTime = std::nullopt;
53+
5154
FunctionSummary()
5255
: TotalBasicBlocks(0), InlineChecked(0), MayInline(0),
5356
TimesInlined(0) {}
@@ -69,6 +72,11 @@ class FunctionSummariesTy {
6972
return I;
7073
}
7174

75+
FunctionSummary const *findSummary(const Decl *D) const {
76+
auto I = Map.find(D);
77+
return I == Map.end() ? nullptr : &I->second;
78+
}
79+
7280
void markMayInline(const Decl *D) {
7381
MapTy::iterator I = findOrInsertSummary(D);
7482
I->second.InlineChecked = 1;

0 commit comments

Comments
 (0)