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: [patch 1/2] PR27313 Discover non-trapping memory accesses


On 4/16/07, Richard Henderson <rth@redhat.com> wrote:
On Sat, Apr 14, 2007 at 09:31:56PM +0200, Richard Guenther wrote:
> the load to v_1 can only be dead code if the BB is dead as the load
> may trap.  Still I might be wrong ;)

Nope, that's not how things work.  The trapping side effect doesn't
prevent dead code elimination.

So you say that with


void foo (int *p)
{
 int q = *p;
}

we are allowed to remove the load from *p even if it may trap?  This is not
how I believe things are working.

Confused,
Richard.


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