[llvm] [BOLT][DWARF][NFC] Minimize dwarf5-debug-names-gnu-push-tls-address.s (PR #120103)

Alexander Yermolovich via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 16 08:17:06 PST 2024


https://github.com/ayermolo created https://github.com/llvm/llvm-project/pull/120103

Removed unnecessary parts from the .text section.

>From 44c6533b180b482d8bc2397e29bc66d7f103080a Mon Sep 17 00:00:00 2001
From: Alexander Yermolovich <ayermolo at meta.com>
Date: Mon, 16 Dec 2024 07:51:28 -0800
Subject: [PATCH] minimize test

---
 .../dwarf5-debug-names-gnu-push-tls-address.s | 62 ++++---------------
 1 file changed, 13 insertions(+), 49 deletions(-)

diff --git a/bolt/test/X86/dwarf5-debug-names-gnu-push-tls-address.s b/bolt/test/X86/dwarf5-debug-names-gnu-push-tls-address.s
index 3f6ce71a799404..f84d0b6654e7a6 100644
--- a/bolt/test/X86/dwarf5-debug-names-gnu-push-tls-address.s
+++ b/bolt/test/X86/dwarf5-debug-names-gnu-push-tls-address.s
@@ -27,71 +27,35 @@
 ##   x = 10;
 ##   return x;
 ## }
-	.text
 	.file	"main.cpp"
 	.file	0 "gnu_tls_push" "main.cpp" md5 0x551db97d5e23dc6a81abdc5ade4d9d71
-	.globl	main                            # -- Begin function main
-	.p2align	4, 0x90
+	.globl	main
 	.type	main, at function
-main:                                   # @main
+main:
 .Lfunc_begin0:
-	.loc	0 2 0                           # main.cpp:2:0
-	.cfi_startproc
-# %bb.0:                                # %entry
-	pushq	%rbp
-	.cfi_def_cfa_offset 16
-	.cfi_offset %rbp, -16
-	movq	%rsp, %rbp
-	.cfi_def_cfa_register %rbp
-	movl	$0, -4(%rbp)
-.Ltmp0:
-	.loc	0 3 3 prologue_end              # main.cpp:3:3
-	movq	%fs:0, %rax
-	leaq	x at TPOFF(%rax), %rax
-	.loc	0 3 5 is_stmt 0                 # main.cpp:3:5
-	movl	$10, (%rax)
-	.loc	0 4 10 is_stmt 1                # main.cpp:4:10
-	movq	%fs:0, %rax
-	leaq	x at TPOFF(%rax), %rax
-	movl	(%rax), %eax
-	.loc	0 4 3 epilogue_begin is_stmt 0  # main.cpp:4:3
-	popq	%rbp
-	.cfi_def_cfa %rsp, 8
+	.loc	0 2 0
+	.loc	0 3 3 prologue_end
+	.loc	0 3 5 is_stmt 0
+	.loc	0 4 10 is_stmt 1
+	.loc	0 4 3 epilogue_begin is_stmt 0
 	retq
-.Ltmp1:
 .Lfunc_end0:
 	.size	main, .Lfunc_end0-main
-	.cfi_endproc
-                                        # -- End function
-	.section	.text._ZTW1x,"axG", at progbits,_ZTW1x,comdat
-	.hidden	_ZTW1x                          # -- Begin function _ZTW1x
+
+	.hidden	_ZTW1x
 	.weak	_ZTW1x
-	.p2align	4, 0x90
 	.type	_ZTW1x, at function
-_ZTW1x:                                 # @_ZTW1x
+_ZTW1x:
 .Lfunc_begin1:
-	.cfi_startproc
-# %bb.0:
-	pushq	%rbp
-	.cfi_def_cfa_offset 16
-	.cfi_offset %rbp, -16
-	movq	%rsp, %rbp
-	.cfi_def_cfa_register %rbp
-	movq	%fs:0, %rax
-	leaq	x at TPOFF(%rax), %rax
-	popq	%rbp
-	.cfi_def_cfa %rsp, 8
 	retq
 .Lfunc_end1:
 	.size	_ZTW1x, .Lfunc_end1-_ZTW1x
-	.cfi_endproc
-                                        # -- End function
-	.type	x, at object                       # @x
+
+	.type	x, at object
 	.section	.tbss,"awT", at nobits
 	.globl	x
-	.p2align	2, 0x0
 x:
-	.long	0                               # 0x0
+	.long	0
 	.size	x, 4
 
 	.section	.debug_abbrev,"", at progbits



More information about the llvm-commits mailing list