Displaying 12 results from an estimated 12 matches for "codemodel1_large_lto".
2016 May 29
0
[cfe-dev] How to debug if LTO generate wrong code?
...p://eli.thegreenplace.net/2012/01/03/understanding-the-x64-code-models) to show the LLVM LTO code model issue.
$ clang -g -O0 codemodel1.c -mcmodel=large -o codemodel1_large.bin
$ clang -g -O0 codemodel1.c -mcmodel=small -o codemodel1_small.bin
$ clang -g -O0 -flto codemodel1.c -mcmodel=large -o codemodel1_large_lto.bin
$ clang -g -O0 -flto codemodel1.c -mcmodel=small -o codemodel1_small_lto.bin
You will see the codemodel1_large_lto.bin and codemodel1_small_lto.bin are exactly the same!
And if you disassemble the codemodel1_large_lto.bin, you will see it uses the small code model (32-bit RIP-relative), no...
2016 May 29
4
[cfe-dev] How to debug if LTO generate wrong code?
...place.net/2012/01/03/understanding-the-x64-code-models>) to show the LLVM LTO code model issue.
> $ clang -g -O0 codemodel1.c -mcmodel=large -o codemodel1_large.bin
> $ clang -g -O0 codemodel1.c -mcmodel=small -o codemodel1_small.bin
> $ clang -g -O0 -flto codemodel1.c -mcmodel=large -o codemodel1_large_lto.bin
> $ clang -g -O0 -flto codemodel1.c -mcmodel=small -o codemodel1_small_lto.bin
>
> You will see the codemodel1_large_lto.bin and codemodel1_small_lto.bin are exactly the same!
> And if you disassemble the codemodel1_large_lto.bin, you will see it uses the small code model (32-bit...
2016 May 17
2
[cfe-dev] How to debug if LTO generate wrong code?
> On May 17, 2016, at 11:21 AM, Umesh Kalappa <umesh.kalappa0 at gmail.com> wrote:
>
> Steven,
>
> As mehdi stated , the optimisation level is specific to linker and it
> enables Inter-Pro opts passes ,please refer function
To be very clear: the -O option may trigger *linker* optimizations as well, independently of LTO.
--
Mehdi
>
>
2016 May 30
0
[cfe-dev] How to debug if LTO generate wrong code?
...he one in GNU Binutils?
I'm a bit surprised if both OS X ld64 and gold plugin do not support large code model in LTO. Since modern system widely use the 64bit, the code need to run in high address (larger than 2 GB) is a reasonable requirement.
$ gcc -g -O0 -flto codemodel1.c -mcmodel=large -o codemodel1_large_lto_gcc.bin
$ objdump -dS codemodel1_large_lto_gcc.bin
int main(int argc, const char* argv[])
{
40048b: 55 push %rbp
40048c: 48 89 e5 mov %rsp,%rbp
40048f: 48 83 ec 20 sub $0x20,%rsp
400493: 89 7d ec...
2016 May 30
2
[cfe-dev] How to debug if LTO generate wrong code?
...n't support it for now seems to indicate that it is not a widely requested feature, especially considering that it is really a trivial option to add.
What is the linker you're using? Are you building your own clang?
--
Mehdi
>
> $ gcc -g -O0 -flto codemodel1.c -mcmodel=large -o codemodel1_large_lto_gcc.bin
> $ objdump -dS codemodel1_large_lto_gcc.bin
>
> int main(int argc, const char* argv[])
> {
> 40048b: 55 push %rbp
> 40048c: 48 89 e5 mov %rsp,%rbp
> 40048f: 48 83 ec 20 sub $0x20,%rsp
>...
2016 May 30
0
[cfe-dev] How to debug if LTO generate wrong code?
...t it is not a
> widely requested feature, especially considering that it is really a trivial
> option to add.
> What is the linker you're using? Are you building your own clang?
>
> --
> Mehdi
>
>
>
>
>
> $ gcc -g -O0 -flto codemodel1.c -mcmodel=large -o
> codemodel1_large_lto_gcc.bin
> $ objdump -dS codemodel1_large_lto_gcc.bin
>
> int main(int argc, const char* argv[])
> {
> 40048b: 55 push %rbp
> 40048c: 48 89 e5 mov %rsp,%rbp
> 40048f: 48 83 ec 20 sub $0x20,%rsp
>...
2016 May 30
0
[cfe-dev] How to debug if LTO generate wrong code?
...that we don't support it for now seems to indicate that it is not a widely requested feature, especially considering that it is really a trivial option to add.
What is the linker you're using? Are you building your own clang?
--
Mehdi
$ gcc -g -O0 -flto codemodel1.c -mcmodel=large -o codemodel1_large_lto_gcc.bin
$ objdump -dS codemodel1_large_lto_gcc.bin
int main(int argc, const char* argv[])
{
40048b: 55 push %rbp
40048c: 48 89 e5 mov %rsp,%rbp
40048f: 48 83 ec 20 sub $0x20,%rsp
400493: 89 7d ec...
2016 May 30
7
[cfe-dev] How to debug if LTO generate wrong code?
...that it is not a widely requested feature, especially considering that it is really a trivial option to add.
> What is the linker you're using? Are you building your own clang?
>
> --
> Mehdi
>
>
>
>
>
> $ gcc -g -O0 -flto codemodel1.c -mcmodel=large -o codemodel1_large_lto_gcc.bin
> $ objdump -dS codemodel1_large_lto_gcc.bin
>
> int main(int argc, const char* argv[])
> {
> 40048b: 55 push %rbp
> 40048c: 48 89 e5 mov %rsp,%rbp
> 40048f: 48 83 ec 20 sub $0x20,%rsp
>...
2016 May 30
0
[cfe-dev] How to debug if LTO generate wrong code?
...t that we don't support it for now seems to indicate that it is not a widely requested feature, especially considering that it is really a trivial option to add.
What is the linker you're using? Are you building your own clang?
--
Mehdi
$ gcc -g -O0 -flto codemodel1.c -mcmodel=large -o codemodel1_large_lto_gcc.bin
$ objdump -dS codemodel1_large_lto_gcc.bin
int main(int argc, const char* argv[])
{
40048b: 55 push %rbp
40048c: 48 89 e5 mov %rsp,%rbp
40048f: 48 83 ec 20 sub $0x20,%rsp
400493: 89 7d ec...
2016 May 30
1
[cfe-dev] How to debug if LTO generate wrong code?
...idering that it is really a trivial
> > option to add.
> > What is the linker you're using? Are you building your own clang?
> >
> > --
> > Mehdi
> >
> >
> >
> >
> >
> > $ gcc -g -O0 -flto codemodel1.c -mcmodel=large -o
> > codemodel1_large_lto_gcc.bin
> > $ objdump -dS codemodel1_large_lto_gcc.bin
> >
> > int main(int argc, const char* argv[])
> > {
> > 40048b: 55 push %rbp
> > 40048c: 48 89 e5 mov %rsp,%rbp
> > 40048f: 48 83 ec 20 sub $0x20,%rsp
> > 400493: 89 7d ec mov %edi,-0x14(%rbp)
&g...
2016 May 30
2
[cfe-dev] How to debug if LTO generate wrong code?
...that it is not a widely requested feature, especially considering that it is really a trivial option to add.
> What is the linker you're using? Are you building your own clang?
>
> --
> Mehdi
>
>
>
>
>
> $ gcc -g -O0 -flto codemodel1.c -mcmodel=large -o codemodel1_large_lto_gcc.bin
> $ objdump -dS codemodel1_large_lto_gcc.bin
>
> int main(int argc, const char* argv[])
> {
> 40048b: 55 push %rbp
> 40048c: 48 89 e5 mov %rsp,%rbp
> 40048f: 48 83 ec 20 sub $0x20,%rsp
>...
2016 May 30
0
[cfe-dev] How to debug if LTO generate wrong code?
...t that we don't support it for now seems to indicate that it is not a widely requested feature, especially considering that it is really a trivial option to add.
What is the linker you're using? Are you building your own clang?
--
Mehdi
$ gcc -g -O0 -flto codemodel1.c -mcmodel=large -o codemodel1_large_lto_gcc.bin
$ objdump -dS codemodel1_large_lto_gcc.bin
int main(int argc, const char* argv[])
{
40048b: 55 push %rbp
40048c: 48 89 e5 mov %rsp,%rbp
40048f: 48 83 ec 20 sub $0x20,%rsp
400493: 89 7d ec...