On Mon, Nov 01, 2010 at 04:52:28PM +0200, roy rosen wrote: > Hi All, > > Is it possible to define UNITS_PER_SIMD_WORD as a global variable and > to set this varibale using a pragma (even once for a compilation) and > that way to be able to compile one file with UNITS_PER_SIMD_WORD = 8 > and another file with UNITS_PER_SIMD_WORD = 16?
The general way to do this would be to have an appropriate -m option to control this. Typically it is based on the instructions available to the back end. If you have an -m option, you could presumably define target attributes or pragmas to change this for particular functions. At the moment, the i386 port is the only one to support target attributes/pragmas, though I have just submitted patches for the rs6000 port to add them there, so you can see what types of changes are needed (note, I need to do another patch after the first is approved for builtin functions). -- Michael Meissner, IBM 5 Technology Place Drive, M/S 2757, Westford, MA 01886-3141, USA meiss...@linux.vnet.ibm.com