[llvm-dev] aarch64 does not emit DW_AT_Location

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[llvm-dev] aarch64 does not emit DW_AT_Location

Chris Lattner via llvm-dev

Hi Devs,
debug info emitted by llvm does not contain DW_AT_Location for Formal parameter
if it is an aggregate like below case
1) aggregate contain more than 4 homogeneous and size more than 128 bits
i.e.
typedef struct{
int a,b,c,d,e;
}mystruct;
void foo(mystruct ms){
}

2) aggregate contain hetrogeneous type and size more than 128 bits.
i.e.
typedef struct{
int a,b;
float c,d,e;
}mystruct;
void foo(mystruct ms){

}

This occur only when aarch64 is used, not with arm and x86.
like to know community thoughts wether this can be considered as bug or it's an abi restriction.


./kamlesh

_______________________________________________
LLVM Developers mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Reply | Threaded
Open this post in threaded view
|

Re: [llvm-dev] aarch64 does not emit DW_AT_Location

Chris Lattner via llvm-dev
Hi Kamlesh,

Does it also happen when the parameters are used? From what I quickly tried, if the parameter is used, clang emits
the location, as expected, e.g. `(DW_OP_breg0 (x0): 0)`

On Tue, Jan 21, 2020 at 11:55 AM kamlesh kumar via llvm-dev <[hidden email]> wrote:

Hi Devs,
debug info emitted by llvm does not contain DW_AT_Location for Formal parameter
if it is an aggregate like below case
1) aggregate contain more than 4 homogeneous and size more than 128 bits
i.e.
typedef struct{
int a,b,c,d,e;
}mystruct;
void foo(mystruct ms){
}

2) aggregate contain hetrogeneous type and size more than 128 bits.
i.e.
typedef struct{
int a,b;
float c,d,e;
}mystruct;
void foo(mystruct ms){

}

This occur only when aarch64 is used, not with arm and x86.
like to know community thoughts wether this can be considered as bug or it's an abi restriction.


./kamlesh
_______________________________________________
LLVM Developers mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev


--
Compiler scrub, Arm

_______________________________________________
LLVM Developers mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Reply | Threaded
Open this post in threaded view
|

Re: [llvm-dev] aarch64 does not emit DW_AT_Location

Chris Lattner via llvm-dev
Hi Momchil,
I am using something like this and we do not get Location information.

#include<stdio.h>
typedef struct {
double a,b,c,d,e;
}mystruct;

void foo(mystruct ms){
printf("%llu\n",(unsigned long long) &ms);
}




On Tue, Jan 21, 2020 at 5:33 PM Momchil Velikov <[hidden email]> wrote:
Hi Kamlesh,

Does it also happen when the parameters are used? From what I quickly tried, if the parameter is used, clang emits
the location, as expected, e.g. `(DW_OP_breg0 (x0): 0)`

On Tue, Jan 21, 2020 at 11:55 AM kamlesh kumar via llvm-dev <[hidden email]> wrote:

Hi Devs,
debug info emitted by llvm does not contain DW_AT_Location for Formal parameter
if it is an aggregate like below case
1) aggregate contain more than 4 homogeneous and size more than 128 bits
i.e.
typedef struct{
int a,b,c,d,e;
}mystruct;
void foo(mystruct ms){
}

2) aggregate contain hetrogeneous type and size more than 128 bits.
i.e.
typedef struct{
int a,b;
float c,d,e;
}mystruct;
void foo(mystruct ms){

}

This occur only when aarch64 is used, not with arm and x86.
like to know community thoughts wether this can be considered as bug or it's an abi restriction.


./kamlesh
_______________________________________________
LLVM Developers mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev


--
Compiler scrub, Arm

_______________________________________________
LLVM Developers mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Reply | Threaded
Open this post in threaded view
|

Re: [llvm-dev] aarch64 does not emit DW_AT_Location

Chris Lattner via llvm-dev
In reply to this post by Chris Lattner via llvm-dev
If this is unoptimized code this is definitely a bug, with optimizations it may not be possible to do any better. In both cases it's worth filing a bug and attaching a clang reproducer (by running clang through env FORCE_CLANG_DIAGNOSTICS_CRASH=1).

