This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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: Named Pipe unformatted I/O (PR30162)


Jerry DeLisle wrote:
Hi all,

In looking at the -fdump-tree-original for the test cases we have and the use of allocated example given by Thomas in this thread, you will see that the frontend currently generates appropriate calls to the various existing transfer functions as needed.

If we modify this to call, for example, transfer_integer_init instead of transfer_integer, we can use the existing front-end fairly intact to generate calls to new init functions that will build the output list as a linked list with all the size information needed (or computable such as with array descriptors) and the related data ready for transfer.

Embedded function calls use temporaries to hold the results. We will have to move the location of memory free calls related to those until after the transfer is complete.

After the complete output list is created, inside st_write_done, we modify finalize_transfer to traverse the linked list and call the existing transfer functions in order, with all the pertinent data ready to go.

This seems very doable. I think performance will hold OK and we may even spot some optimizations that we could do.

Jerry

BTW, I am presenting my thoughts as I go here. This is conceptual design phase so I am not locked into any particular approach yet. Just getting ideas and issues captured.

Jerry


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