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: Non-call exceptions versus cse


Hi,

On Wed, 20 Nov 2002, Andrew Haley wrote:

>     output1 = ({ type t1; t1 = may_trap (i1); t1; });
>
> However, cse removes t1,

Hmm, this seems indeed wrong.

> which is how this disussion started.  There's
> a hole in my bucket...

> Well, they aren't so prevented.  The two patches I submitted are cases
> where the compiler does this combination.
>
> BTW, this is the RTL in question before CSE:

bb0:
  p63 <= 0
  p65 <= [p63 + 4] ; can_trap to bb ??
bb1:
  p61 <= p65

> And after CSE:

bb0:
  p61 <= [4] ; can_trap to bb ??
bb1:

Ok, without more context this looks clearly wrong.  Before CSE p61 will
definitely not be set when bb0 is left with an exception, but after CSE
p61 will be set (or at least clobbered) in every case.  Can you provide
more context (esp. the initial =0 assignment to nn, the catch block, and
the block after the try/catch (the one using nn)?)


Ciao,
Michael.


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