Dead code elimination of dead structure assignments in gcc

law@redhat.com law@redhat.com
Wed Jan 23 08:33:00 GMT 2002


In message <3C4E0FA3.F82706B7@cup.hp.com>, Reva Cuthbertson writes:
 > Hello,
 > 
 >     I'm looking at how well gcc does with dead code elimination on IA-64
 > and I'm seeing some problems with structures.  In particular, I have the
scalars will be put into pseudo registers because there is no potential
alias issues except when their address is taken.  Dead code elimination on
pseudo registers is easy and effective.

Structures on the other hand are much more difficult to deal with due to
the aliasing issues.  While we do have some code to detect dead stores to
memory, it's not always as effective as we would like.

>From a brief look at your example, I would expect flow to delete your
dead stores -- I don't know why it isn't working.  Effectively what it
needs to do is pretend there is a store to each stack slot at the end
of the function, which should make each of the stores dead.

jeff



More information about the Gcc mailing list