[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc
Subject:    Re: Compiler loop optimizations
From:       Ian Lance Taylor <iant () google ! com>
Date:       2006-12-29 20:36:35
Message-ID: m3d562wib0.fsf () localhost ! localdomain
[Download RAW message or body]

Christian Sturn <linuxkaffee@gmx.net> writes:

> On Fri, 29 Dec 2006 15:03:51 -0500
> Robert Dewar <dewar@adacore.com> wrote:
> 
> > > There is no support for dumping actual valid source code, though,
> > > and it is unlikely that there ever will be.
> > 
> > And indeed it is not in general possible, there are many optimizations
> > that cannot be expressed in valid C.
> 
> Why not? Could you provide an example.

For example, using the vector instructions available with SSE on i386.

> Cannot every assembly program (each optimized C program can
> be dumped as assembly code with -S) be transformed into an equivalent
> C program?

Only if you permit calling arbitrary functions to implement the
machine instructions which can not be represented in simple C code.

In the very general case, sure, you could unroll those machine
instructions back to arbitrarily complex C code, but that would be a
tedious and ultimately pointless effort.

Ian
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic