Skip to content

Commit 39f10ed

Browse files
committed
merge main into amd-staging
2 parents 70d3122 + fbbae9e commit 39f10ed

File tree

225 files changed

+6915
-4298
lines changed

Some content is hidden

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

225 files changed

+6915
-4298
lines changed

.ci/monolithic-linux.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function at-exit {
3838

3939
ccache --print-stats > artifacts/ccache_stats.txt
4040
cp "${BUILD_DIR}"/.ninja_log artifacts/.ninja_log
41-
cp "${BUILD_DIR}"/test-results.*.xml artifacts/
41+
cp "${BUILD_DIR}"/test-results.*.xml artifacts/ || :
4242

4343
# If building fails there will be no results files.
4444
shopt -s nullglob

.ci/monolithic-windows.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function at-exit {
3333
mkdir -p artifacts
3434
sccache --show-stats >> artifacts/sccache_stats.txt
3535
cp "${BUILD_DIR}"/.ninja_log artifacts/.ninja_log
36-
cp "${BUILD_DIR}"/test-results.*.xml artifacts/
36+
cp "${BUILD_DIR}"/test-results.*.xml artifacts/ || :
3737

3838
# If building fails there will be no results files.
3939
shopt -s nullglob

bolt/lib/Rewrite/RewriteInstance.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1341,6 +1341,19 @@ void RewriteInstance::discoverFileObjects() {
13411341
}
13421342
}
13431343
}
1344+
1345+
// The linker may omit data markers for absolute long veneers. Introduce
1346+
// those markers artificially to assist the disassembler.
1347+
for (BinaryFunction &BF :
1348+
llvm::make_second_range(BC->getBinaryFunctions())) {
1349+
if (BF.getOneName().starts_with("__AArch64AbsLongThunk_") &&
1350+
BF.getSize() == 16 && !BF.getSizeOfDataInCodeAt(8)) {
1351+
BC->errs() << "BOLT-WARNING: missing data marker detected in veneer "
1352+
<< BF << '\n';
1353+
BF.markDataAtOffset(8);
1354+
BC->AddressToConstantIslandMap[BF.getAddress() + 8] = &BF;
1355+
}
1356+
}
13441357
}
13451358

