public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix PR 44972
@ 2010-09-08 17:16 Martin Jambor
  2010-09-08 17:16 ` [PATCH 1/2] Remove the IPA-SRA call to build_ref_for_offset Martin Jambor
  2010-09-08 17:19 ` [PATCH 2/2] Reimplementation of build_ref_for_offset Martin Jambor
  0 siblings, 2 replies; 11+ messages in thread
From: Martin Jambor @ 2010-09-08 17:16 UTC (permalink / raw)
  To: GCC Patches; +Cc: Richard Guenther

Hi,

the following two patches fix PR 44972 which was caused by transition
to MEM_REF.  The problem is that MEM_REFs can also act like
VIEW_CONVERT_EXPRs and before MEM_REF we would have disqualified many
(SRA) accesses with them.  When we don't, build_ref_for_offset can
find itself unable to create a reference consisting of component_refs
and array_refs in a situation when we cannot handle it and ICE.

The solution is to make build_ref_for_offset create a MEM_REF which is
what both patches do.  The first one does this for IPA-SRA, the second
one for everyone else (intra-SRA and IPA-CP/inlining).  The
implementations are very similar but I decided to keep them separate
because the IPA-SRA can handle more cases (it may add pointer
dereferences) and, more importantly, it relies on
force_gimple_operand_gsi (which is already used anyway) which can
somehow cope with functions that are not gimple_in_ssa_p.  The other
users don't need either and I did not want to use
force_gimple_operand_gsi there when it is not needed (and I wanted to
have things a bit more under control because of an extra layer
handling bit-fields).

More comments in the two messages.  I also intend to try and relax
some other checks now that we have MEM_REF but I'd like to do that
incrementally (if possible at all).

I have bootstrapped and tested both patches on x86_64-linux without
any problems.  I hope you'll find this approach more-or-less
acceptable because it really took me frustratingly long to get here.

Thanks,

Martin

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-05-18 14:36 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-08 17:16 [PATCH 0/2] Fix PR 44972 Martin Jambor
2010-09-08 17:16 ` [PATCH 1/2] Remove the IPA-SRA call to build_ref_for_offset Martin Jambor
2010-09-09  9:01   ` Richard Guenther
2010-09-11  2:09   ` H.J. Lu
2010-12-06 18:56     ` H.J. Lu
2011-01-13 23:59       ` H.J. Lu
2010-09-08 17:19 ` [PATCH 2/2] Reimplementation of build_ref_for_offset Martin Jambor
2010-09-09  9:31   ` Richard Guenther
2010-09-09 22:44     ` Martin Jambor
2010-10-23 19:33   ` H.J. Lu
2011-05-18 15:58     ` H.J. Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).