llvm.org GIT mirror llvm / 114b83c
[AMDGPU] Change section name with metadata access Summary: The commit rL348922 introduced a means to set Metadata section kind for a global variable, if its explicit section name was prefixed with ".AMDGPU.metadata.". This patch changes that prefix to ".AMDGPU.comment.", as "metadata" in the section name might lead to ambiguity with metadata used by AMD PAL runtime. Change-Id: Idd4748800d6fe801441d91595fc21e5a4171e668 Reviewers: kzhuravl Reviewed By: kzhuravl Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D56197 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350292 91177308-0d34-0410-b5e6-96231b3b80d8 Piotr Sobczak 8 months ago
2 changed file(s) with 13 addition(s) and 13 deletion(s). Raw diff Collapse all Expand all
3333 const GlobalObject *GO, SectionKind SK, const TargetMachine &TM) const {
3434 // Set metadata access for the explicit section
3535 StringRef SectionName = GO->getSection();
36 if (SectionName.startswith(".AMDGPU.metadata."))
36 if (SectionName.startswith(".AMDGPU.comment."))
3737 SK = SectionKind::getMetadata();
3838
3939 return TargetLoweringObjectFileELF::getExplicitSectionGlobal(GO, SK, TM);
0 ; RUN: llc < %s -march=amdgcn -mcpu=fiji -filetype=obj | llvm-readobj -symbols -s -sd - | FileCheck %s
11
22 ; CHECK: Section {
3 ; CHECK: Name: .AMDGPU.metadata.info_1
3 ; CHECK: Name: .AMDGPU.comment.info_1
44 ; CHECK: Type: SHT_PROGBITS (0x1)
55 ; CHECK: Flags [ (0x0)
66 ; CHECK: Size: 16
1010 ; CHECK: }
1111
1212 ; CHECK: Section {
13 ; CHECK: Name: .AMDGPU.metadata.info_2
13 ; CHECK: Name: .AMDGPU.comment.info_2
1414 ; CHECK: Type: SHT_PROGBITS (0x1)
1515 ; CHECK: Flags [ (0x0)
1616 ; CHECK: Size: 16
2020 ; CHECK: }
2121
2222 ; CHECK: Section {
23 ; CHECK: Name: .AMDGPU.metadata.info_3
23 ; CHECK: Name: .AMDGPU.comment.info_3
2424 ; CHECK: Type: SHT_PROGBITS (0x1)
2525 ; CHECK: Flags [ (0x0)
2626 ; CHECK: Size: 16
3030 ; CHECK: }
3131
3232 ; CHECK: Symbol {
33 ; CHECK: Name: metadata_info_var_1
33 ; CHECK: Name: comment_info_var_1
3434 ; CHECK: Size: 16
3535 ; CHECK: Binding: Local
36 ; CHECK: Section: .AMDGPU.metadata.info_1
36 ; CHECK: Section: .AMDGPU.comment.info_1
3737 ; CHECK: }
3838
3939 ; CHECK: Symbol {
40 ; CHECK: Name: metadata_info_var_2
40 ; CHECK: Name: comment_info_var_2
4141 ; CHECK: Size: 16
4242 ; CHECK: Binding: Global
43 ; CHECK: Section: .AMDGPU.metadata.info_2
43 ; CHECK: Section: .AMDGPU.comment.info_2
4444 ; CHECK: }
4545
4646 ; CHECK: Symbol {
47 ; CHECK: Name: metadata_info_var_3
47 ; CHECK: Name: comment_info_var_3
4848 ; CHECK: Size: 16
4949 ; CHECK: Binding: Global
50 ; CHECK: Section: .AMDGPU.metadata.info_3
50 ; CHECK: Section: .AMDGPU.comment.info_3
5151 ; CHECK: }
5252
53 @metadata_info_var_1 = internal global [4 x i32][i32 826559809, i32 826559809, i32 826559809, i32 826559809], align 1, section ".AMDGPU.metadata.info_1"
54 @metadata_info_var_2 = constant [4 x i32][i32 843337025, i32 843337025, i32 843337025, i32 843337025], align 1, section ".AMDGPU.metadata.info_2"
55 @metadata_info_var_3 = global [4 x i32][i32 860114241, i32 860114241, i32 860114241, i32 860114241], align 1, section ".AMDGPU.metadata.info_3"
53 @comment_info_var_1 = internal global [4 x i32][i32 826559809, i32 826559809, i32 826559809, i32 826559809], align 1, section ".AMDGPU.comment.info_1"
54 @comment_info_var_2 = constant [4 x i32][i32 843337025, i32 843337025, i32 843337025, i32 843337025], align 1, section ".AMDGPU.comment.info_2"
55 @comment_info_var_3 = global [4 x i32][i32 860114241, i32 860114241, i32 860114241, i32 860114241], align 1, section ".AMDGPU.comment.info_3"