AMD optimizing compilers

This topic is 3832 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

I am just wondering if anyone knows of any compiler that optimizes for amd. I know the intel optimizing compiler and that works great, also the default compiler in visual studio 2005 pro is really great as far as the optimizations go, but I haven't found any settings that specifically generate amd code. Just wondering if any of you guys have optimized for amd and what tools you found useful. thanks a lot in advance. I haven't done much research in this but i am doing so now and when I'm done I'll post any useful info here. What I know now is that 2005 visual studio removed the processor specific optimizations but has added 3dnow intrinsic support. What I'm looking for is something to compile c into those things like compiling with the /sse options. Also I'm sure optimizing instruction scheduling is a different beast on both systems but i dont know much about that. thanks tim

Share on other sites
gcc support processor specific optimizations with the -mcpu option, but I don't know if support is actually implemented for each type. You'd have to compare and see.

For example:
-mcpu=athlon-xp

Share on other sites
yup, I need to check out gcc. I haven't done so because I hear it isn't a very good optimizing compiler but I dont have much data to back that up. I'm wondering if 3d now is useless now with SSE. it still wouldn't be useless if SSE and 3dnow could execute in parallel, I dont know much about that. What do you guys think, do you think SSE rendered 3dnow mute??

thanks,
tim

Share on other sites
Generally, even optimizing compilers are not very good at utilizing SIMD instructions. They're just not smart enough at figuring out what you're trying to do. The compiler itself will unroll loops for you, pack data structures, things like that, but if you want to take advantage of SSE or 3dNow, you need to
(a) write assembly routines
(b) use a processor-specific library

AMD offers the ACML (AMD Core Math Library) with a lot of linear algebra and vectorization functions that can be very useful for game programming. I think it's free, and easier than rolling your own assembly. (although it's good to learn the basics so you know what's going on under the hood)

Intel has a similar library, but they charge for it.