------- Comment #3 from jakub at gcc dot gnu dot org  2009-04-01 14:00 -------
Even for live range analysis of the vars that must go into stack the block info
needs to be used, otherwise once address of a stack var escapes, you'd have to
assume it is live almost till the end of the function (at least live on any
function calls that might see it through global state, or global ptr
dereferences etc.).  Using the block info, you can find out that:
  {
    char buf[10];
    foo (buf);
    bar ();
  }
  baz ();
in baz () call the buf var doesn't need to be live anymore.  At least short
term I think it would be best just to walk the function to be expanded, look at
all gimple_block BLOCKs referenced and note which originally non-overlapping
BLOCKs are indeed still non-overlapping after the tree passes and don't
consider originally non-overlapping BLOCKs during stack slot sharing decisions
if they are overlapping.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39604

Reply via email to