multiple compound blocks in C (M.V.S. Ramanath)
Thu, 9 Dec 1993 17:51:31 GMT

          From comp.compilers

Related articles
multiple compound blocks in C (1993-12-09)
| List of all articles for this month |

Newsgroups: comp.compilers
From: (M.V.S. Ramanath)
Summary: do current C compilers like compound blocks ?
Keywords: C, optimize, question
Organization: imagen
Date: Thu, 9 Dec 1993 17:51:31 GMT

For the current batch of C compilers, I'm curious as to whether faster
code is generated if variables local to a code fragment are declared
locally within a compound block. In other words, is it better to structure
a function body thus:

f( ... )
        { <local definitions> <code block> }
{ <local definitions> <code block> }

Or is the live variable analysis and register allocation good enough that
it makes no difference as far as speed of the generated code is concerned
? Stack frame size is not my concern, only speed.

I'm not interested in speculation; I'd like to hear from people who have
specifically looked at currently available compiler output on RISC
processors, especially, the DEC Alpha, HP-PA-RISC, and SPARC.

Ram (

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.