This is the mail archive of the gcc@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]

Re: Reload and reg_equiv_constant


Richard Sandiford wrote:

>    - There are lots of s390-linux-gnu changesm, some of which
>      look better and some of which look worse.  I've attached
>      the diff for reference, but...

Actually, they're nearly all worse.  In general, we *want* to use
constant pool entries directly as memory references.

The only cases I've seen that were arguably improved are those where
your patch happened to eliminate *all* constants, which means that
the literal pool register need not be set up.  However, this nearly
never occurs in real-world code; you usually need a literal pool
anyway.

>The problem is that the test in init_reload is for a general symbol_ref,
>not a constant pool address.  I couldn't think of a good way of fixing
>this within the current framework.  For example, if we set the dummy
>symbol's CONSTANT_POOL_ADDRESS_P bit, the backend might pass the
>symbol to functions like get_pool_mode(), which would then abort.

What about doing a dummy force_const_mem of, say, const0_rtx?  The
constant pool mechanism shouldn't actually emit the constant if it
isn't really used ...


Mit freundlichen Gruessen / Best Regards

Ulrich Weigand

--
  Dr. Ulrich Weigand
  Linux for S/390 Design & Development
  IBM Deutschland Entwicklung GmbH, Schoenaicher Str. 220, 71032 Boeblingen
  Phone: +49-7031/16-3727   ---   Email: Ulrich.Weigand@de.ibm.com


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