This is the mail archive of the gcc@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: gimple weirdness for Java


Diego Novillo writes:
 > On Wed, 2004-06-09 at 10:42, Andrew Haley wrote:
 > 
 > > Look at the definition of #1#4 below.  The "*.LJpc=11" seems to branch
 > > around the assignment of #1#4.  All the calculation at the end of the
 > > function seems irrelevant, because it returns the value of #1#4.
 > > 
 > I don't see anything particularly odd with the function, if #1#3 is not
 > NULL we execute all the vtable lookup code, otherwise we set #1#4 to 0
 > and return it.
 > 
 > > Also, I'm a bit confused, in that #1#5 seems to be assigned twice:
 > > this is the gimple dump.  But this is SSA, no?
 > > 
 > Not yet.  Anything you see before .t18.ssa and after .t50.tailc is in
 > normal form, not SSA.  You can tell the thing is in SSA form when you
 > see '#1#4_9' (PHI nodes are also a good indicator ;).

Well, yes.  I wondered why they weren't there...  :-)

 > > Maybe there's something wrong with the dump?  Or is this totally
 > > bogus?
 > > 
 > Sorry, nothing jumps out.  Are we miscompiling this code?  What does the
 > original look like?

I've had a bug report, but I'm having trouble duplicating the exact
problems.  

Look at the .ssa dump below.  #1#4_8 is undefined, isn't it?

Andrew.


;; Function BugJune3.seeIfItsTrue() (_ZN8BugJune312seeIfItsTrueEv)

BugJune3.seeIfItsTrue() (<D434>)
{
  promoted_boolean #1#5;
  struct BugJune3 * <D442>;
  int #1#4;
  struct BugJune3$LittleThing * #1#3;
  struct BugJune3 * <D439>;
  boolean T.13;
  BugJune3$LittleThing:: * T.12;
  void * T.11;
  void * * T.10;
  struct 
  {
    struct java.lang.Class * class;
    void * methods[2];
  } * T.9;
  struct java.lang.Object * T.8;
  struct BugJune3$LittleThing * T.7;
  struct BugJune3$LittleThing * T.6;

<bb 0>:
  <D439>_3 = <D434>_2;
  T.6_4 = <D439>_3->littleThing;
  #1#3_5 = T.6_4;
  if (#1#3_5 != 0B) goto *.LJpc=11; else goto <L0>;

<L0>:;
  #1#4_18 = 0;
  goto <bb 3> (*.LJpc=18);

*.LJpc=11:;
  <D442>_7 = <D434>_2;
  #1#5_9 = #1#4_8;
  T.7_10 = <D442>_7->littleThing;
  T.8_11 = (struct java.lang.Object *)T.7_10;
  T.9_12 = T.8_11->vtable;
  T.10_13 = T.9_12 + 56B;
  T.11_14 = *T.10_13;
  T.12_15 = (BugJune3$LittleThing:: *)T.11_14;
  T.13_16 = T.12_15 (T.7_10);
  #1#5_17 = (promoted_boolean)T.13_16;

  # #1#4_1 = PHI <#1#4_8(2), #1#4_18(1)>;
*.LJpc=18:;
  return #1#4_1;

}


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