This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: [PATCH]: PR31806 - Fix MEM_READONLY_P aliasing disambiguation
- From: Eric Botcazou <ebotcazou at libertysurf dot fr>
- To: Maxim Kuvyrkov <mkuvyrkov at ispras dot ru>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 30 May 2007 19:19:41 +0200
- Subject: Re: RFC: [PATCH]: PR31806 - Fix MEM_READONLY_P aliasing disambiguation
- References: <465D9AC5.7020803@ispras.ru>
> 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