1 |
Ryan Hill <rhill@g.o> wrote: |
2 |
> |
3 |
> One thing I forgot to mention - LTO can also have detrimental effect on |
4 |
> certain architectures. On some (eg. ppc), performance can actually |
5 |
> be degraded due to increased register pressure. |
6 |
|
7 |
If this really is the case it is not the problem of LTO but |
8 |
of the optimizer: If the optimizer really produces *worse* |
9 |
code when he *can* see the full program instead of only parts of it, |
10 |
something is severely broken in the optimizer. Only decreasing the |
11 |
possibilities of the optimizer by removing LTO would be the wrong way |
12 |
to "solve" this problem. |
13 |
|
14 |
Of course, this does not touch the validity of your other arguments. |
15 |
|
16 |
On the other hand, if upstream tests and supports LTO, it should |
17 |
be communicated to the user somehow that this is the case. |
18 |
The same dilemma applies to some other CFLAGS which should not be |
19 |
used in general but only if the code is written for them: |
20 |
Is it really a good idea to produce in such cases *by default* code |
21 |
which is less optimal than supported by upstream and the user is |
22 |
not even informed about this change? |