Displaying 12 results from an estimated 12 matches for "codemodel1".
Did you mean:
codemodel
2016 May 29
4
[cfe-dev] How to debug if LTO generate wrong code?
...olutely no assumptions about the addresses and data sections. But current LLVM LTO seems stick to use the small code model and generate many code with 32-bit RIP-relative addressing, which cause CPU exceptions when run in address larger than 2GB.
>
> Below, I just simply reuse the Eli's codemodel1.c example (link: http://eli.thegreenplace.net/2012/01/03/understanding-the-x64-code-models <http://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 -...
2016 May 29
0
[cfe-dev] How to debug if LTO generate wrong code?
...makes absolutely no assumptions about the addresses and data sections. But current LLVM LTO seems stick to use the small code model and generate many code with 32-bit RIP-relative addressing, which cause CPU exceptions when run in address larger than 2GB.
Below, I just simply reuse the Eli's codemodel1.c example (link: http://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...
2016 May 30
0
[cfe-dev] How to debug if LTO generate wrong code?
...inker which is different from the 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,%rs...
2016 May 30
2
[cfe-dev] How to debug if LTO generate wrong code?
...quirement.
The fact 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 8...
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?
...ort 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: 4...
2016 May 30
0
[cfe-dev] How to debug if LTO generate wrong code?
...asonable requirement.
The fact 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,%rs...
2016 May 30
7
[cfe-dev] How to debug if LTO generate wrong code?
...rt 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 8...
2016 May 30
0
[cfe-dev] How to debug if LTO generate wrong code?
...easonable requirement.
The fact 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,%rs...
2016 May 30
1
[cfe-dev] How to debug if LTO generate wrong code?
...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
2
[cfe-dev] How to debug if LTO generate wrong code?
...t 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 8...
2016 May 30
0
[cfe-dev] How to debug if LTO generate wrong code?
...easonable requirement.
The fact 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,%rs...