[Libclc-dev] [PATCH 1/1] configure: drop -fno-builtin

Jan Vesely via Libclc-dev libclc-dev at lists.llvm.org
Fri Jun 24 15:12:59 PDT 2016


On Fri, 2016-06-24 at 14:14 -0700, Matt Arsenault wrote:
> > 
> > On Jun 24, 2016, at 12:15, Jan Vesely via Libclc-dev <libclc-dev at li
> > sts.llvm.org> wrote:
> > 
> > We are using builtins.
> > Some builtins (copysign, fmax, fmin, ...) are translated to lirbary
> > calls.
> > Using -fno-builtin makes those calls tagged nobuiltin and starting
> > with 273039,
> > they are no longer translated to llvm opcodes, resulting in failed
> > function call;
> > "<unknown>:0:0: in function test_1_copysign_float void (float
> > addrspace(1)*, float addrspace(1)*, float addrspace(1)*):
> > unsupported call to function copysignf"
> > Fixes: r273039
> > 
> > Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
> > ---
> > The alternative is to keep -fno-builtin and avoid using some
> > __builtins.
> > 
> > configure.py | 1 -
> > 1 file changed, 1 deletion(-)
> > 
> > diff --git a/configure.py b/configure.py
> > index b96faee..d3a3977 100755
> > --- a/configure.py
> > +++ b/configure.py
> > @@ -181,7 +181,6 @@ for target in targets:
> >   for device in available_targets[target]['devices']:
> >     # The rule for building a .bc file for the specified
> > architecture using clang.
> >     clang_bc_flags = "-target %s -I`dirname $in` %s " \
> > -                     "-fno-builtin " \
> >                      "-D__CLC_INTERNAL " \
> >                      "-emit-llvm" % (target, clang_cl_includes)
> >     if device['gpu'] != '':
> > -- 
> > 2.7.4
> > 
> > _______________________________________________
> > Libclc-dev mailing list
> > Libclc-dev at lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/libclc-dev
> 
> I think we should continue using it, but fix the builtins we expect
> to really be emitting intrinsics: http://reviews.llvm.org/D5896
> <http://reviews.llvm.org/D5896>

yeah, that works better. thanks for pointing me to the revision.

although mixing no-builtin and __builtin still looks weird.
self-NAK

Jan

> 
> -Matt
-- 

Jan Vesely <jan.vesely at rutgers.edu>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.llvm.org/pipermail/libclc-dev/attachments/20160624/e1d02c1e/attachment.sig>


More information about the Libclc-dev mailing list