Update to use -mveclibabi=mass instead of -mmass

From-SVN: r163471
This commit is contained in:
Michael Meissner 2010-08-23 16:47:01 +00:00 committed by Michael Meissner
parent 8bcc030417
commit b36cf9d28f
5 changed files with 37 additions and 20 deletions

View File

@ -1,15 +1,18 @@
2010-08-23 Michael Meissner <meissner@linux.vnet.ibm.com>
* config/rs6000/rs6000.opt (-mmass): New option to enable the
compiler to autovectorize mathmetical functions for power7 using
the Mathematical Acceleration Subsystem library.
* config/rs6000/rs6000.opt (-mveclibabi=mass): New option to
enable the compiler to autovectorize mathmetical functions for
power7 using the Mathematical Acceleration Subsystem library.
* config/rs6000/rs6000.c (rs6000_builtin_vectorized_libmass): New
function to handle auto vectorizing math functions that are in the
MASS library.
* config/rs6000/rs6000.c (rs6000_veclib_handler): New variable to
handle which vector math library we have.
(rs6000_override_options): Add -mveclibabi=mass support.
(rs6000_builtin_vectorized_libmass): New function to handle auto
vectorizing math functions that are in the MASS library.
(rs6000_builtin_vectorized_function): Call it.
* doc/invoke.texi (RS/6000 and PowerPC Options): Document -mmass.
* doc/invoke.texi (RS/6000 and PowerPC Options): Document
-mveclibabi=mass.
2010-08-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>

View File

@ -949,6 +949,9 @@ static const enum rs6000_btc builtin_classify[(int)RS6000_BUILTIN_COUNT] =
#undef RS6000_BUILTIN
#undef RS6000_BUILTIN_EQUATE
/* Support for -mveclibabi=<xxx> to control which vector library to use. */
static tree (*rs6000_veclib_handler) (tree, tree, tree);
static bool rs6000_function_ok_for_sibcall (tree, tree);
static const char *rs6000_invalid_within_doloop (const_rtx);
@ -2772,6 +2775,15 @@ rs6000_override_options (const char *default_cpu)
rs6000_traceback_name);
}
if (rs6000_veclibabi_name)
{
if (strcmp (rs6000_veclibabi_name, "mass") == 0)
rs6000_veclib_handler = rs6000_builtin_vectorized_libmass;
else
error ("unknown vectorization library ABI type (%s) for "
"-mveclibabi= switch", rs6000_veclibabi_name);
}
if (!rs6000_explicit_options.long_double)
rs6000_long_double_type_size = RS6000_DEFAULT_LONG_DOUBLE_SIZE;
@ -3909,8 +3921,8 @@ rs6000_builtin_vectorized_function (tree fndecl, tree type_out,
}
/* Generate calls to libmass if appropriate. */
if (TARGET_MASS)
return rs6000_builtin_vectorized_libmass (fndecl, type_out, type_in);
if (rs6000_veclib_handler)
return rs6000_veclib_handler (fndecl, type_out, type_in);
return NULL_TREE;
}

View File

@ -115,9 +115,9 @@ mpopcntd
Target Report Mask(POPCNTD)
Use PowerPC V2.06 popcntd instruction
mmass
Target Report Var(TARGET_MASS) Init(0)
Use the Mathematical Acceleration Subsystem library high performance math libraries.
mveclibabi=
Target RejectNegative Joined Var(rs6000_veclibabi_name)
Vector library ABI to use
mvsx
Target Report Mask(VSX)

View File

@ -788,7 +788,7 @@ See RS/6000 and PowerPC Options.
-msdata=@var{opt} -mvxworks -G @var{num} -pthread @gol
-mrecip -mrecip=@var{opt} -mno-recip -mrecip-precision
-mno-recip-precision @gol
-mmass}
-mveclibabi=@var{type}}
@emph{RX Options}
@gccoptlist{-m64bit-doubles -m32bit-doubles -fpu -nofpu@gol
@ -15850,12 +15850,13 @@ precision square root estimate instructions are not generated by
default on low precision machines, since they do not provide an
estimate that converges after three steps.
@item -mmass
@itemx -mno-mass
@opindex mmass
Specifies to use IBM's Mathematical Acceleration Subsystem (MASS)
libraries for vectorizing intrinsics using external libraries. GCC
will currently emit calls to @code{acosd2}, @code{acosf4},
@item -mveclibabi=@var{type}
@opindex mveclibabi
Specifies the ABI type to use for vectorizing intrinsics using an
external library. The only type supported at present is @code{mass},
which specifies to use IBM's Mathematical Acceleration Subsystem
(MASS) libraries for vectorizing intrinsics using external libraries.
GCC will currently emit calls to @code{acosd2}, @code{acosf4},
@code{acoshd2}, @code{acoshf4}, @code{asind2}, @code{asinf4},
@code{asinhd2}, @code{asinhf4}, @code{atan2d2}, @code{atan2f4},
@code{atand2}, @code{atanf4}, @code{atanhd2}, @code{atanhf4},

View File

@ -1,6 +1,7 @@
2010-08-23 Michael Meissner <meissner@linux.vnet.ibm.com>
* gcc.target/powerpc/vsx-mass-1.c: New file, test -mmass.
* gcc.target/powerpc/vsx-mass-1.c: New file, test
-mveclibabi=mass.
2010-08-23 Janus Weil <janus@gcc.gnu.org>