Re: compilers using MMX instructions in the generated code

Andrew Richards <andrew@bhjz.demon.co.uk>
4 Feb 2000 02:57:30 -0500

          From comp.compilers

Related articles
[7 earlier articles]
Re: compilers using MMX instructions in the generated code mlross@jf.intel.com (2000-01-12)
Re: compilers using MMX instructions in the generated code andi@complang.tuwien.ac.at (2000-01-15)
Re: compilers using MMX instructions in the generated code bcombee@metrowerks.com (2000-01-19)
Re: compilers using MMX instructions in the generated code lindahl@pbm.com (2000-01-19)
Re: compilers using MMX instructions in the generated code a.richards@computer.org (Andrew Richards) (2000-01-23)
Re: compilers using MMX instructions in the generated code pica67@my-deja.com (Carsten Pitz) (2000-01-25)
Re: compilers using MMX instructions in the generated code andrew@bhjz.demon.co.uk (Andrew Richards) (2000-02-04)
| List of all articles for this month |

From: Andrew Richards <andrew@bhjz.demon.co.uk>
Newsgroups: comp.compilers
Date: 4 Feb 2000 02:57:30 -0500
Organization: Compilers Central
References: 00-01-011 00-01-098 00-01-104
Keywords: code, optimize

Vector C (as it is currently called) has a powerful alias and alignment
analyser, but even that is often not enough, so you can enable some guessing
and also use the 'restrict' keyword with pointers. The 'restrict' keyword
means that a pointer is not aliased within the function in which it is used
You may also have to specify the alignment of a pointer because alignment is
extremely important on Intel processors especially with vectorization. If
the alignment is wrong, then the compiled code can be up to twice as slow!


The results with Vector C are very good in typically vectorizable situations
like blending images and projecting vectors. 2-3 times speed improvements on
normal C code are not uncommon for these types of routines. However, most
routines do not benefit from vectorization, so it is only worth compiling
with Vector C if you are writing code that deals with RGB images or 3D
vectors.


Andrew Richards




Carsten Pitz wrote:


> Well, the problem is well solved for FORTRAN. The FORTRAN compilers
> for the Fujitsu VPP machines verctorize quite well. The FORTRAN
> compilers for the Cray PVPs are not that league, but still acceptable.
>
> But with C it is quite another story. No simple DO statements,
> aliasing problems, etc. So I am very interested in how well your
> compiler will do the job.
>
> Carsten
> [Well, gee, all the optimization problems are solved for Fortran, since
> Fortran is carefully designed so that you're not allowed depend on stuff
> that might get optimized away. -John]





Post a followup to this message

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