-- adrian

On Jan 21, 2020, at 3:54 AM, kamlesh kumar via llvm-dev <[hidden email]> wrote:


Hi Devs,
debug info emitted by llvm does not contain DW_AT_Location for Formal parameter
if it is an aggregate like below case
1) aggregate contain more than 4 homogeneous and size more than 128 bits
i.e.
typedef struct{
int a,b,c,d,e;
}mystruct;
void foo(mystruct ms){
}

2) aggregate contain hetrogeneous type and size more than 128 bits.
i.e.
typedef struct{
int a,b;
float c,d,e;
}mystruct;
void foo(mystruct ms){

}

This occur only when aarch64 is used, not with arm and x86.
like to know community thoughts wether this can be considered as bug or it's an abi restriction.


./kamlesh
_______________________________________________
LLVM Developers mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev


_______________________________________________
LLVM Developers mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Reply | Threaded
Open this post in threaded view
|

Re: [llvm-dev] aarch64 does not emit DW_AT_Location

Chris Lattner via llvm-dev
Adrian,
Yes it is unoptimized.I will file a bug for this.

Thanks


On Wed, Jan 22, 2020, 1:40 AM Adrian Prantl <[hidden email]> wrote:
If this is unoptimized code this is definitely a bug, with optimizations it may not be possible to do any better. In both cases it's worth filing a bug and attaching a clang reproducer (by running clang through env FORCE_CLANG_DIAGNOSTICS_CRASH=1).

-- adrian

On Jan 21, 2020, at 3:54 AM, kamlesh kumar via llvm-dev <[hidden email]> wrote:


Hi Devs,
debug info emitted by llvm does not contain DW_AT_Location for Formal parameter
if it is an aggregate like below case
1) aggregate contain more than 4 homogeneous and size more than 128 bits
i.e.
typedef struct{
int a,b,c,d,e;
}mystruct;
void foo(mystruct ms){
}

2) aggregate contain hetrogeneous type and size more than 128 bits.
i.e.
typedef struct{
int a,b;
float c,d,e;
}mystruct;
void foo(mystruct ms){

}

This occur only when aarch64 is used, not with arm and x86.
like to know community thoughts wether this can be considered as bug or it's an abi restriction.


./kamlesh
_______________________________________________
LLVM Developers mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev


_______________________________________________
LLVM Developers mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Reply | Threaded
Open this post in threaded view
|

Re: [llvm-dev] aarch64 does not emit DW_AT_Location

Chris Lattner via llvm-dev
Adrian,
There was an existing entry for same


On Wed, Jan 22, 2020 at 6:44 AM kamlesh kumar <[hidden email]> wrote:
Adrian,
Yes it is unoptimized.I will file a bug for this.

Thanks


On Wed, Jan 22, 2020, 1:40 AM Adrian Prantl <[hidden email]> wrote:
If this is unoptimized code this is definitely a bug, with optimizations it may not be possible to do any better. In both cases it's worth filing a bug and attaching a clang reproducer (by running clang through env FORCE_CLANG_DIAGNOSTICS_CRASH=1).

-- adrian

On Jan 21, 2020, at 3:54 AM, kamlesh kumar via llvm-dev <[hidden email]> wrote:


Hi Devs,
debug info emitted by llvm does not contain DW_AT_Location for Formal parameter
if it is an aggregate like below case
1) aggregate contain more than 4 homogeneous and size more than 128 bits
i.e.
typedef struct{
int a,b,c,d,e;
}mystruct;
void foo(mystruct ms){
}

2) aggregate contain hetrogeneous type and size more than 128 bits.
i.e.
typedef struct{
int a,b;
float c,d,e;
}mystruct;
void foo(mystruct ms){

}

This occur only when aarch64 is used, not with arm and x86.
like to know community thoughts wether this can be considered as bug or it's an abi restriction.


./kamlesh
_______________________________________________
LLVM Developers mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev


_______________________________________________
LLVM Developers mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev