[llvm-commits] [llvm] r106227 - /llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp

Jim Grosbach grosbach at apple.com
Thu Jun 17 11:38:53 PDT 2010


On Jun 17, 2010, at 11:24 AM, Dale Johannesen wrote:

> 
> On Jun 17, 2010, at 10:50 AM, Jim Grosbach wrote:
> 
>> Add entries for Expanding atomic intrinsics to libcalls. Just a placeholder
>> for the moment. The implementation of the libcall will follow.
>> 
>> Currently, the llvm-gcc knows when the intrinsics can be correctly handled by
>> the back end and only generates them in those cases, issuing libcalls directly
>> otherwise. That's too much coupling. The intrinsics should always be
>> generated and the back end decide how to handle them, be it with a libcall,
>> inline code, or whatever. This patch is a step in that direction.
> 
> I think this is overstated.  Which intrinsics are valid is dependent on dialect; for example, there are many library functions in C99 that are not in C89.  It is appropriate for FEs to determine which calls the BEs are allowed to treat specially according to language rules, and generate intrinsics only for these.  The actual special treatment, if any, I agree should be up to the BEs.
> 

In that paragraph "the intrinsics" should be read as "the atomic intrinsics." You're absolutely correct that there are other sorts where the FE should be making decisions about whether to use them.



More information about the llvm-commits mailing list