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: [tree-ssa] patch suggestion: def_op vs vdef_ops


On Wed, 29 Jan 2003, Jose Renau wrote:

> On Wed, 29 Jan 2003, Diego Novillo wrote:
> 
> > On Wed, 29 Jan 2003, Jose Renau wrote:
> > 
> > proceed to put it in virtual operands everywhere. That's why we're not
> > detecting the dead store.
> > 
> > I'll work on a fix.
> 
>  This is a simple example, where DCE does not eliminate any statement (not 
> even the last one)
> 
> void function(int *a)
> {
>         *a=3;
>         *a=4;
>         a++;
> }
> 
This one is slightly different.  Right now we don't collect good
information about arguments and globals.  DCE just notices a
store to global memory and refuses to do anything to it.

The real solution to this is along the lines of adding VUSE
references for globals and arguments at the exit points of the
function.

Change that argument into a local variable and you'll see DCE
killing the whole function.


Diego.


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