This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GIMPLE Question
- From: Kyle Girard <kyle at kdmanalytics dot com>
- To: Dave Korn <dave dot korn dot cygwin at gmail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 25 Feb 2011 14:21:45 -0500
- Subject: Re: GIMPLE Question
- References: <1298647212.8393.37.camel@Tak> <4D67D762.4040206@gmail.com>
> That *is* the content of the bar method. What exactly do you expect to see
> happening when you assign a class with no members? There's nothing to do!
I was hoping to see the assignment. My example might have been a little
too simple. Here's a slightly more complex example:
foo.hh
class A
{
public:
void yay(){};
};
class foo
{
A a;
public:
void bar(A & aa);
void wik();
};
foo.cc
#include "foo.hh"
void foo::bar(A & aa)
{
a = aa;
}
void foo::wik()
{
a.yay();
}
foo.cc.004t.gimple
void foo::wik() (struct foo * const this)
{
struct A * D.1731;
D.1731 = &this->a;
A::yay (D.1731);
}
void A::yay() (struct A * const this)
{
GIMPLE_NOP
}
void foo::bar(A&) (struct foo * const this, struct A & aa)
{
GIMPLE_NOP
}
Looking at the gimple output there is no way to see that 'a' was
assigned in bar(). So that it can be used in wik(). Am I
misunderstanding something shouldn't there be a way to see the
assignment in bar? Do I have to parse the expression statement or are
things already optimized away and there is no way to get the information
that I seek.
Cheers,
Kyle