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

Commit 145f893

Browse files
SC llvm teamSC llvm team
authored andcommitted
Merged main:b83b28779ee56236aaf8827398f889334abbd28d into amd-gfx:6670c73ea871
Local branch amd-gfx 6670c73 [AMDGPU][Waterfall] Put exec save in the loop header Remote branch main b83b287 [RISCV] Make Zhinx and Zvfh imply Zhinxmin and Zvfhmin respectively (llvm#75735)
2 parents 6670c73 + b83b287 commit 145f893

File tree

57 files changed

+1044
-178
lines changed

Some content is hidden

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

57 files changed

+1044
-178
lines changed

clang/lib/CodeGen/CGBuiltin.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,19 +232,19 @@ static Value *MakeBinaryAtomicValue(
232232

233233
static Value *EmitNontemporalStore(CodeGenFunction &CGF, const CallExpr *E) {
234234
Value *Val = CGF.EmitScalarExpr(E->getArg(0));
235-
Value *Address = CGF.EmitScalarExpr(E->getArg(1));
235+
Address Addr = CGF.EmitPointerWithAlignment(E->getArg(1));
236236

237237
Val = CGF.EmitToMemory(Val, E->getArg(0)->getType());
238-
LValue LV = CGF.MakeNaturalAlignAddrLValue(Address, E->getArg(0)->getType());
238+
LValue LV = CGF.MakeAddrLValue(Addr, E->getArg(0)->getType());
239239
LV.setNontemporal(true);
240240
CGF.EmitStoreOfScalar(Val, LV, false);
241241
return nullptr;
242242
}
243243

244244
static Value *EmitNontemporalLoad(CodeGenFunction &CGF, const CallExpr *E) {
245-
Value *Address = CGF.EmitScalarExpr(E->getArg(0));
245+
Address Addr = CGF.EmitPointerWithAlignment(E->getArg(0));
246246

247-
LValue LV = CGF.MakeNaturalAlignAddrLValue(Address, E->getType());
247+
LValue LV = CGF.MakeAddrLValue(Addr, E->getType());
248248
LV.setNontemporal(true);
249249
return CGF.EmitLoadOfScalar(LV, E->getExprLoc());
250250
}

clang/lib/Format/Format.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1315,7 +1315,6 @@ static void expandPresetsBraceWrapping(FormatStyle &Expanded) {
13151315
Expanded.BraceWrapping.AfterStruct = true;
13161316
Expanded.BraceWrapping.AfterUnion = true;
13171317
Expanded.BraceWrapping.AfterExternBlock = true;
1318-
Expanded.IndentExternBlock = FormatStyle::IEBS_AfterExternBlock;
13191318
Expanded.BraceWrapping.SplitEmptyFunction = true;
13201319
Expanded.BraceWrapping.SplitEmptyRecord = false;
13211320
break;
@@ -1335,7 +1334,6 @@ static void expandPresetsBraceWrapping(FormatStyle &Expanded) {
13351334
Expanded.BraceWrapping.AfterStruct = true;
13361335
Expanded.BraceWrapping.AfterUnion = true;
13371336
Expanded.BraceWrapping.AfterExternBlock = true;
1338-
Expanded.IndentExternBlock = FormatStyle::IEBS_AfterExternBlock;
13391337
Expanded.BraceWrapping.BeforeCatch = true;
13401338
Expanded.BraceWrapping.BeforeElse = true;
13411339
Expanded.BraceWrapping.BeforeLambdaBody = true;
@@ -1350,7 +1348,6 @@ static void expandPresetsBraceWrapping(FormatStyle &Expanded) {
13501348
Expanded.BraceWrapping.AfterObjCDeclaration = true;
13511349
Expanded.BraceWrapping.AfterStruct = true;
13521350
Expanded.BraceWrapping.AfterExternBlock = true;
1353-
Expanded.IndentExternBlock = FormatStyle::IEBS_AfterExternBlock;
13541351
Expanded.BraceWrapping.BeforeCatch = true;
13551352
Expanded.BraceWrapping.BeforeElse = true;
13561353
Expanded.BraceWrapping.BeforeLambdaBody = true;
@@ -1375,7 +1372,6 @@ static void expandPresetsBraceWrapping(FormatStyle &Expanded) {
13751372
/*SplitEmptyFunction=*/true,
13761373
/*SplitEmptyRecord=*/true,
13771374
/*SplitEmptyNamespace=*/true};
1378-
Expanded.IndentExternBlock = FormatStyle::IEBS_AfterExternBlock;
13791375
break;
13801376
case FormatStyle::BS_WebKit:
13811377
Expanded.BraceWrapping.AfterFunction = true;
@@ -1909,7 +1905,6 @@ FormatStyle getMicrosoftStyle(FormatStyle::LanguageKind Language) {
19091905
Style.BraceWrapping.AfterObjCDeclaration = true;
19101906
Style.BraceWrapping.AfterStruct = true;
19111907
Style.BraceWrapping.AfterExternBlock = true;
1912-
Style.IndentExternBlock = FormatStyle::IEBS_AfterExternBlock;
19131908
Style.BraceWrapping.BeforeCatch = true;
19141909
Style.BraceWrapping.BeforeElse = true;
19151910
Style.BraceWrapping.BeforeWhile = false;

clang/test/CodeGen/Nontemporal.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,17 @@ void test_all_sizes(void) // CHECK-LABEL: test_all_sizes
4646
vf2 = __builtin_nontemporal_load(&vf1); // CHECK: load <4 x float>{{.*}}align 16, !nontemporal
4747
vc2 = __builtin_nontemporal_load(&vc1); // CHECK: load <8 x i8>{{.*}}align 8, !nontemporal
4848
}
49+
50+
struct S { char c[16]; };
51+
S x;
52+
53+
typedef int v4si __attribute__ ((vector_size(16)));
54+
55+
// CHECK-LABEL: define void @_Z14test_alignmentv()
56+
// CHECK: load <4 x i32>, ptr @x, align 1, !nontemporal
57+
// CHECK: store <4 x i32> %1, ptr @x, align 1, !nontemporal
58+
59+
void test_alignment() {
60+
auto t = __builtin_nontemporal_load((v4si*)x.c);
61+
__builtin_nontemporal_store(t, (v4si*)x.c);
62+
}

clang/unittests/Format/FormatTest.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4571,6 +4571,13 @@ TEST_F(FormatTest, IndentExternBlockStyle) {
45714571
"}",
45724572
Style);
45734573

4574+
Style.BreakBeforeBraces = FormatStyle::BS_Allman;
4575+
verifyFormat("extern \"C\"\n"
4576+
"{\n"
4577+
"int i;\n"
4578+
"}",
4579+
Style);
4580+
45744581
Style.BreakBeforeBraces = FormatStyle::BS_Custom;
45754582
Style.BraceWrapping.AfterExternBlock = true;
45764583
Style.IndentExternBlock = FormatStyle::IEBS_Indent;

compiler-rt/cmake/Modules/AddCompilerRT.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -670,13 +670,18 @@ macro(add_custom_libcxx name prefix)
670670
get_property(CXX_FLAGS CACHE CMAKE_CXX_FLAGS PROPERTY VALUE)
671671
set(LIBCXX_CXX_FLAGS "${LIBCXX_CXX_FLAGS} ${CXX_FLAGS}")
672672

673+
if(CMAKE_VERBOSE_MAKEFILE)
674+
set(verbose -DCMAKE_VERBOSE_MAKEFILE=ON)
675+
endif()
676+
673677
ExternalProject_Add(${name}
674678
DEPENDS ${name}-clobber ${LIBCXX_DEPS}
675679
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/${name}
676680
SOURCE_DIR ${LLVM_MAIN_SRC_DIR}/../runtimes
677681
BINARY_DIR ${prefix}
678682
CMAKE_ARGS ${CMAKE_PASSTHROUGH_VARIABLES}
679683
${compiler_args}
684+
${verbose}
680685
-DCMAKE_C_FLAGS=${LIBCXX_C_FLAGS}
681686
-DCMAKE_CXX_FLAGS=${LIBCXX_CXX_FLAGS}
682687
-DCMAKE_BUILD_TYPE=Release

lldb/bindings/python/python-typemaps.swig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ AND call SWIG_fail at the same time, because it will result in a double free.
110110
SWIG_fail;
111111
}
112112

113-
if (llvm::StringRef(type_name.get()).startswith("SB")) {
113+
if (llvm::StringRef(type_name.get()).starts_with("SB")) {
114114
std::string error_msg = "Input type is invalid: " + type_name.get();
115115
PyErr_SetString(PyExc_TypeError, error_msg.c_str());
116116
SWIG_fail;

llvm/cmake/modules/LLVMExternalProjectUtils.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,10 @@ function(llvm_ExternalProject_Add name source_dir)
319319
list(APPEND compiler_args -DCMAKE_ASM_COMPILER_TARGET=${ARG_TARGET_TRIPLE})
320320
endif()
321321

322+
if(CMAKE_VERBOSE_MAKEFILE)
323+
set(verbose -DCMAKE_VERBOSE_MAKEFILE=ON)
324+
endif()
325+
322326
ExternalProject_Add(${name}
323327
DEPENDS ${ARG_DEPENDS} llvm-config
324328
${name}-clobber
@@ -330,6 +334,7 @@ function(llvm_ExternalProject_Add name source_dir)
330334
CMAKE_ARGS ${${nameCanon}_CMAKE_ARGS}
331335
--no-warn-unused-cli
332336
${compiler_args}
337+
${verbose}
333338
-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
334339
${sysroot_arg}
335340
-DLLVM_BINARY_DIR=${PROJECT_BINARY_DIR}

llvm/docs/AliasAnalysis.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ Writing a new ``AliasAnalysis`` Implementation
207207

208208
Writing a new alias analysis implementation for LLVM is quite straight-forward.
209209
There are already several implementations that you can use for examples, and the
210-
following information should help fill in any details. For a examples, take a
210+
following information should help fill in any details. For examples, take a
211211
look at the `various alias analysis implementations`_ included with LLVM.
212212

213213
Different Pass styles

llvm/docs/ConvergentOperations.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ those in the caller.
607607
only if both threads entered the function by executing converged
608608
dynamic instances of the call-site.
609609

610-
This intrinsic can occur at most once in a function, and only in the the entry
610+
This intrinsic can occur at most once in a function, and only in the entry
611611
block of the function. If this intrinsic occurs in a basic block, then it must
612612
precede any other convergent operation in the same basic block.
613613

llvm/docs/JITLink.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ finally transferring linked memory to the executing process.
466466

467467
Calls the ``JITLinkContext``'s ``JITLinkMemoryManager`` to allocate both
468468
working and target memory for the graph. As part of this process the
469-
``JITLinkMemoryManager`` will update the the addresses of all nodes
469+
``JITLinkMemoryManager`` will update the addresses of all nodes
470470
defined in the graph to their assigned target address.
471471

472472
Note: This step only updates the addresses of nodes defined in this graph.

0 commit comments

Comments
 (0)