On Wed, Aug 17, 2011 at 4:59 PM, Hans-Peter Nilsson <h...@bitrange.com> wrote:
> On Tue, 16 Aug 2011, Sriraman Tallam wrote:
>
> (I don't see anyone else making this comment, so maybe I missed
> something obvious, but I don't think so...)
>
>> Support for getting CPU type and feature information at run-time.
>>
>> The following patch provides support for finding the platform type at 
>> run-time, like cpu type and features supported. The multi-versioning 
>> framework will use the builtins added to dispatch the right function 
>> version. Please refer to http://gcc.gnu.org/ml/gcc/2011-08/msg00298.html for 
>> details on function multi-versioning usability.
>>
>>       * tree-pass.h (pass_tree_fold_builtin_target): New pass.
>>       * builtins.def (BUILT_IN_TARGET_SUPPORTS_CMOV): New builtin.
>>       (BUILT_IN_TARGET_SUPPORTS_MMX): New builtin.
>>       (BUILT_IN_TARGET_SUPPORTS_POPCOUNT): New builtin.
>>       (BUILT_IN_TARGET_SUPPORTS_SSE): New builtin.
>>       (BUILT_IN_TARGET_SUPPORTS_SSE2): New builtin.
>>       (BUILT_IN_TARGET_SUPPORTS_SSE3): New builtin.
>>       (BUILT_IN_TARGET_SUPPORTS_SSSE3): New builtin.
>>       (BUILT_IN_TARGET_SUPPORTS_SSE4_1): New builtin.
>>       (BUILT_IN_TARGET_SUPPORTS_SSE4_2): New builtin.
>>       (BUILT_IN_TARGET_IS_AMD): New builtin.
>>       (BUILT_IN_TARGET_IS_INTEL): New builtin.
>>       (BUILT_IN_TARGET_IS_COREI7_NEHALEM): New builtin.
>>       (BUILT_IN_TARGET_IS_COREI7_WESTMERE): New builtin.
>>       (BUILT_IN_TARGET_IS_COREI7_SANDYBRIDGE): New builtin.
>>       (BUILT_IN_TARGET_IS_AMDFAM10_BARCELONA): New builtin.
>>       (BUILT_IN_TARGET_IS_AMDFAM10_SHANGHAI): New builtin.
>>       (BUILT_IN_TARGET_IS_AMDFAM10_ISTANBUL): New builtin.
> (cut)
>
> Keep the port-specific bits in the port, please. I don't see why
> this has to be in generic files as opposed to target hooks and
> included target-specific file fragments like everything else
> (well, most everything) in gcc.  If not, I think we'll see
> cpu_ports*variants explosion here until these bits are
> rewritten...

Yes, this should move into the port. Sorry, I will change it.

Thanks,
-Sri.

>
> brgds, H-P
>
>

Reply via email to