Skip to content

Commit 184c6a9

Browse files
author
z1.cciauto
committed
merge main into amd-staging
2 parents 7202600 + a32d491 commit 184c6a9

File tree

77 files changed

+953
-1039
lines changed

Some content is hidden

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

77 files changed

+953
-1039
lines changed

clang-tools-extra/clangd/CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,9 @@ if (CLANGD_ENABLE_REMOTE)
210210
include(AddGRPC)
211211
endif()
212212

213+
option(CLANGD_BUILD_DEXP "Build the dexp tool as part of Clangd" ON)
214+
llvm_canonicalize_cmake_booleans(CLANGD_BUILD_DEXP)
215+
213216
if(CLANG_INCLUDE_TESTS)
214217
add_subdirectory(test)
215218
add_subdirectory(unittests)
@@ -220,4 +223,7 @@ option(CLANGD_ENABLE_REMOTE "Use gRPC library to enable remote index support for
220223
set(GRPC_INSTALL_PATH "" CACHE PATH "Path to gRPC library manual installation.")
221224

222225
add_subdirectory(index/remote)
223-
add_subdirectory(index/dex/dexp)
226+
227+
if(CLANGD_BUILD_DEXP)
228+
add_subdirectory(index/dex/dexp)
229+
endif()

clang-tools-extra/clangd/test/CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,18 @@ set(CLANGD_TEST_DEPS
33
ClangdTests
44
clangd-indexer
55
split-file
6-
# No tests for it, but we should still make sure they build.
7-
dexp
86
)
97

108
if(CLANGD_BUILD_XPC)
119
list(APPEND CLANGD_TEST_DEPS clangd-xpc-test-client)
1210
list(APPEND CLANGD_TEST_DEPS ClangdXpcUnitTests)
1311
endif()
1412

13+
if(CLANGD_BUILD_DEXP)
14+
# No tests for it, but we should still make sure they build.
15+
list(APPEND CLANGD_TEST_DEPS dexp)
16+
endif()
17+
1518
if(CLANGD_ENABLE_REMOTE)
1619
list(APPEND CLANGD_TEST_DEPS clangd-index-server clangd-index-server-monitor)
1720
endif()

clang-tools-extra/clangd/test/lit.site.cfg.py.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ config.llvm_shlib_dir = "@SHLIBDIR@"
1515
config.clangd_source_dir = "@CMAKE_CURRENT_SOURCE_DIR@/.."
1616
config.clangd_binary_dir = "@CMAKE_CURRENT_BINARY_DIR@/.."
1717
config.clangd_build_xpc = @CLANGD_BUILD_XPC@
18+
config.clangd_build_dexp = @CLANGD_BUILD_DEXP@
1819
config.clangd_enable_remote = @CLANGD_ENABLE_REMOTE@
1920
config.clangd_tidy_checks = @CLANGD_TIDY_CHECKS@
2021
config.have_zlib = @LLVM_ENABLE_ZLIB@

clang/lib/Sema/SemaTemplateInstantiateDecl.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1280,12 +1280,10 @@ void OpenACCDeclClauseInstantiator::VisitDevicePtrClause(
12801280
const OpenACCDevicePtrClause &C) {
12811281
llvm::SmallVector<Expr *> VarList = VisitVarList(C.getVarList());
12821282
// Ensure each var is a pointer type.
1283-
VarList.erase(std::remove_if(VarList.begin(), VarList.end(),
1284-
[&](Expr *E) {
1285-
return SemaRef.OpenACC().CheckVarIsPointerType(
1286-
OpenACCClauseKind::DevicePtr, E);
1287-
}),
1288-
VarList.end());
1283+
llvm::erase_if(VarList, [&](Expr *E) {
1284+
return SemaRef.OpenACC().CheckVarIsPointerType(OpenACCClauseKind::DevicePtr,
1285+
E);
1286+
});
12891287
ParsedClause.setVarListDetails(VarList, OpenACCModifierKind::Invalid);
12901288
if (SemaRef.OpenACC().CheckDeclareClause(ParsedClause,
12911289
OpenACCModifierKind::Invalid))

clang/lib/Sema/TreeTransform.h

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11992,13 +11992,10 @@ void OpenACCClauseTransform<Derived>::VisitDetachClause(
1199211992
llvm::SmallVector<Expr *> VarList = VisitVarList(C.getVarList());
1199311993

1199411994
// Ensure each var is a pointer type.
11995-
VarList.erase(
11996-
std::remove_if(VarList.begin(), VarList.end(),
11997-
[&](Expr *E) {
11998-
return Self.getSema().OpenACC().CheckVarIsPointerType(
11999-
OpenACCClauseKind::Detach, E);
12000-
}),
12001-
VarList.end());
11995+
llvm::erase_if(VarList, [&](Expr *E) {
11996+
return Self.getSema().OpenACC().CheckVarIsPointerType(
11997+
OpenACCClauseKind::Detach, E);
11998+
});
1200211999

1200312000
ParsedClause.setVarListDetails(VarList, OpenACCModifierKind::Invalid);
1200412001
NewClause = OpenACCDetachClause::Create(

clang/test/CodeGen/AArch64/sve-acle-__ARM_FEATURE_SVE_VECTOR_OPERATORS.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,19 +52,17 @@ vec2048 x2048 = {0, 1, 2, 3, 3 , 2 , 1, 0, 0, 1, 2, 3, 3 , 2 , 1, 0,
5252
typedef int8_t vec_int8 __attribute__((vector_size(N / 8)));
5353
// CHECK128-LABEL: define{{.*}} <16 x i8> @f2(<16 x i8> noundef %x)
5454
// CHECK128-NEXT: entry:
55-
// CHECK128-NEXT: [[TMP0:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.ptrue.nxv16i1(i32 31)
5655
// CHECK128-NEXT: [[CASTSCALABLESVE:%.*]] = tail call <vscale x 16 x i8> @llvm.vector.insert.nxv16i8.v16i8(<vscale x 16 x i8> poison, <16 x i8> [[X:%.*]], i64 0)
57-
// CHECK128-NEXT: [[TMP1:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.asrd.nxv16i8(<vscale x 16 x i1> [[TMP0]], <vscale x 16 x i8> [[CASTSCALABLESVE]], i32 1)
56+
// CHECK128-NEXT: [[TMP1:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.asrd.nxv16i8(<vscale x 16 x i1> splat (i1 true), <vscale x 16 x i8> [[CASTSCALABLESVE]], i32 1)
5857
// CHECK128-NEXT: [[CASTFIXEDSVE:%.*]] = tail call <16 x i8> @llvm.vector.extract.v16i8.nxv16i8(<vscale x 16 x i8> [[TMP1]], i64 0)
5958
// CHECK128-NEXT: ret <16 x i8> [[CASTFIXEDSVE]]
6059

6160
// CHECK-LABEL: define{{.*}} void @f2(
6261
// CHECK-SAME: ptr dead_on_unwind noalias writable writeonly sret(<[[#div(VBITS,8)]] x i8>) align 16 captures(none) initializes((0, [[#div(VBITS,8)]])) %agg.result, ptr noundef readonly captures(none) %0)
6362
// CHECK-NEXT: entry:
6463
// CHECK-NEXT: [[X:%.*]] = load <[[#div(VBITS,8)]] x i8>, ptr [[TMP0:%.*]], align 16, [[TBAA6:!tbaa !.*]]
65-
// CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.ptrue.nxv16i1(i32 31)
6664
// CHECK-NEXT: [[CASTSCALABLESVE:%.*]] = tail call <vscale x 16 x i8> @llvm.vector.insert.nxv16i8.v[[#div(VBITS,8)]]i8(<vscale x 16 x i8> poison, <[[#div(VBITS,8)]] x i8> [[X]], i64 0)
67-
// CHECK-NEXT: [[TMP2:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.asrd.nxv16i8(<vscale x 16 x i1> [[TMP1]], <vscale x 16 x i8> [[CASTSCALABLESVE]], i32 1)
65+
// CHECK-NEXT: [[TMP2:%.*]] = tail call <vscale x 16 x i8> @llvm.aarch64.sve.asrd.nxv16i8(<vscale x 16 x i1> splat (i1 true), <vscale x 16 x i8> [[CASTSCALABLESVE]], i32 1)
6866
// CHECK-NEXT: [[CASTFIXEDSVE:%.*]] = tail call <[[#div(VBITS,8)]] x i8> @llvm.vector.extract.v[[#div(VBITS,8)]]i8.nxv16i8(<vscale x 16 x i8> [[TMP2]], i64 0)
6967
// CHECK-NEXT: store <[[#div(VBITS,8)]] x i8> [[CASTFIXEDSVE]], ptr [[AGG_RESULT:%.*]], align 16, [[TBAA6]]
7068
// CHECK-NEXT: ret void

clang/test/CodeGen/AArch64/sve-intrinsics/acle_sve_rdffr.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,12 @@
77

88
// CHECK-LABEL: @test_svrdffr(
99
// CHECK-NEXT: entry:
10-
// CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.ptrue.nxv16i1(i32 31)
11-
// CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.rdffr.z(<vscale x 16 x i1> [[TMP0]])
10+
// CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.rdffr.z(<vscale x 16 x i1> splat (i1 true))
1211
// CHECK-NEXT: ret <vscale x 16 x i1> [[TMP1]]
1312
//
1413
// CPP-CHECK-LABEL: @_Z12test_svrdffrv(
1514
// CPP-CHECK-NEXT: entry:
16-
// CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.ptrue.nxv16i1(i32 31)
17-
// CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.rdffr.z(<vscale x 16 x i1> [[TMP0]])
15+
// CPP-CHECK-NEXT: [[TMP1:%.*]] = tail call <vscale x 16 x i1> @llvm.aarch64.sve.rdffr.z(<vscale x 16 x i1> splat (i1 true))
1816
// CPP-CHECK-NEXT: ret <vscale x 16 x i1> [[TMP1]]
1917
//
2018
svbool_t test_svrdffr()

clang/test/CodeGen/attr-target-x86.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ void f_default2(void) {
5656
__attribute__((target("avx, sse4.2, arch= ivybridge")))
5757
void f_avx_sse4_2_ivybridge_2(void) {}
5858

59-
// CHECK: [[f_no_aes_ivybridge]] = {{.*}}"target-cpu"="ivybridge" "target-features"="+avx,+cmov,+crc32,+cx16,+cx8,+f16c,+fsgsbase,+fxsr,+mmx,+pclmul,+popcnt,+rdrnd,+sahf,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87,+xsave,+xsaveopt,-aes,-amx-avx512,-avx10.1-256,-avx10.1-512,-avx10.2-256,-avx10.2-512,-vaes"
59+
// CHECK: [[f_no_aes_ivybridge]] = {{.*}}"target-cpu"="ivybridge" "target-features"="+avx,+cmov,+crc32,+cx16,+cx8,+f16c,+fsgsbase,+fxsr,+mmx,+pclmul,+popcnt,+rdrnd,+sahf,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87,+xsave,+xsaveopt,-aes,-vaes"
6060
__attribute__((target("no-aes, arch=ivybridge")))
6161
void f_no_aes_ivybridge(void) {}
6262

@@ -98,11 +98,11 @@ void f_x86_64_v3(void) {}
9898
__attribute__((target("arch=x86-64-v4")))
9999
void f_x86_64_v4(void) {}
100100

101-
// CHECK: [[f_avx10_1_256]] = {{.*}}"target-cpu"="i686" "target-features"="+aes,+avx,+avx10.1-256,+avx2,+avx512bf16,+avx512bitalg,+avx512bw,+avx512cd,+avx512dq,+avx512f,+avx512fp16,+avx512ifma,+avx512vbmi,+avx512vbmi2,+avx512vl,+avx512vnni,+avx512vpopcntdq,+cmov,+crc32,+cx8,+f16c,+fma,+mmx,+pclmul,+popcnt,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+vaes,+vpclmulqdq,+x87,+xsave,-amx-avx512,-avx10.1-512,-avx10.2-512,-evex512"
101+
// CHECK: [[f_avx10_1_256]] = {{.*}}"target-cpu"="i686" "target-features"="+avx,+avx10.1-256,+avx2,+avx512bf16,+avx512bitalg,+avx512bw,+avx512cd,+avx512dq,+avx512f,+avx512fp16,+avx512ifma,+avx512vbmi,+avx512vbmi2,+avx512vl,+avx512vnni,+avx512vpopcntdq,+cmov,+crc32,+cx8,+f16c,+fma,+mmx,+popcnt,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87,+xsave,-amx-avx512,-avx10.1-512,-avx10.2-512,-evex512"
102102
__attribute__((target("avx10.1-256")))
103103
void f_avx10_1_256(void) {}
104104

105-
// CHECK: [[f_avx10_1_512]] = {{.*}}"target-cpu"="i686" "target-features"="+aes,+avx,+avx10.1-256,+avx10.1-512,+avx2,+avx512bf16,+avx512bitalg,+avx512bw,+avx512cd,+avx512dq,+avx512f,+avx512fp16,+avx512ifma,+avx512vbmi,+avx512vbmi2,+avx512vl,+avx512vnni,+avx512vpopcntdq,+cmov,+crc32,+cx8,+evex512,+f16c,+fma,+mmx,+pclmul,+popcnt,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+vaes,+vpclmulqdq,+x87,+xsave"
105+
// CHECK: [[f_avx10_1_512]] = {{.*}}"target-cpu"="i686" "target-features"="+avx,+avx10.1-256,+avx10.1-512,+avx2,+avx512bf16,+avx512bitalg,+avx512bw,+avx512cd,+avx512dq,+avx512f,+avx512fp16,+avx512ifma,+avx512vbmi,+avx512vbmi2,+avx512vl,+avx512vnni,+avx512vpopcntdq,+cmov,+crc32,+cx8,+evex512,+f16c,+fma,+mmx,+popcnt,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87,+xsave"
106106
__attribute__((target("avx10.1-512")))
107107
void f_avx10_1_512(void) {}
108108

@@ -112,4 +112,4 @@ void f_prefer_256_bit(void) {}
112112

113113
// CHECK: [[f_no_prefer_256_bit]] = {{.*}}"target-features"="{{.*}}-prefer-256-bit
114114
__attribute__((target("no-prefer-256-bit")))
115-
void f_no_prefer_256_bit(void) {}
115+
void f_no_prefer_256_bit(void) {}

lldb/include/lldb/Symbol/SymbolContext.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,13 @@ class SymbolContext {
307307
SymbolContext &next_frame_sc,
308308
Address &inlined_frame_addr) const;
309309

310+
/// If available, will return the function name according to the specified
311+
/// mangling preference. If this object represents an inlined function,
312+
/// returns the name of the inlined function. Returns nullptr if no function
313+
/// name could be determined.
314+
const char *GetPossiblyInlinedFunctionName(
315+
Mangled::NamePreference mangling_preference) const;
316+
310317
// Member variables
311318
lldb::TargetSP target_sp; ///< The Target for a given query
312319
lldb::ModuleSP module_sp; ///< The Module for a given query

lldb/include/lldb/Target/Language.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ class Language : public PluginInterface {
268268
// the reference has never been assigned
269269
virtual bool IsUninitializedReference(ValueObject &valobj);
270270

271-
virtual bool GetFunctionDisplayName(const SymbolContext *sc,
271+
virtual bool GetFunctionDisplayName(const SymbolContext &sc,
272272
const ExecutionContext *exe_ctx,
273273
FunctionNameRepresentation representation,
274274
Stream &s);

0 commit comments

Comments
 (0)