[cfe-commits] r47850 - /cfe/trunk/Headers/mmintrin.h

Devang Patel dpatel at apple.com
Mon Mar 3 17:10:39 PST 2008


On Mar 3, 2008, at 4:43 PM, Eli Friedman wrote:

> On Mon, Mar 3, 2008 at 4:11 PM, Mike Stump <mrs at apple.com> wrote:
>> On Mar 3, 2008, at 11:29 AM, Anders Carlsson wrote:
>>> +inline void _mm_empty()
>>> +{
>>> +    __builtin_ia32_emms();
>>> +}
>>
>> Do we have an always_inline attr yet?  :-)

Mike, we welcome patches :).

>>  Also, a nodebug style
>> attribute is useful to avoid having a debugger show us that we are in
>> this file...

[ I won't be surprised if clang/llvm user will be able to take  
advantage of such facility before other compiler users ;)  ]

>>
>
> A nodebug-style attribute might be useful once clang actually starts
> supporting emitting debug info; why does always_inline matter, though?
>
> always_inline would probably need to be implemented in an
> end-of-translation-unit hook, and I don't think one exists at the
> moment.  Besides that, though, there's nothing especially difficult
> about it: all that would need to happen is that CodeGen would need to
> loop over all the always_inline functions and inline the callsites.

Yes, however things become interesting when optimizer (responsible for  
doing inlining) is not invoked based on command line options seen by  
driver.

> Actually, I just realized an issue with the current implementation:
> shouldn't the functions in mmintrin.h actually be static inline?  We
> don't ever want to depend on an external definition.

Yes.

-
Devang



More information about the cfe-commits mailing list