Hmmm... Seems like any kind of overloading resolution should be done by clang.
there can be lots of issues regarding implicit conversions and other c++ things. On 07/16/2012 01:19 PM, Hatanaka, Akira wrote: > Yes, it should be possible for the backend to select the appropriate one. > > I just wasn't sure whether clang would check whether the last argument is an > immediate or variable. > > ________________________________________ > From: si...@atanasyan.com [si...@atanasyan.com] on behalf of Simon Atanasyan > [satanas...@mips.com] > Sent: Monday, July 16, 2012 12:32 PM > To: Hatanaka, Akira; Benjamin Kramer > Cc: cfe-commits@cs.uiuc.edu > Subject: Re: [cfe-commits] r160308 - in /cfe/trunk: lib/CodeGen/CGBuiltin.cpp > lib/CodeGen/CodeGenFunction.h test/CodeGen/builtins-mips-ovld.c > > On Mon, Jul 16, 2012 at 11:01 PM, Benjamin Kramer<benny....@gmail.com> wrote: >> On 16.07.2012, at 20:52, Simon Atanasyan<satanas...@mips.com> wrote: >>> Author: atanasyan >>> Date: Mon Jul 16 13:52:02 2012 >>> New Revision: 160308 >>> >>> URL: http://llvm.org/viewvc/llvm-project?rev=160308&view=rev >>> Log: >>> MIPS: Implement __builtin_mips_shll_qb builtin function overloading. >>> This function has two versions. The first one is used for a register >>> operand. >>> The second one is used for an immediate number. >> Would it make sense to do this as an optimization in the backend instead? >> The IR optimizers can infer constants in a lot more cases, I assume the >> constant version of the builtin only differs in performance/code size? > Akira, is it possible to select an appropriate builtin in the MIPS > backend? In other words is it acceptable if the frontend emits a > single builtin nevertheless the function's arguments and the backend > is responsible for selecting and appropriate intrinsics? > > BTW Benjamin, if I send a patch for review and do not get any > objections, is it okay to commit this patch in a week? Should I > continue to ping until I get any reply? > > -- > Simon > > _______________________________________________ > cfe-commits mailing list > cfe-commits@cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits _______________________________________________ cfe-commits mailing list cfe-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits