User account creation filtered due to spam.

Bug 34705 - Reuse I/O structures to save memory and help the ME
Summary: Reuse I/O structures to save memory and help the ME
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.3.0
: P3 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
Keywords: missed-optimization
Depends on:
Blocks: 25829
  Show dependency treegraph
Reported: 2008-01-07 17:17 UTC by Tobias Burnus
Modified: 2008-02-17 05:02 UTC (History)
4 users (show)

See Also:
Known to work:
Known to fail:
Last reconfirmed: 2008-01-07 19:59:16


Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Burnus 2008-01-07 17:17:31 UTC
Based on PR 34683.

Richard writes there (text below slightly edited by me):

So, to sum up, the situation could be significantly improved by improving
the FE.  Like I noticed for I/O statements, where I provided a patch -
that was not accepted - to share temporary variables created for the I/O
context. Which is this one:

basically it mentiones async I/O as a reason to not do it, but instead the
callee can copy the I/O structure in that case instead (it probably needs
to anyway, as currently those structures live on the stack, so with async
I/O you'd need otherwise to guarantee that the I/O finished before the
current frame is left).

So, currently you can build up arbitrary large chains of virtual clobbers with WRITE statements; as each of those writes create two un-partitionable SFTs.  For arrays temporaries this is the same. Actually it isn't that bad for I/O as long as there are no pointers to the dt_parm structs in the IL (function arguments are ok).
Comment 1 Thomas Koenig 2008-01-07 19:59:16 UTC