summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGBuiltin.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Make clang use Acquire loads and Release stores where necessary.Eli Friedman2011-09-131-5/+6
| | | | llvm-svn: 139643
* Remove trailing } in comment.Julien Lerouge2011-09-091-1/+1
| | | | llvm-svn: 139424
* Bring llvm.annotation* intrinsics support back to where it was in llvm-gcc: canJulien Lerouge2011-09-091-0/+11
| | | | | | | annotate global, local variables, struct fields, or arbitrary statements (using the __builtin_annotation), rdar://8037476. llvm-svn: 139423
* Switch clang over to using fence/atomicrmw/cmpxchg instead of the intrinsics ↵Eli Friedman2011-09-071-65/+40
| | | | | | | | | | (which will go away). LLVM CodeGen does almost exactly the same thing with these and the old intrinsics, so I'm reasonably confident this will not break anything. There are still a few issues which need to be resolved with code generation for atomic load and store, so I'm not converting the places which need those for now. I'm not entirely sure what to do about __builtin_llvm_memory_barrier: the fence instruction doesn't expose all the possibilities which can be expressed by __builtin_llvm_memory_barrier. I would appreciate hearing from anyone who is using this intrinsic. llvm-svn: 139216
* Fix a handful of dead stores found by Clang's static analyzer. There's a ↵Ted Kremenek2011-08-171-2/+2
| | | | | | bunch of others I haven't touched. llvm-svn: 137867
* Move handling of vget_lane/vset_lane before the code that checks the type.Bob Wilson2011-08-131-24/+31
| | | | | | | | | Unlike most of the other Neon intrinsics, these are not overloaded and do not have the extra argument that specifies the vector type. This has not been fatal because the lane number operand is supposed to be an ICE and so that value has harmlessly been used as the type identifier. Radar 9901281. llvm-svn: 137550
* Remove some unnecessary single element array temporaries.Jay Foad2011-07-291-2/+1
| | | | llvm-svn: 136461
* Shorten some expressions by using ArrayRef::slice().Frits van Bommel2011-07-251-6/+3
| | | | llvm-svn: 135910
* remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner2011-07-231-8/+8
| | | | | | | | LLVM.h imports them into the clang namespace. llvm-svn: 135852
* Migrate LLVM and Clang to use the new makeArrayRef(...) functions where ↵Frits van Bommel2011-07-181-8/+5
| | | | | | | | previously explicit non-default constructors were used. Mostly mechanical with some manual reformatting. llvm-svn: 135390
* de-constify llvm::Type, patch by David Blaikie!Chris Lattner2011-07-181-36/+36
| | | | llvm-svn: 135370
* Convert CallInst and InvokeInst APIs to use ArrayRef.Jay Foad2011-07-151-29/+33
| | | | llvm-svn: 135265
* Change intrinsic getter to take an ArrayRef, now that the underlying ↵Benjamin Kramer2011-07-141-97/+94
| | | | | | function in LLVM does. llvm-svn: 135155
* clang side to match the LLVM IR type system rewrite patch.Chris Lattner2011-07-091-36/+35
| | | | llvm-svn: 134831
* Introduce __builtin_expect() intrinsic support.Jakub Staszak2011-07-081-4/+10
| | | | llvm-svn: 134761
* Add codegen support for the fma/fmal/fmaf builtins.Cameron Zwarich2011-07-081-0/+16
| | | | llvm-svn: 134743
* Revert "Shorten some ARM builtin names by removing unnecessary "neon" prefix."Bob Wilson2011-06-241-197/+197
| | | | | | | | Sorry, this was a bad idea. Within clang these builtins are in a separate "ARM" namespace, but the actual builtin names should clearly distinguish tha they are target specific. llvm-svn: 133833
* Shorten some ARM builtin names by removing unnecessary "neon" prefix.Bob Wilson2011-06-241-197/+197
| | | | llvm-svn: 133826
* update for api change.Chris Lattner2011-06-181-2/+1
| | | | llvm-svn: 133365
* Update the prefetch intrinsic usage. Now the last argument tells codegenBruno Cardoso Lopes2011-06-141-1/+2
| | | | | | whether it's a data or instruction cache access. llvm-svn: 132977
* Eliminate temporary argument vectors.Benjamin Kramer2011-05-281-3/+2
| | | | llvm-svn: 132260
* Add support for ARM ldrexd/strexd builtinsBruno Cardoso Lopes2011-05-281-0/+35
| | | | llvm-svn: 132249
* Remove the 'unaligned load' builtins now that they're no longer used in the ↵Bill Wendling2011-05-131-13/+0
| | | | | | *mmintrin.h files. llvm-svn: 131300
* LLVM doesn't always optimize away the four loads from this:Bill Wendling2011-05-121-0/+2
| | | | | | | | | | (__m128){ p[0], p[1], p[2], p[3] } which produces really bad code. This could be done in instcombine, but it's probably better to do it in the front-end instead. <rdar://problem/9424836> llvm-svn: 131237
* Simplification noticed by Chris.Bill Wendling2011-05-041-3/+2
| | | | llvm-svn: 130864
* Convert the non-temporal store builtins to LLVM-native IR.Bill Wendling2011-05-041-0/+17
| | | | llvm-svn: 130830
* Generalize case for built-in expressions havingFariborz Jahanian2011-04-251-11/+4
| | | | | | | side-effect to generate their ir. Not just for __builtin_expect. // rdar://9330105 llvm-svn: 130172
* Ir-gen the side-effect(s) when __builtin_expect isFariborz Jahanian2011-04-251-0/+9
| | | | | | constant-folded. // rdar://9330105 llvm-svn: 130163
* fix a crash on code that uses the result value of __builtin___memcpy_chk.Chris Lattner2011-04-201-3/+3
| | | | llvm-svn: 129892
* fold memcpy/set/move_chk to llvm.memcpy/set/move when the sizesChris Lattner2011-04-171-1/+50
| | | | | | | | | are trivial. This exposes opportunities earlier, and allows fastisel to do good things with these at -O0. This addresses rdar://9289468 - clang doesn't fold memset_chk at -O0 llvm-svn: 129651
* Add 3DNow! Intrinsics.Michael J. Spencer2011-04-151-0/+132
| | | | llvm-svn: 129570
* Removing the unaligned load tests from builtins-x86.c since they're ↵Bill Wendling2011-04-131-2/+0
| | | | | | generated by a regular 'load' now. llvm-svn: 129464
* It looks like the FreeBSD buildbot needs this for the builtins-x86.c test.Bill Wendling2011-04-131-0/+2
| | | | llvm-svn: 129433
* Just use a native "load" instead of translating the builtin later. Clang canBill Wendling2011-04-131-2/+0
| | | | | | | | | take it! I wasn't able to get __builtin_ia32_loaddqu to transform into an unaligned load...I'll have to look into it further. llvm-svn: 129427
* Convert the unaligned load builtins to the first-class versions.Bill Wendling2011-04-131-0/+13
| | | | llvm-svn: 129420
* add a __sync_swap builtin to fill out the rest of the __sync builtins. Chris Lattner2011-04-091-0/+8
| | | | | | Patch by Dave Zarzycki! llvm-svn: 129189
* Oops, prefer C-style cast hereMatt Beaumont-Gay2011-03-311-1/+1
| | | | llvm-svn: 128607
* Silence GCC warning about differing types on the branches of a conditional ↵Matt Beaumont-Gay2011-03-311-1/+1
| | | | | | expression llvm-svn: 128605
* Use intrinsics for Neon vmull operations. Radar 9208957.Bob Wilson2011-03-311-3/+3
| | | | llvm-svn: 128590
* Remove PHINode::reserveOperandSpace(). Instead, add a parameter toJay Foad2011-03-301-2/+1
| | | | | | PHINode::Create() giving the (known or expected) number of operands. llvm-svn: 128538
* (Almost) always call reserveOperandSpace() on newly created PHINodes.Jay Foad2011-03-301-0/+1
| | | | llvm-svn: 128534
* Make sure we aggressively attach nounwind (etc.) to calls to libraryEli Friedman2011-03-241-2/+1
| | | | | | functions of the form __builtin_XXX. llvm-svn: 128198
* __clear_cache() is varargs and people will occasionally write it withoutEric Christopher2011-03-141-4/+7
| | | | | | | | | arguments. Process only the arguments that people write, but process all of them. Fixes rdar://8900346 llvm-svn: 127616
* update for ConstantVector API change.Chris Lattner2011-02-151-10/+9
| | | | llvm-svn: 125538
* revert my ConstantVector patch, it seems to have made the llvm-gccChris Lattner2011-02-141-9/+10
| | | | | | builders unhappy. llvm-svn: 125505
* update for ConstantVector::get API change.Chris Lattner2011-02-141-10/+9
| | | | llvm-svn: 125488
* Reorganize CodeGen{Function,Module} to eliminate the unfortunateJohn McCall2011-02-081-47/+46
| | | | | | | | Block{Function,Module} base class. Minor other refactorings. Fixed a few address-space bugs while I was there. llvm-svn: 125085
* Null initialize a few variables flagged byTed Kremenek2011-01-231-3/+3
| | | | | | | | | | clang's -Wuninitialized-experimental warning. While these don't look like real bugs, clang's -Wuninitialized-experimental analysis is stricter than GCC's, and these fixes have the benefit of being general nice cleanups. llvm-svn: 124072
* Fix a latent bug where, after emitting an expression statement, we wouldJohn McCall2011-01-121-11/+21
| | | | | | | | | | | | | | delete the block we began emitting into if it had no predecessors. We never want to do this, because there are several valid cases during statement emission where an existing block has no known predecessors but will acquire some later. The case in my test case doesn't inherently fall into this category, because we could safely emit the case-range code before the statement body, but there are examples with labels that can't be fallen into that would also demonstrate this bug. rdar://problem/8837067 llvm-svn: 123303
* Make a helper function static.Benjamin Kramer2011-01-091-1/+2
| | | | llvm-svn: 123118
OpenPOWER on IntegriCloud