Displaying 20 results from an estimated 663 matches for "flto".
2019 Jan 08
2
distributed thinlto usage
I am trying to work through the usage of thinlto for distributed builds.
Here is the simple thinlto usage, just add -flto=thin everywhere, easy:
clang++ -flto=thin -O3 -c -o CreateWay_.o -DSPEC_CPU -DNDEBUG -DSPEC_CPU_LITTLE_ENDIAN -Wno-dangling-else CreateWay_.cpp
clang++ -flto=thin -O3 -c -o Places_.o -DSPEC_CPU -DNDEBUG -DSPEC_CPU_LITTLE_ENDIAN -Wno-dangling-else Places_.cpp
clang++...
2019 Jan 09
2
distributed thinlto usage
...new path as well - if your native .o files use the new path then this is a simple way of getting a list of input files for the final link, which can be passed via @files.out to gold (note the gold manpage does not document "@" but the gnu ld manpage does).
I.e. something like:
clang++ -flto=thin -O3 -c -o path1/foo.o foo.cpp
...
clang++ -flto=thin -O3 -Wl,-plugin-opt,thinlto-index-only=files.out -Wl,-plugin-opt,thinlto-prefix-replace=path1;path2" foo.o ...
clang++ -c -x ir path1/foo.o -O3 -o path2/foo.o -fthinlto-index=path2/foo.o.thinlto.bc
...
clang++ -flto=thin -O3 -o a.out @f...
2019 Jan 09
2
distributed thinlto usage
...new path as well - if your native .o files use the new path then this is a simple way of getting a list of input files for the final link, which can be passed via @files.out to gold (note the gold manpage does not document "@" but the gnu ld manpage does).
I.e. something like:
clang++ -flto=thin -O3 -c -o path1/foo.o foo.cpp
...
clang++ -flto=thin -O3 -Wl,-plugin-opt,thinlto-index-only=files.out -Wl,-plugin-opt,thinlto-prefix-replace=path1;path2" foo.o ...
clang++ -c -x ir path1/foo.o -O3 -o path2/foo.o -fthinlto-index=path2/foo.o.thinlto.bc
...
clang++ -flto=thin -O3 -o a.out @f...
2015 Mar 18
5
[LLVMdev] Controlling the LTO optimization level
...how users should specify the level of
optimization to apply, as well as a design for changes to the clang driver
and the various LTO plugins so that the plugin knows whether optimizations
are required.
Solutions
---------
1) Controlled at compile time
Strawman proposal for command line syntax:
-flto-level=X means optimize at level X. At link time, the LTO plugin will
take the maximum of all -flto-level flags and optimize at that level.
-flto-level is inferred from other flags if not specified:
-flto implies -flto-level=2.
If -flto not specified, -O >= 1 implies -flto-level=1.
Otherwise, d...
2014 May 27
2
[LLVMdev] Getting LLVM bit-code for programs using a couple of libraries
...ttp://pastebin.com/zkmL2SAH)
>
> You shouldn't really expect "-emit-llvm" to work well with an existing
> build system. That flag means the normal .o files produced by clang
> will be LLVM bitcode *instead* of ELF (or whatever). This happens to
> be the norm with "-flto" compilations, but that needs a compatible
> linker and really it needs clang to know that's what it's doing (i.e.
> -flto at *all* stages of compilation).
Does it mean that I need to give -flto option for compilation while
building the libraries that I am using i.e. lttng-ust a...
2014 Mar 15
1
Gcc-4.9.0 trunk revision 208516 cannot compile openssh package with -flto
...lp?
I opened a case in GCC Bugzilla and got reply that -fpie have to be
used to get it compiled.
Now it fails for me with:
x86_64-pc-linux-gnu-gcc -o ssh ssh.o readconf.o clientloop.o sshtty.o
sshconnect.o sshconnect1.o sshconnect2.o mux.o roaming_common.o
roaming_client.o -L. -Lopenbsd-compat/ -flto=4 -fuse-linker-plugin
-Wl,--as-needed -Wl,-O2 -Wl,-flto -O2 -ggdb -pipe -march=native
-mtune=native -mno-3dnow -mno-sse4.2 -mno-avx -Wl,-z,relro -Wl,-z,now
-Wl,-z,noexecstack -fstack-protector-strong -flto=4
-fuse-linker-plugin -Wl,--as-needed -Wl,-O2 -Wl,-flto -O2 -ggdb -pipe
-march=native -mtune=...
2023 Nov 12
1
Segmentation fault early in compilation of revision 85514
...the compilation. I am uncertain
as to what it means (please see below for error extract). I am using the
most recent version of Rtools43 (5863) and updated its libraries prior to
starting the build. My EOPTS is " -march=native -pipe -mno-rtm" and my
LTO/LTO_OPT/LTO_FC/LTO_FC_OPT is "-flto=1 -fuse-linker-plugin".
Any explanation or suggestions would be appreciated.
Thank you,
Avi
```
installing zoneinfo
making console.d from console.c
making dynload.d from dynload.c
making embeddedR.d from embeddedR.c
making preferences.d from preferences.c
making psignal.d from psignal.c
ma...
2019 Jun 17
2
Running distributed thinLTO without thin archives.
I'm trying to run distributed ThinLTO without thin archives.
When I do, I get an error in the optimizer when clang tries to open a
nonexistent file:
clang++ -flto=thin -Xclang -fno-lto-unit -O3 -c main.cpp -o main.o
clang++ -flto=thin -Xclang -fno-lto-unit -O3 -c lib/lib.cpp -o lib/lib.o
clang++ -flto=thin -Xclang -fno-lto-unit -O3 -c src/lib.cpp -o src/lib.o
llvm-ar -format gnu qcs lib.a lib/lib.o src/lib.o
clang++ -flto=thin -o index -O3
-Wl,-plugin-opt,t...
2013 Jun 12
2
[LLVMdev] [PATCH] gcc-4.8.1 -flto, error for visibility of LLVMX86CompilationCallback2?
...ex 44d8cce..8acc220 100644
--- a/lib/Target/X86/X86JITInfo.cpp
+++ b/lib/Target/X86/X86JITInfo.cpp
@@ -339,6 +339,8 @@ extern "C" {
/// must locate the start of the stub or call site and pass it into the JIT
/// compiler function.
extern "C" {
+LLVM_ATTRIBUTE_USED // Fix gcc -flto builds. gcc's LTO (as of 4.8.1) don't sees
+ // references from inline asm.
LLVM_LIBRARY_VISIBILITY void LLVMX86CompilationCallback2(intptr_t *StackPtr,
intptr_t RetAddr) {
intptr_t *RetAddrLoc = &StackPtr[...
2019 Jan 28
2
How to generate .bc file using configure && make on Mac OS X?
> On macOS you just omit the '-fuse-ld=gold' and it will work out of the box.
> > ./configure CC=clang RANLIB=llvm-ranlib CFLAGS=-flto
> > LDFLAGS=-Wl\,-plugin-opt=save-temps\ -flto\ -fuse-ld=gold
> > make
No. It doesn't work on Mac OS by just omitting '-fuse-ld=gold'.
$ ../../../extract/bash-5.0/configure CC=clang CXX=clang++
RANLIB=llvm-ranlib CFLAGS=-g\ -flto
LDFLAGS=-Wl\,-plugin-opt=save-temps\ -flto...
2009 Sep 18
0
[LLVMdev] [OT] GCC specs language and adding options
...on '-emit-llvm-bc'
> Also this seems by default seems for '-emit-llvm' to produce a '.o' file
> instead of a '.bc' file extension, unless using a '-o' option and overriding
> the filename.
> The LLVM code is as follows :-
> "%{O4|emit-llvm|flto:%{S:-emit-llvm} %{!S:-emit-llvm-bc %{c: %W{o*} %{!o*:-o
> %b%w.o}} %{!c:-o %d%w%u%O}}}"
> So we have '-O4', '-emit-llvm', and '-flto' equivalent options.
Yes, although they aren't actually equivalent, they definitely overlap
a lot. The distinctions are *mostl...
2019 Jan 25
2
How to generate .bc file using configure && make on Mac OS X?
Hi,
I use the following commands to compile a GNU package to .bc files on Linux.
./configure CC=clang RANLIB=llvm-ranlib CFLAGS=-flto
LDFLAGS=-Wl\,-plugin-opt=save-temps\ -flto\ -fuse-ld=gold
make
But since it uses ld.gold, it won't work on Mac OS X. Is there
something equivalent that works on Mac OS X? Thanks.
--
Regards,
Peng
2019 Jan 28
2
How to generate .bc file using configure && make on Mac OS X?
...(but not -plugin-opt).
> I haven't tried, but I'd guess that if you modified the -Wl part of
> your command line in the obvious manner it'll work.
I can run the configure using this command.
../../../extract/bash-5.0/configure CC=clang CXX=clang++
RANLIB=llvm-ranlib CFLAGS=-g\ -flto LDFLAGS=-save-temps\ -flto
But the command to generate the executable "bash" (called by make)
does not produce a .bc file.
clang -L./builtins -L./lib/readline -L./lib/readline -L./lib/glob
-L./lib/tilde -L./lib/sh -save-temps -flto -g -flto
-Wno-parentheses -Wno-format-security -o...
2016 May 17
2
How to debug if LTO generate wrong code?
...er specific again (ld is not the same program on every platform). For instance there is no such thing as O0/O1/O2 on OS X.
>
>
> $clang -emit-llvm -c main.c -o main.bc
> $clang -emit-llvm -c a.c -o a.bc
> $llvm-ar cr main.lib main.bc
> $llvm-ar cr a.lib a.bc
> $clang -O0 -flto main.lib a.lib -o main0
> $clang -O1 -flto main.lib a.lib -o main1
> $clang -O2 -flto main.lib a.lib -o main2
>
> $nm main0
> …
> 00000000004005a0 t foo1
> 0000000000400580 t foo2
> 00000000004005e0 t foo3
> 0000000000400530 t foo4
> 0000000000400500 t frame_dummy
&g...
2013 Jun 12
0
[LLVMdev] [PATCH] gcc-4.8.1 -flto, error for visibility of LLVMX86CompilationCallback2?
...lib/Target/X86/X86JITInfo.cpp
> +++ b/lib/Target/X86/X86JITInfo.cpp
> @@ -339,6 +339,8 @@ extern "C" {
> /// must locate the start of the stub or call site and pass it into the JIT
> /// compiler function.
> extern "C" {
> +LLVM_ATTRIBUTE_USED // Fix gcc -flto builds. gcc's LTO (as of 4.8.1) don't sees
> + // references from inline asm.
clang also doesn't see references from inline asm... I suggest you say:
LLVM_ATTRIBUTE_USED // referenced from inline asm.
Ciao, Duncan.
2020 Feb 25
2
How to print all pass when using -flto floag ?
Hi
We knew that "clang -mllvm -debug-pass=Structure ..." can print all pass'
name.
But,
when we use LTO , -flto flag and gold plugin.
I found that the option " -debug-pass=Structure" would not pass to ld.
so it would not print all the LTO pass's name.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200...
2020 Jul 12
2
Emit LLVM bitcode after ThinLTO
Hi,
I wanted to get the linked result in LLVM bitcode format.
With LTO, this can be done by -flto -Wl,-plugin-opt,emit-llvm. Instead of
generating native executables, it outputs a file with bitcode format.
Does this still work with -flto=thin? -flto=thin -Wl,-plugin-opt,emit-llvm
outputs a bitcode file, but its file size is too small, and does not
contain all contents.
What is the correct way...
2019 Jun 18
2
Running distributed thinLTO without thin archives.
...to deal with objects within archives. We do distributed
> ThinLTO in our builds but don't use .a files, rather, we use
> --start-lib/--end-lib around the files that would be in the same archive
> when performing the thin link. I.e. if you change your thin link to be:
>
> clang++ -flto=thin -o index -O3
> -Wl,-plugin-opt,thinlto-index-only=thinlto.objects
> -Wl,-plugin-opt,thinlto-emit-imports-files main.o --start-lib lib/lib.o
> src/lib.o --end-lib
>
> things should work.
>
> Note you also need to do the ThinLTO backend compile for each of the
> archive...
2009 Sep 16
3
[LLVMdev] [OT] GCC specs language and adding options
...gcc: unrecognized option '-emit-llvm-bc'
Also this seems by default seems for '-emit-llvm' to produce a '.o' file
instead of a '.bc' file extension, unless using a '-o' option and overriding
the filename.
The LLVM code is as follows :-
"%{O4|emit-llvm|flto:%{S:-emit-llvm} %{!S:-emit-llvm-bc %{c: %W{o*} %{!o*:-o
%b%w.o}} %{!c:-o %d%w%u%O}}}"
So we have '-O4', '-emit-llvm', and '-flto' equivalent options.
What I out like is either a '-emit-llvm-coff' and '-emit-llvm-elf' or
ideally an '-emit-llvm=coff&...
2017 May 16
2
ThinLTO with Linux+ELF+Gold -- incorrectly dropping weak definitions.
This looks similar to the problem I fixed awhile back in r292408. I'll take
a look (probably tomorrow since I am taking some vacation today).
Teresa
On Tue, May 16, 2017 at 9:43 AM, David Blaikie <dblaikie at gmail.com> wrote:
> +Teresa
>
> On Mon, May 15, 2017 at 9:20 AM David Callahan via llvm-dev <
> llvm-dev at lists.llvm.org> wrote:
>
>> I am tracking a