13461359
if (!BC->IsLinuxKernel) {

bolt/test/AArch64/veneer-lld-abs.s

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,21 @@
66
# RUN: -fuse-ld=lld -Wl,-q
77
# RUN: llvm-objdump -d %t.exe | FileCheck --check-prefix=CHECK-INPUT %s
88
# RUN: llvm-objcopy --remove-section .rela.mytext %t.exe
9-
# RUN: llvm-bolt %t.exe -o %t.bolt --elim-link-veneers=true --lite=0
9+
# RUN: llvm-bolt %t.exe -o %t.bolt
1010
# RUN: llvm-objdump -d -j .text %t.bolt | \
1111
# RUN: FileCheck --check-prefix=CHECK-OUTPUT %s
1212

13+
## Occasionally, we see the linker not generating $d symbols for long veneers
14+
## causing BOLT to fail veneer elimination.
15+
# RUN: llvm-objcopy --remove-symbol-prefix=\$d %t.exe %t.no-marker.exe
16+
# RUN: llvm-bolt %t.no-marker.exe -o %t.no-marker.bolt \
17+
# RUN: 2>&1 | FileCheck %s --check-prefix=CHECK-BOLT
18+
# RUN: llvm-objdump -d -j .text %t.no-marker.bolt | \
19+
# RUN: FileCheck --check-prefix=CHECK-OUTPUT %s
20+
21+
# CHECK-BOLT-NOT: BOLT-WARNING: unable to disassemble instruction
22+
# CHECK-BOLT: BOLT-WARNING: missing data marker detected in veneer __AArch64AbsLongThunk_far_function
23+
1324
.text
1425
.balign 4
1526
.global far_function

clang-tools-extra/clang-doc/Serialize.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,9 @@ getFunctionPrototype(const FunctionDecl *FuncDecl) {
113113
Stream << " " << ParamDecl->getNameAsString();
114114

115115
// Print default argument if it exists
116-
if (ParamDecl->hasDefaultArg()) {
117-
const Expr *DefaultArg = ParamDecl->getDefaultArg();
118-
if (DefaultArg) {
116+
if (ParamDecl->hasDefaultArg() &&
117+
!ParamDecl->hasUninstantiatedDefaultArg()) {
118+
if (const Expr *DefaultArg = ParamDecl->getDefaultArg()) {
119119
Stream << " = ";
120120
DefaultArg->printPretty(Stream, nullptr, Ctx.getPrintingPolicy());
121121
}

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12956,7 +12956,7 @@ def warn_hlsl_deprecated_register_type_i: Warning<"binding type 'i' ignored. The
1295612956
def err_hlsl_unsupported_register_number : Error<"register number should be an integer">;
1295712957
def err_hlsl_expected_space : Error<"invalid space specifier '%0' used; expected 'space' followed by an integer, like space1">;
1295812958
def err_hlsl_space_on_global_constant : Error<"register space cannot be specified on global constants">;
12959-
def warn_hlsl_implicit_binding : Warning<"resource has implicit register binding">, InGroup<HLSLImplicitBinding>, DefaultError;
12959+
def warn_hlsl_implicit_binding : Warning<"resource has implicit register binding">, InGroup<HLSLImplicitBinding>, DefaultIgnore;
1296012960
def warn_hlsl_packoffset_mix : Warning<"cannot mix packoffset elements with nonpackoffset elements in a cbuffer">,
1296112961
InGroup<HLSLMixPackOffset>;
1296212962
def err_hlsl_packoffset_overlap : Error<"packoffset overlap between %0, %1">;

clang/include/clang/Lex/HLSLRootSignatureTokenKinds.def

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@
5353
#ifndef SHADER_VISIBILITY_ENUM
5454
#define SHADER_VISIBILITY_ENUM(NAME, LIT) ENUM(NAME, LIT)
5555
#endif
56+
#ifndef TEXTURE_ADDRESS_MODE_ENUM
57+
#define TEXTURE_ADDRESS_MODE_ENUM(NAME, LIT) ENUM(NAME, LIT)
58+
#endif
5659

5760
// General Tokens:
5861
TOK(invalid, "invalid identifier")
@@ -102,6 +105,12 @@ KEYWORD(offset)
102105

103106
// StaticSampler Keywords:
104107
KEYWORD(mipLODBias)
108+
KEYWORD(addressU)
109+
KEYWORD(addressV)
110+
KEYWORD(addressW)
111+
KEYWORD(maxAnisotropy)
112+
KEYWORD(minLOD)
113+
KEYWORD(maxLOD)
105114

106115
// Unbounded Enum:
107116
UNBOUNDED_ENUM(unbounded, "unbounded")
@@ -145,6 +154,14 @@ SHADER_VISIBILITY_ENUM(Pixel, "SHADER_VISIBILITY_PIXEL")
145154
SHADER_VISIBILITY_ENUM(Amplification, "SHADER_VISIBILITY_AMPLIFICATION")
146155
SHADER_VISIBILITY_ENUM(Mesh, "SHADER_VISIBILITY_MESH")
147156

157+
// Texture Address Mode Enums:
158+
TEXTURE_ADDRESS_MODE_ENUM(Wrap, "TEXTURE_ADDRESS_WRAP")
159+
TEXTURE_ADDRESS_MODE_ENUM(Mirror, "TEXTURE_ADDRESS_MIRROR")
160+
TEXTURE_ADDRESS_MODE_ENUM(Clamp, "TEXTURE_ADDRESS_CLAMP")
161+
TEXTURE_ADDRESS_MODE_ENUM(Border, "TEXTURE_ADDRESS_BORDER")
162+
TEXTURE_ADDRESS_MODE_ENUM(MirrorOnce, "TEXTURE_ADDRESS_MIRRORONCE")
163+
164+
#undef TEXTURE_ADDRESS_MODE_ENUM
148165
#undef SHADER_VISIBILITY_ENUM
149166
#undef DESCRIPTOR_RANGE_FLAG_ENUM
150167
#undef DESCRIPTOR_RANGE_FLAG_ENUM_OFF

clang/include/clang/Parse/ParseHLSLRootSignature.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,12 @@ class RootSignatureParser {
112112
struct ParsedStaticSamplerParams {
113113
std::optional<llvm::hlsl::rootsig::Register> Reg;
114114
std::optional<float> MipLODBias;
115+
std::optional<llvm::hlsl::rootsig::TextureAddressMode> AddressU;
116+
std::optional<llvm::hlsl::rootsig::TextureAddressMode> AddressV;
117+
std::optional<llvm::hlsl::rootsig::TextureAddressMode> AddressW;
118+
std::optional<uint32_t> MaxAnisotropy;
119+
std::optional<float> MinLOD;
120+
std::optional<float> MaxLOD;
115121
};
116122
std::optional<ParsedStaticSamplerParams> parseStaticSamplerParams();
117123

@@ -122,6 +128,8 @@ class RootSignatureParser {
122128

123129
/// Parsing methods of various enums
124130
std::optional<llvm::hlsl::rootsig::ShaderVisibility> parseShaderVisibility();
131+
std::optional<llvm::hlsl::rootsig::TextureAddressMode>
132+
parseTextureAddressMode();
125133
std::optional<llvm::hlsl::rootsig::RootDescriptorFlags>
126134
parseRootDescriptorFlags();
127135
std::optional<llvm::hlsl::rootsig::DescriptorRangeFlags>

clang/include/clang/Tooling/DependencyScanning/ModuleDepCollector.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,6 @@ class ModuleDepCollector final : public DependencyCollector {
311311
const ArrayRef<StringRef> StableDirs;
312312
/// Path to the main source file.
313313
std::string MainFile;
314-
/// Hash identifying the compilation conditions of the current TU.
315-
std::string ContextHash;
316314
/// Non-modular file dependencies. This includes the main source file and
317315
/// textually included header files.
318316
std::vector<std::string> FileDeps;

clang/lib/AST/ASTContext.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -875,8 +875,7 @@ ASTContext::insertCanonicalTemplateTemplateParmDeclInternal(
875875
bool ASTContext::isTypeIgnoredBySanitizer(const SanitizerMask &Mask,
876876
const QualType &Ty) const {
877877
std::string TyName = Ty.getUnqualifiedType().getAsString(getPrintingPolicy());
878-
return NoSanitizeL->containsType(Mask, TyName) &&
879-
!NoSanitizeL->containsType(Mask, TyName, "sanitize");
878+
return NoSanitizeL->containsType(Mask, TyName);
880879
}
881880

882881
TargetCXXABI::Kind ASTContext::getCXXABIKind() const {

0 commit comments

Comments
 (0)