Re: Re[4]: GCC won`t emit my instriction

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 11, 2019 at 1:32 AM Alex Hill <hardest2005@xxxxxxx> wrote:
> BUT! In case we using IF loop GCC wont emit minmax AGAIN!

It looks like the memory accesses are the problem, not the control
flow.  However, the control flow may be affecting exactly how the
compiler optimizes the memory references.  If you create a temporary
variable, store the result in the temporary variable, and then write
the temporary variable to memory at the end, it should be optimized
regardless of control flow.

> what`s the difference between
> (reg:DI 113 [ ivtmp.29 ]) [1 MEM[base: _39, offset: 0B]+0 S8 A64])
> and
> (reg/f:DI 89 [ _48 ]) [1 *_48+0 S8 A64])

_ivtmp.29 and _48 are variable names.  In both cases, these are
variable names created by high level optimization passes.  See the
-fdump-tree-all output, and look at the last one before the conversion
to RTL.

The MEM is giving alias analysis info.  A is the alignment, S is the
size.  The first number is the alias set, where alias set 0 aliases
everything, and other numbers only alias values in the same alias set.
The MEM is the original base and offset for this address, where _39 is
again a compiler generated variable.  You can find the code that
prints this stuff in print-rtl.c, and then you probably need to look
at the alias analysis code if you want to know more.

See also the noce_try_minmax function I pointed at earlier, to see why
it works in one case but not in another case.

Jim



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux