Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 16, 2024

Conversation

ayermolo
Copy link
Contributor

Removed unnecessary parts from the .text section.

@llvmbot
Copy link
Member

llvmbot commented Dec 16, 2024

@llvm/pr-subscribers-bolt

Author: Alexander Yermolovich (ayermolo)

Changes

Removed unnecessary parts from the .text section.


Full diff: https://github.com/llvm/llvm-project/pull/120103.diff

1 Files Affected:

  • (modified) bolt/test/X86/dwarf5-debug-names-gnu-push-tls-address.s (+13-49)
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,@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@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@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",@progbits,_ZTW1x,comdat
-	.hidden	_ZTW1x                          # -- Begin function _ZTW1x
+
+	.hidden	_ZTW1x
 	.weak	_ZTW1x
-	.p2align	4, 0x90
 	.type	_ZTW1x,@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@TPOFF(%rax), %rax
-	popq	%rbp
-	.cfi_def_cfa %rsp, 8
 	retq
 .Lfunc_end1:
 	.size	_ZTW1x, .Lfunc_end1-_ZTW1x
-	.cfi_endproc
-                                        # -- End function
-	.type	x,@object                       # @x
+
+	.type	x,@object
 	.section	.tbss,"awT",@nobits
 	.globl	x
-	.p2align	2, 0x0
 x:
-	.long	0                               # 0x0
+	.long	0
 	.size	x, 4
 
 	.section	.debug_abbrev,"",@progbits

@ayermolo ayermolo merged commit 0a7e048 into llvm:main Dec 16, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants