[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [f-cpu] Winograd DCT on my seul.org account

On Sat, Apr 20, 2002 at 04:55:07AM +0200, cedric wrote:
> > > it cause the problem of gcc to (re)raise. optimisations for FC0 are very
> > > different from usual optimisations, even for RISC processors. I don't
> > > know the real structure of gcc, but I guess it'll be very difficult to
> > > put FC0 tricks without breaking the portability, no ? I even wonder if
> > > rewriting a new compiler won't be much easier than trying to add such
> > > things in gcc, if we want the compiler to be good. we don't want to see
> > > the F-Cpu ends like the PIV, used at less than 30%, right ?
> >
> > I guess that writing a new C compiler will indeed be easier than
> > hacking gcc.
> Euh, well,... I didn't agry with you, writing a C compiler is very hard (It 
> actually didn't exist any bison grammar for C). And a lot of thing in the 
> C/C++ norme are not clear specified (It's explain the problem with the 3.0.x 
> version of gcc). So when you want to write your own C compiler, you must test 
> it with a lot of different software and... have a lot of problem.
    Writing a decent C/C++ compiler is a horribly big project. Take a
look at the different between the output of LCC and GCC on the same
input code, and you'll see a huge difference between what a compiler
that doesn't spend a few tens of KLOCs on optimizing can do and one that
does can do. :)

> And I recently read the gcc documentation about how to write a backend to gcc 
> and it's not easy, but we can have some possibility and we could have some 
> good performance. The only problem is with SIMD and perhaps some optimisation 
> with our cray like load/store.
    Not much of an issue since I already wrote a GCC backend for F-CPU
ages ago.

> 	I thing that nicolas that says to me that for the 3.1 release they will have 
> some SIMD optimisation. With our clean ASM, it will certainly be possible to 
> use it.
    This is really a more sensible idea than going and writing an
overall worse compiler than GCC just for a few SIMD optimizations.

> 	Last point, if we write one backend, we can have all the gcc frontend 
> working on our CPU, and that much more interesting.
> 	That's only my point of view, and for me coding a C/C++ compiler will 
> be a nightmare... 
    C/C++ are a nightmare to write fast compilers for in general.
Memory aliasing and side-effects fuck up just about every optimization
you can think of unless you do some pretty heavy and complex analyses

> A+
>   Cedric


To unsubscribe, send an e-mail to majordomo@seul.org with
unsubscribe f-cpu       in the body. http://f-cpu.seul.org/