This is the mail archive of the gcc-patches@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: [C PATCH] Discard P - (P + CST) optimization in pointer_diff (PR c/61240)


On Aug 6, 2014, at 9:04 AM, Jeff Law <law@redhat.com> wrote:
>> which we may restrict better with checking whether the pointer
>> uses a partial integer mode.  Not sure how PSImode -> SImode
>> "extends" on RTL?
> Well, at least on the mn102, I defined both a zero and sign extension for PSI -> SI.  So whichever one the generic parts of the compiler needed, the backend provided.

I have a port that defines exactly the bit width of all partials.  The extending of it is machine independent and obvious.  Though, there are places in the backend that just call the conversion operation they are interested in and pretend they can’t understand what’s going on.  I tend to prefer the backend know and I prefer to explain to it the width of all the partials.

Wait, did I submit that?

config/msp430/msp430-modes.def:
  /* 20-bit address */
  PARTIAL_INT_MODE (SI, 20, PSI);

ah, yes, I think I did.  You scared me for a second.

> As to what bits are modified, that's target dependent as the precise size of the partial modes is target dependent.

GET_MODE_PRECISION (mode) is the precision of all modes.

> That's one of the things that would be largely made irrelevant by DJ's proposed changes.  Instead of using PSImode,

What’s PSImode?

> we'd be able to define modes of precisely the number of bits one of these targets needs.

Gosh, we already do that.  GET_MODE_PRECISION (mode) is exactly the width:

     PARTIAL_INT_MODE (MODE, PRECISION, NAME);                                 |
        declares a mode of class PARTIAL_INT with the same size as             |
        MODE (which must be an INT mode) and precision PREC.                   |
        Optionally, NAME is the new name of the mode.  NAME is the             |
        name of the mode.                                                      |

?

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