search for: __builtin

Displaying 13 results from an estimated 13 matches for "__builtin".

Did you mean: __builtin_
2016 Jan 28
4
[RFC] Canonicalize libcalls to intrinsics
Hi, I would like to propose that when available, if a C builtin function has an equivalent llvm intrinsic, that the intrinsic be the preferred form. The equivalent clang __builtin should emit the intrinsic, and SimplifyLibCalls should replace calls with the intrinsic. For context, this came up on an old review thread: http://reviews.llvm.org/D5896 There are a few motivations for this: 1. Intrinsics have additional properties that help optimizations. They are more widel...
2010 Aug 30
0
[LLVMdev] llvmgcc-4.2 llvmg++-4.2 on OS X -- missing GCC __builtin intrinsics
...uncan. > I've had good luck using the llvm-gcc& llvm-g++ on small projects, > but I just discovered that it's apparently missing some of the GCC > intrinsic functions -- specifically, when I try and compile VXL > (http://vxl.sourceforge.net) it dies when it encounters > __builtin_bswap32 . > > This is on OS X with the llvm-gcc-4.2& llvm_g++-42 that are part of > the XCode 3.2.3 > > I don't know if this was the LLVM-GCC developer's oversight or Apple's > but it keeps me from using llvm-gcc as my default compiler. > ____________________...
2012 Apr 12
0
[LLVMdev] __builtin_malloc, __builtin support
Hi, Is "__builtin_malloc" function supported in LLVM...? I checked in "tools/clang/include/clang/Basic/Builtins.def", "tools/clang/lib/CodeGen/CGBuiltin.cpp" and couldn't find the implementation. Could anyone please comment about it. Thanks in advance, Viswa -------------- next part --...
2010 Aug 30
2
[LLVMdev] llvmgcc-4.2 llvmg++-4.2 on OS X -- missing GCC __builtin intrinsics
I've had good luck using the llvm-gcc & llvm-g++ on small projects, but I just discovered that it's apparently missing some of the GCC intrinsic functions -- specifically, when I try and compile VXL (http://vxl.sourceforge.net) it dies when it encounters __builtin_bswap32 . This is on OS X with the llvm-gcc-4.2 & llvm_g++-42 that are part of the XCode 3.2.3 I don't know if this was the LLVM-GCC developer's oversight or Apple's but it keeps me from using llvm-gcc as my default compiler.
2009 Dec 29
1
[LLVMdev] problem compiling x86 intrinsic function
Thanks for your advice. I am not sure that I understood your comment "If you need something, there should be a __builtin that corresponds to the intrinsic." Is that a better way to define an intrinsic function in C? How do you do it? I am actually trying to add several intrinsic functions for my target machine so I am looking for a simple and workable way of doing it. Thanks again. -- Fima ----- Original M...
2009 Dec 29
0
[LLVMdev] problem compiling x86 intrinsic function
...sic has the wrong attributes or type. In this case, you have both problems. Depending directly on llvm intrinsics is also a dangerous thing to do because they are allowed to change over time. I don't think we want the compiler exposing them directly. If you need something, there should be a __builtin that corresponds to the intrinsic. -Chris
2009 Dec 29
2
[LLVMdev] problem compiling x86 intrinsic function
I am trying to compile this little C-program: ================= typedef double v2f64 __attribute__((ext_vector_type(2))); int sse2_cmp_sd(v2f64, v2f64, char ) asm("llvm.x86.sse2.cmp.sd"); int main() { static int i; static float x[10]; static float y[10]; v2f64 m1; v2f64 m2; int j; i = sse2_cmp_sd(m1,m2,'z'); ========================== I expected to
2015 Sep 14
2
Rewriting LLVM IR intrinsic functions
...ot understand this builtin is simple: There is no way of (directly) expressing this in C, without extensions. You could potentially expand this in IR to a signed addition and a check that the sign bit had not changed, but it would be cleaner to simply modify the C backend to emit the Clang / GCC __builtin function that corresponds to the intrinsic. You’re likely to find a number of other intrinsics that are not supported: the reason that the C backend was removed was that it never worked very well. For example, anything involving exceptions can’t be implemented in C, so the C backend lowers it to...
2011 Apr 27
1
[LLVMdev] built-in longjmp and setjmp
Okay. Are you saying that you shouldn't use __builtin functions in general in your program or just __builtin_setjmp/longjmp? Also, are there any warnings issued by either clang or llvm if they are used in your program? On Wed, Apr 27, 2011 at 3:55 PM, Jim Grosbach <grosbach at apple.com> wrote: > The builtins are for internal compiler use i...
2015 Sep 10
2
Rewriting LLVM IR intrinsic functions
On 10 Sep 2015, at 10:09, serge guelton via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > On Thu, Sep 10, 2015 at 04:20:01PM +0800, Dipanjan Das via llvm-dev wrote: >> Hello, >> >> I can see the occurrences of several LLVM intrinsic functions in the LLVM >> IR generated by llvm-dis disassembler. Is there any means to rewrite these >> functions
2011 Apr 27
0
[LLVMdev] built-in longjmp and setjmp
...nderstand builtin functions do not have to behave exactly the same way as standard library functions. What I wanted to know is what should the code generated by llvm (clang + llc) look like (I am working on the Mips back-end now). I guess there should be a behavior users expect to see who are using __builtin_setjmp/longjmp even they aren't the same as library functions. If the code generated by arm-darwin is acceptable, does it mean that you can freely move code that accesses a global variable above the call to setjmp? > > On Wed, Apr 27, 2011 at 2:03 PM, Jim Grosbach <grosbach at apple.c...
2020 Oct 17
0
[PATCH nbdkit] common/include/tvdiff.h: Add formal specification.
...act_timeval. These may be proved using Frama-C. The existing functions ignored overflow, but it is possible to call the functions with parameters that will cause overflow. So to create a formal specification I had to modify the functions to signal overflow. Luckily GCC and Clang have convenient __builtin*s which make this easy, but Frama-C did not know about the builtins so I had to add axioms for them. This required modifying the callers in nbdkit-rate-filter and nbdkit-stats-filter for the new signature. Neither existing call site cared about overflow so we ignore it. A regular test is added a...
2011 Apr 27
3
[LLVMdev] built-in longjmp and setjmp
...nderstand builtin functions do not have to behave exactly the same way as standard library functions. What I wanted to know is what should the code generated by llvm (clang + llc) look like (I am working on the Mips back-end now). I guess there should be a behavior users expect to see who are using __builtin_setjmp/longjmp even they aren't the same as library functions. If the code generated by arm-darwin is acceptable, does it mean that you can freely move code that accesses a global variable above the call to setjmp? On Wed, Apr 27, 2011 at 2:03 PM, Jim Grosbach <grosbach at apple.com> wro...