Questions tagged [lto]

LTO abbreviates Link-Time Optimization. LTO is a phase of optimization applied to a compiled program at the linkage step, with the advantage that all of the compiled object files comprising the program can then be analysed together. Conventional optimization is performed by the compiler alone, which can generate and optimize only one object file at a time.

156 questions
0
votes
2 answers

Can all compile-time optimizations be done with link-time optimization?

Or are there some optimizations that can only be done at compile time (and therefore only work within compilation units)? I ask because in C, the compilation unit is a source file, and I'm trying to understand if there is any reason not to split…
awelkie
  • 2,422
  • 1
  • 22
  • 32
0
votes
1 answer

C++ program compiled with FlasCC with -O4 (LTO) hangs on virtual call

I have a problem with LTO optimization in FlasCC. When compiled with -O1 resulting swf runs just fine. But with -O4 it first runs OK, but then suddenly hangs on specific virtual function call for time over than 15 seconds and then Flash stops…
EyeGem
  • 1
  • 3
-1
votes
1 answer

What kind of program can benefit much from LTO?

When using dhrystone to get DMIPS, I found that LTO greatly impacted the results. LTO-dhrystone is nearly 4x LTO-less-dhrystone: $ wget http://www.xanthos.se/~joachim/dhrystone-src.tar.gz $ cd dhrystone-src without LTO $ aarch64-linux-gnu-gcc -O3…
-1
votes
1 answer

Map all returns of virtual functions to their corresponding return addresses

basically I want to do caller/callee mapping by adding runtime checks which checks for the allowed ranges before each C/C++ return is executed. I have a forward mapping of all virtual object dispatches to the allowed virtual table entries for a…
gBoy
  • 9
  • 3
-1
votes
2 answers

C: Compiling pre-compiled code as inline

For some rather complicated reason, I have a set of files which I would like to compile seperatly and then link, but so that the functions in one are placed inline in the second. This is because I would like them to be compiled with different flags…
superbriggs
  • 629
  • 1
  • 11
  • 19
-2
votes
1 answer

How do I enable LinkTimeOptimization with Clion?

I'd like to have my program link time optimized. Where do I have to enter it to enable it? If it matters (I hope it doesn't): I'm using MinGW-w64 5.0 on Windows. edit: I really don't see why it wouldn't matter that I'm using CLion. I'm aware that -…
Jack Sabbath
  • 1,398
  • 2
  • 9
  • 12
1 2 3
10
11