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]

Re: Patch to block removal optimization



  3) We don't try to remove blocks in final if we've done insn
     scheduling, since that moves block notes around arbitrarily;
     otherwise, we end up throwing away information for code that wasn't
     deleted at all.  Perhaps we should fix the scheduler so that block 
     notes are preserved better...

I'm a little bit confused by this bit.  On the one hand, it's
depressing, since -O2 -g is precisely the case that benefited most
from this: that's when we get all kinds of massive inlining, and lots
of code disappears, and we end up with lots of empty blocks.

In addition, I don't understand what good it does to have block
information output if the blocks are empty -- even if its the
scheduler's fault for making them so.  In other words, if, in the end,
we have:

  NOTE_INSN_BLOCK_BEG
  NOTE_INSN_BLOCK_END

what good does it do to output block data for that?  There are no
points in the debugger when you can print the value of the local
variables in there anyhow -- you're never in their scope.

What am I missing?

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com

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