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: RFC: [PATCH]: PR31806 - Fix MEM_READONLY_P aliasing disambiguation


> Any comments?

As Andrew said in the audit trail, you're essentially bringing back the 
semantics of RTX_UNCHANGING_P from the GCC 2.x and 3.x era:

`RTX_UNCHANGING_P (X)'
     Nonzero in a `reg', `mem', or `concat' if the register or memory
     is set at most once, anywhere.  This does not mean that it is
     function invariant.

which was a nightmare to deal with, so it's certainly not the way to go.


The definition of MEM_READONLY_P is rather unambiguous:

/* 1 if RTX is a mem that is statically allocated in read-only memory.  */
#define MEM_READONLY_P(RTX) \
  (RTL_FLAG_CHECK1("MEM_READONLY_P", (RTX), MEM)->unchanging)

-- 
Eric Botcazou


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