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]

BLKmode unchanging write loop / alias inconsistencies


note_addr_stored in loop.c has:

    if (GET_MODE (x) == BLKmode)
    {
      if (RTX_UNCHANGING_P (x))
	unknown_constant_address_altered = 1;
      else
	unknown_address_altered = 1;

      return;
    }

loop_invariant has:

  case MEM:
    ...
    if (RTX_UNCHANGING_P (x)
	? unknown_constant_address_altered : unknown_address_altered)
      return 0;

which seems to say that a BLKmode unchanging write only affects
a read if the read is unchanging.  true_dependence seems to believe
that a BLKmode unchanging write affects a read even if the read
is changing.

Is there a single "right" answer?  Which of the following are true?

  1) Unchanging BLKmode write can affect an unchanging read.

  2) Unchanging BLKmode write can affect a changing read.

  3) Changing BLKmode write can affect an unchanging read.

  4) Changing BLKmode write can affect a changing read.

I assume that 1 & 4 are true.  true_dependence asserts
that 3 is false.  I'm not sure about 2.

-- John
-------------------------------------------------------------------------
|   Feith Systems  |   Voice: 1-215-646-8000  |  Email: john@feith.com  |
|    John Wehle    |     Fax: 1-215-540-5495  |                         |
-------------------------------------------------------------------------


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