This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug rtl-optimization/56590] Replace auto-inc-dec pass with generic address mode selection pass


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56590

--- Comment #2 from Oleg Endo <olegendo at gcc dot gnu.org> ---
(In reply to amker from comment #1)
> This surely sounds interesting.  Like I suggested in PR62173, RTL optimizer
> might be able to do more in address expression re-association and addressing
> mode choosing.
> But it's difficult to change base/offset for addresses which are IVOPTed on
> GIMPLE.

(Proper) AMS is a difficult problem and depends a lot on the target address
mode capabilities and the context of the memory accesses.  I wouldn't try to do
that on GIMPLE or in ivopt.  There's simply not enough information on the
instructions that will be used for actually carrying out the memory accesses. 
Whatever is done on GIMPLE without taking the target into account will result
in missed optimization cases eventually.  I would rather not distribute the AMS
problem across sevaral compilation phases like doing a bit on GIMPLE and doing
a bit on RTL later.  Of course it'd be helpful if the tree optimizers can
prepare some things that make AMS optimization more successful.  But generally
I think an AMS pass should be able to work on its own.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]