Skip to content
This repository was archived by the owner on Sep 15, 2025. It is now read-only.

Commit b4e97c5

Browse files
SC llvm teamSC llvm team
authored andcommitted
Merged main:a1d73ace13a20ed122a66d3d59f0cbae58d0f669 into amd-gfx:df3bf34a3c95
Local branch amd-gfx df3bf34 Merged main:faa4e35c622c13c7a565b979a6676d6cf3040cd4 into amd-gfx:b65e986d8413 Remote branch main a1d73ac [libc++][TZDB] Finishes zoned_time constructors. (llvm#95010)
2 parents df3bf34 + a1d73ac commit b4e97c5

File tree

138 files changed

+5298
-379
lines changed

Some content is hidden

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

138 files changed

+5298
-379
lines changed

clang/cmake/caches/Fuchsia-stage2.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ if(WIN32 OR LLVM_WINSYSROOT)
141141
set(RUNTIMES_${target}_CMAKE_MODULE_LINKER_FLAGS ${WINDOWS_LINK_FLAGS} CACHE STRING "")
142142
endif()
143143

144-
foreach(target aarch64-linux-gnu;armv7-linux-gnueabihf;i386-linux-gnu;riscv64-linux-gnu;x86_64-linux-gnu)
144+
foreach(target aarch64-unknown-linux-gnu;armv7-unknown-linux-gnueabihf;i386-unknown-linux-gnu;riscv64-unknown-linux-gnu;x86_64-unknown-linux-gnu)
145145
if(LINUX_${target}_SYSROOT)
146146
# Set the per-target builtins options.
147147
list(APPEND BUILTIN_TARGETS "${target}")

clang/lib/Basic/Targets/Hexagon.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,18 @@ static constexpr CPUSuffix Suffixes[] = {
238238
{{"hexagonv73"}, {"73"}},
239239
};
240240

241+
std::optional<unsigned> HexagonTargetInfo::getHexagonCPURev(StringRef Name) {
242+
StringRef Arch = Name;
243+
Arch.consume_front("hexagonv");
244+
Arch.consume_back("t");
245+
246+
unsigned Val;
247+
if (!Arch.getAsInteger(0, Val))
248+
return Val;
249+
250+
return std::nullopt;
251+
}
252+
241253
const char *HexagonTargetInfo::getHexagonCPUSuffix(StringRef Name) {
242254
const CPUSuffix *Item = llvm::find_if(
243255
Suffixes, [Name](const CPUSuffix &S) { return S.Name == Name; });

clang/lib/Basic/Targets/Hexagon.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include "clang/Basic/TargetOptions.h"
1818
#include "llvm/Support/Compiler.h"
1919
#include "llvm/TargetParser/Triple.h"
20+
#include <optional>
2021

2122
namespace clang {
2223
namespace targets {
@@ -115,6 +116,7 @@ class LLVM_LIBRARY_VISIBILITY HexagonTargetInfo : public TargetInfo {
115116
std::string_view getClobbers() const override { return ""; }
116117

117118
static const char *getHexagonCPUSuffix(StringRef Name);
119+
static std::optional<unsigned> getHexagonCPURev(StringRef Name);
118120

119121
bool isValidCPUName(StringRef Name) const override {
120122
return getHexagonCPUSuffix(Name);
@@ -139,6 +141,14 @@ class LLVM_LIBRARY_VISIBILITY HexagonTargetInfo : public TargetInfo {
139141
}
140142

141143
bool hasBitIntType() const override { return true; }
144+
145+
std::pair<unsigned, unsigned> hardwareInterferenceSizes() const override {
146+
std::optional<unsigned> Rev = getHexagonCPURev(CPU);
147+
148+
// V73 and later have 64-byte cache lines.
149+
unsigned CacheLineSizeBytes = Rev >= 73 ? 64 : 32;
150+
return std::make_pair(CacheLineSizeBytes, CacheLineSizeBytes);
151+
}
142152
};
143153
} // namespace targets
144154
} // namespace clang

clang/lib/Sema/TreeTransform.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2896,6 +2896,9 @@ class TreeTransform {
28962896
SS.Adopt(QualifierLoc);
28972897

28982898
Base = BaseResult.get();
2899+
if (Base->containsErrors())
2900+
return ExprError();
2901+
28992902
QualType BaseType = Base->getType();
29002903

29012904
if (isArrow && !BaseType->isPointerType())

clang/test/CXX/temp/temp.res/temp.dep/temp.dep.type/p4.cpp

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -574,3 +574,34 @@ namespace N4 {
574574
}
575575
};
576576
} // namespace N4
577+
578+
namespace N5 {
579+
struct A {
580+
int x;
581+
};
582+
583+
template<typename T>
584+
void f() {
585+
A y = T::x; // expected-error {{type 'int' cannot be used prior to '::' because it has no members}}
586+
y.x;
587+
}
588+
589+
template void f<int>(); // expected-note {{in instantiation of}}
590+
591+
struct B {
592+
template<typename T>
593+
B(T&&);
594+
595+
int x;
596+
};
597+
598+
template<typename T>
599+
void g(T y) {
600+
B z([&]() { // expected-note {{while substituting into a lambda expression here}}
601+
h(&y); // expected-error {{use of undeclared identifier 'h'}}
602+
});
603+
z.x;
604+
}
605+
606+
template void g(int); // expected-note {{in instantiation of}}
607+
} // namespace N5

clang/test/Driver/print-supported-extensions-riscv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
// CHECK-NEXT: zksed 1.0 'Zksed' (ShangMi Suite: SM4 Block Cipher Instructions)
7171
// CHECK-NEXT: zksh 1.0 'Zksh' (ShangMi Suite: SM3 Hash Function Instructions)
7272
// CHECK-NEXT: zkt 1.0 'Zkt' (Data Independent Execution Latency)
73+
// CHECK-NEXT: ztso 1.0 'Ztso' (Memory Model - Total Store Order)
7374
// CHECK-NEXT: zvbb 1.0 'Zvbb' (Vector basic bit-manipulation instructions)
7475
// CHECK-NEXT: zvbc 1.0 'Zvbc' (Vector Carryless Multiplication)
7576
// CHECK-NEXT: zve32f 1.0 'Zve32f' (Vector Extensions for Embedded Processors with maximal 32 EEW and F extension)
@@ -170,7 +171,6 @@
170171
// CHECK-NEXT: zicfilp 0.4 'Zicfilp' (Landing pad)
171172
// CHECK-NEXT: zicfiss 0.4 'Zicfiss' (Shadow stack)
172173
// CHECK-NEXT: zalasr 0.1 'Zalasr' (Load-Acquire and Store-Release Instructions)
173-
// CHECK-NEXT: ztso 0.1 'Ztso' (Memory Model - Total Store Order)
174174
// CHECK-NEXT: smmpm 1.0 'Smmpm' (Machine-level Pointer Masking for M-mode)
175175
// CHECK-NEXT: smnpm 1.0 'Smnpm' (Machine-level Pointer Masking for next lower privilege mode)
176176
// CHECK-NEXT: ssnpm 1.0 'Ssnpm' (Supervisor-level Pointer Masking for next lower privilege mode)

clang/test/Driver/riscv-arch.c

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -365,24 +365,30 @@
365365
// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZFHMIN %s
366366
// RV32-ZFHMIN: "-target-feature" "+zfhmin"
367367

368-
// RUN: not %clang --target=riscv32-unknown-elf -march=rv32iztso -### %s \
368+
// RUN: not %clang --target=riscv32-unknown-elf -march=rv32izalasr -### %s \
369369
// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-EXPERIMENTAL-NOFLAG %s
370-
// RV32-EXPERIMENTAL-NOFLAG: error: invalid arch name 'rv32iztso'
370+
// RV32-EXPERIMENTAL-NOFLAG: error: invalid arch name 'rv32izalasr'
371371
// RV32-EXPERIMENTAL-NOFLAG: requires '-menable-experimental-extensions'
372372

373-
// RUN: not %clang --target=riscv32-unknown-elf -march=rv32iztso -menable-experimental-extensions -### %s \
373+
// RUN: not %clang --target=riscv32-unknown-elf -march=rv32izalasr -menable-experimental-extensions -### %s \
374374
// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-EXPERIMENTAL-NOVERS %s
375-
// RV32-EXPERIMENTAL-NOVERS: error: invalid arch name 'rv32iztso'
375+
// RV32-EXPERIMENTAL-NOVERS: error: invalid arch name 'rv32izalasr'
376376
// RV32-EXPERIMENTAL-NOVERS: experimental extension requires explicit version number
377377

378-
// RUN: not %clang --target=riscv32-unknown-elf -march=rv32iztso0p7 -menable-experimental-extensions -### %s \
378+
// RUN: not %clang --target=riscv32-unknown-elf -march=rv32izalasr0p7 -menable-experimental-extensions -### %s \
379379
// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-EXPERIMENTAL-BADVERS %s
380-
// RV32-EXPERIMENTAL-BADVERS: error: invalid arch name 'rv32iztso0p7'
381-
// RV32-EXPERIMENTAL-BADVERS: unsupported version number 0.7 for experimental extension 'ztso' (this compiler supports 0.1)
380+
// RV32-EXPERIMENTAL-BADVERS: error: invalid arch name 'rv32izalasr0p7'
381+
// RV32-EXPERIMENTAL-BADVERS: unsupported version number 0.7 for experimental extension 'zalasr' (this compiler supports 0.1)
382382

383-
// RUN: %clang --target=riscv32-unknown-elf -march=rv32iztso0p1 -menable-experimental-extensions -### %s \
383+
// RUN: %clang --target=riscv32-unknown-elf -march=rv32izalasr0p1 -menable-experimental-extensions -### %s \
384384
// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-EXPERIMENTAL-GOODVERS %s
385-
// RV32-EXPERIMENTAL-GOODVERS: "-target-feature" "+experimental-ztso"
385+
// RV32-EXPERIMENTAL-GOODVERS: "-target-feature" "+experimental-zalasr"
386+
387+
// RUN: %clang --target=riscv32-unknown-elf -march=rv32iztso1p0 -### %s \
388+
// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZTSO %s
389+
// RUN: %clang --target=riscv32-unknown-elf -march=rv32iztso -### %s \
390+
// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZTSO %s
391+
// RV32-ZTSO: "-target-feature" "+ztso"
386392

387393
// RUN: %clang --target=riscv32-unknown-elf -march=rv32izbb1p0 -### %s \
388394
// RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZBB %s

clang/test/Preprocessor/hexagon-predefines.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,3 +169,20 @@
169169
// CHECK-ATOMIC: #define __CLANG_ATOMIC_POINTER_LOCK_FREE 2
170170
// CHECK-ATOMIC: #define __CLANG_ATOMIC_SHORT_LOCK_FREE 2
171171
// CHECK-ATOMIC: #define __CLANG_ATOMIC_WCHAR_T_LOCK_FREE 2
172+
173+
// RUN: %clang_cc1 -E -dM -triple hexagon-unknown-linux-musl \
174+
// RUN: -target-cpu hexagonv67 | FileCheck \
175+
// RUN: %s -check-prefix CHECK-INTERFERENCE
176+
// RUN: %clang_cc1 -E -dM -triple hexagon-unknown-none-elf \
177+
// RUN: -target-cpu hexagonv67 | FileCheck \
178+
// RUN: %s -check-prefix CHECK-INTERFERENCE
179+
// RUN: %clang_cc1 -E -dM -triple hexagon-unknown-none-elf \
180+
// RUN: -target-cpu hexagonv71t | FileCheck \
181+
// RUN: %s -check-prefix CHECK-INTERFERENCE
182+
// CHECK-INTERFERENCE: #define __GCC_CONSTRUCTIVE_SIZE 32
183+
// CHECK-INTERFERENCE: #define __GCC_DESTRUCTIVE_SIZE 32
184+
// RUN: %clang_cc1 -E -dM -triple hexagon-unknown-none-elf \
185+
// RUN: -target-cpu hexagonv73 | FileCheck \
186+
// RUN: %s -check-prefix CHECK-INTERFERENCE-73
187+
// CHECK-INTERFERENCE-73: #define __GCC_CONSTRUCTIVE_SIZE 64
188+
// CHECK-INTERFERENCE-73: #define __GCC_DESTRUCTIVE_SIZE 64

clang/test/Preprocessor/riscv-target-features.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1650,13 +1650,13 @@
16501650
// RUN: -o - | FileCheck --check-prefix=CHECK-ZICFILP-EXT %s
16511651
// CHECK-ZICFILP-EXT: __riscv_zicfilp 4000{{$}}
16521652

1653-
// RUN: %clang --target=riscv32-unknown-linux-gnu -menable-experimental-extensions \
1654-
// RUN: -march=rv32iztso0p1 -E -dM %s \
1653+
// RUN: %clang --target=riscv32-unknown-linux-gnu \
1654+
// RUN: -march=rv32iztso1p0 -E -dM %s \
16551655
// RUN: -o - | FileCheck --check-prefix=CHECK-ZTSO-EXT %s
1656-
// RUN: %clang --target=riscv64-unknown-linux-gnu -menable-experimental-extensions \
1657-
// RUN: -march=rv64iztso0p1 -E -dM %s \
1656+
// RUN: %clang --target=riscv64-unknown-linux-gnu \
1657+
// RUN: -march=rv64iztso1p0 -E -dM %s \
16581658
// RUN: -o - | FileCheck --check-prefix=CHECK-ZTSO-EXT %s
1659-
// CHECK-ZTSO-EXT: __riscv_ztso 1000{{$}}
1659+
// CHECK-ZTSO-EXT: __riscv_ztso 1000000{{$}}
16601660

16611661
// RUN: %clang --target=riscv32 -menable-experimental-extensions \
16621662
// RUN: -march=rv32ifzvfbfmin1p0 -E -dM %s \

compiler-rt/CODE_OWNERS.TXT

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,7 @@ D: ThreadSanitizer
6767
N: Bill Wendling
6868
E: isanbard@gmail.com
6969
D: Profile runtime library
70+
71+
N: Christopher Apple, David Trevelyan
72+
E: cja-private@pm.me, realtime.sanitizer@gmail.com
73+
D: Realtime Sanitizer (RTSan)

0 commit comments

Comments
 (0)