Skip to content

Commit 1d3697e

Browse files
SC llvm teamSC llvm team
authored andcommitted
Merged main:35a66f965c0ea3b806b2b1736bfe4e6eb61d3613 into amd-gfx:93a2536cb084
Local branch amd-gfx 93a2536 Merged main:258091e76df69072e7088a5e251a2db7f8e3d0a9 into amd-gfx:e277eaeb736c Remote branch main 35a66f9 Precommit test for llvm#85737 (llvm#86056)
2 parents 93a2536 + 35a66f9 commit 1d3697e

File tree

9 files changed

+965
-8
lines changed

9 files changed

+965
-8
lines changed

bolt/lib/Profile/BoltAddressTranslation.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ void BoltAddressTranslation::writeEntriesForBB(MapTy &Map,
4444
<< " Val: " << Twine::utohexstr(BBInputOffset) << "\n");
4545
LLVM_DEBUG(dbgs() << formatv(" Hash: {0:x}\n",
4646
getBBHash(HotFuncAddress, BBInputOffset)));
47+
(void)HotFuncAddress;
4748
// In case of conflicts (same Key mapping to different Vals), the last
4849
// update takes precedence. Of course it is not ideal to have conflicts and
4950
// those happen when we have an empty BB that either contained only

bolt/test/X86/dwarf5-label-low-pc.s

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
# RUN: llvm-dwarfdump --show-form --verbose --debug-addr %t.bolt > %t.txt
1010
# RUN: llvm-dwarfdump --show-form --verbose --debug-info %t.bolt >> %t.txt
11+
# RUN: cat %t.txt | FileCheck --check-prefix=POSTCHECK %s
1112

1213
# This test checks that we correctly handle DW_AT_low_pc [DW_FORM_addrx] that is part of DW_TAG_label.
1314

@@ -35,16 +36,14 @@
3536
# POSTCHECK-NEXT: DW_AT_name
3637
# POSTCHECK-NEXT: DW_AT_decl_file
3738
# POSTCHECK-NEXT: DW_AT_decl_line
38-
# POSTCHECK-NEXT:
3939
# POSTCHECK-NEXT:DW_AT_low_pc [DW_FORM_addrx] (indexed (00000002)
40-
# POSTCHECK-SAME: [0x[[#ADDR]]
40+
# POSTCHECK-SAME: 0x[[#ADDR]]
4141
# POSTCHECK: DW_TAG_label
4242
# POSTCHECK-NEXT: DW_AT_name
4343
# POSTCHECK-NEXT: DW_AT_decl_file
4444
# POSTCHECK-NEXT: DW_AT_decl_line
45-
# POSTCHECK-NEXT:
4645
# POSTCHECK-NEXT:DW_AT_low_pc [DW_FORM_addrx] (indexed (00000003)
47-
# POSTCHECK-SAME: [0x[[#ADDR2]]
46+
# POSTCHECK-SAME: 0x[[#ADDR2]]
4847

4948
# clang++ main.cpp -g -S
5049
# int main() {

clang/lib/CodeGen/Targets/X86.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3019,6 +3019,10 @@ Address X86_64ABIInfo::EmitVAArg(CodeGenFunction &CGF, Address VAListAddr,
30193019
ABIArgInfo AI = classifyArgumentType(Ty, 0, neededInt, neededSSE,
30203020
/*isNamedArg*/false);
30213021

3022+
// Empty records are ignored for parameter passing purposes.
3023+
if (AI.isIgnore())
3024+
return CGF.CreateMemTemp(Ty);
3025+
30223026
// AMD64-ABI 3.5.7p5: Step 1. Determine whether type may be passed
30233027
// in the registers. If not go to step 7.
30243028
if (!neededInt && !neededSSE)
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
2+
// RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm -o - %s | FileCheck %s
3+
// RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm -x c -o - %s | FileCheck %s
4+
5+
typedef struct { struct {} a; } empty;
6+
7+
// CHECK-LABEL: @{{.*}}empty_record_test
8+
// CHECK-NEXT: entry:
9+
// CHECK-NEXT: [[RETVAL:%.*]] = alloca [[STRUCT_EMPTY:%.*]], align 1
10+
// CHECK-NEXT: [[Z_ADDR:%.*]] = alloca i32, align 4
11+
// CHECK-NEXT: [[LIST:%.*]] = alloca [1 x %struct.__va_list_tag], align 16
12+
// CHECK-NEXT: [[TMP:%.*]] = alloca [[STRUCT_EMPTY]], align 1
13+
// CHECK-NEXT: store i32 [[Z:%.*]], ptr [[Z_ADDR]], align 4
14+
// CHECK-NEXT: [[ARRAYDECAY:%.*]] = getelementptr inbounds [1 x %struct.__va_list_tag], ptr [[LIST]], i64 0, i64 0
15+
// CHECK-NEXT: call void @llvm.va_start(ptr [[ARRAYDECAY]])
16+
// CHECK-NEXT: [[ARRAYDECAY1:%.*]] = getelementptr inbounds [1 x %struct.__va_list_tag], ptr [[LIST]], i64 0, i64 0
17+
// CHECK-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 1 [[RETVAL]], ptr align 1 [[TMP]], i64 {{.*}}, i1 false)
18+
// CHECK-NEXT: ret void
19+
empty empty_record_test(int z, ...) {
20+
__builtin_va_list list;
21+
__builtin_va_start(list, z);
22+
return __builtin_va_arg(list, empty);
23+
}

compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ static void MaybeInstallSigaction(int signum,
216216

217217
struct sigaction sigact;
218218
internal_memset(&sigact, 0, sizeof(sigact));
219-
sigact.sa_sigaction = (sa_sigaction_t)handler;
219+
sigact.sa_sigaction = (sa_sigaction_t)(void (*)(void))handler;
220220
// Do not block the signal from being received in that signal's handler.
221221
// Clients are responsible for handling this correctly.
222222
sigact.sa_flags = SA_SIGINFO | SA_NODEFER;

compiler-rt/test/dfsan/custom.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ void test_stat() {
175175

176176
s.st_dev = i;
177177
SAVE_ORIGINS(s)
178-
ret = stat("/nonexistent", &s);
178+
ret = stat("/nonexistent_581cb021aba7", &s);
179179
assert(-1 == ret);
180180
ASSERT_ZERO_LABEL(ret);
181181
ASSERT_LABEL(s.st_dev, i_label);

libc/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ if(LLVM_LIBC_FULL_BUILD OR LLVM_LIBC_GPU_BUILD)
6161
endif()
6262
endif()
6363
# We will build the GPU utilities if we are not doing a runtimes build.
64-
if(LLVM_LIBC_GPU_BUILD AND NOT LLVM_RUNTIMES_BUILD)
64+
option(LIBC_BUILD_GPU_LOADER "Always build the GPU loader utilities" OFF)
65+
if(LIBC_BUILD_GPU_LOADER OR (LLVM_LIBC_GPU_BUILD AND NOT LLVM_RUNTIMES_BUILD))
6566
add_subdirectory(utils/gpu)
6667
endif()
6768

llvm/include/llvm/Config/llvm-config.h.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
/* Indicate that this is LLVM compiled from the amd-gfx branch. */
1818
#define LLVM_HAVE_BRANCH_AMD_GFX
19-
#define LLVM_MAIN_REVISION 493425
19+
#define LLVM_MAIN_REVISION 493432
2020

2121
/* Define if LLVM_ENABLE_DUMP is enabled */
2222
#cmakedefine LLVM_ENABLE_DUMP

0 commit comments

Comments
 (0)