summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGBuiltin.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove support for nand atomic builtins. They are inconsistently implemented inDaniel Dunbar2010-03-251-17/+0
| | | | | | | gcc, and the common expectation seems to be that they are unused. If and when someone cares we can add them back with well documented demantics. llvm-svn: 99522
* IRgen: Wrap atomic intrinsics with memory barriers, to ensure we honor the ↵Daniel Dunbar2010-03-201-25/+51
| | | | | | | | semantics. - This should be conservatively correct, we eventually should have target hooks for platforms that are less strict. llvm-svn: 99050
* PR6515: Implement __builtin_signbit and friends.Eli Friedman2010-03-061-0/+17
| | | | | | | I'm reasonably sure my implementation is correct, but it would be nice if someone could double-check. llvm-svn: 97864
* Implement __builtin_dwarf_sp_column for i386 (Darwin and not), x86-64 (all),John McCall2010-03-061-0/+16
| | | | | | | and ARM. Implement __builtin_init_dwarf_reg_size_table for i386 (both) and x86-64 (all). llvm-svn: 97859
* Revert changes r97693, r97700, and r97718.John McCall2010-03-041-15/+0
| | | | | | Our testing framework can't deal with disabled targets yet. llvm-svn: 97719
* Implement __builtin_dwarf_sp_column().John McCall2010-03-041-0/+15
| | | | llvm-svn: 97700
* add framework for ARM builtins, Patch by Edmund Grimley Evans!Chris Lattner2010-03-031-0/+15
| | | | llvm-svn: 97656
* Sketch out an implementation for __builtin_dwarf_cfa. I have no ideaJohn McCall2010-03-031-0/+18
| | | | | | why the front-end is calculating the argument to llvm.eh.dwarf.cfa(). llvm-svn: 97653
* Implement __builtin_eh_return.John McCall2010-03-031-0/+16
| | | | llvm-svn: 97643
* Add proper target hooks for __builtin_extract_return_address andJohn McCall2010-03-031-3/+9
| | | | | | | __builtin_frob_return_address. The implementations for both are still trivial in the default case. llvm-svn: 97638
* Inspired by seeing "MIPS" go by in the commits, I've gone ahead andJohn McCall2010-03-021-10/+25
| | | | | | | | | | | implemented a (codegen) target hook for __builtin_extend_pointer. I'm also making it return a uint64_t instead of an unsigned word; this comports with typical usage (i.e. the one use I know of). I don't know if any of the existing targets requires this hook to be set (other than x86 and x86_64, which I know do not). llvm-svn: 97547
* After much consultation aimed at figuring out what this builtin actuallyJohn McCall2010-03-021-0/+16
| | | | | | | does, document the results and then implement __builtin_extend_pointer for platforms where it's a no-op. llvm-svn: 97540
* IRgen: Add CreateMemTemp, for creating an temporary memory object for a ↵Daniel Dunbar2010-02-091-2/+1
| | | | | | | | | | particular type, and flood fill. - CreateMemTemp sets the alignment on the alloca correctly, which fixes a great many places in IRgen where we were doing the wrong thing. - This fixes many many more places than the test case, but my feeling is we need to audit alignment systematically so I'm not inclined to try hard to test the individual fixes in this patch. If this bothers you, patches welcome! PR6240. llvm-svn: 95648
* IRgen: Fix some CreateTempAlloca calls to use ConvertTypeForMem when that isDaniel Dunbar2010-02-051-1/+2
| | | | | | conceptually correct. Review appreciated (Chris, Eli, Anders). llvm-svn: 95401
* Add bzero builtin; this should help codegen quality for code using thisEli Friedman2010-01-231-0/+1
| | | | | | function. llvm-svn: 94320
* Created __builtin___NSStringMakeConstantString() builtin, which generates ↵David Chisnall2010-01-231-0/+1
| | | | | | constant Objective-C strings. llvm-svn: 94274
* Add codgen for BI__builtin_llvm_memory_barrier.Tanya Lattner2010-01-161-0/+12
| | | | llvm-svn: 93611
* Promote arguments of frameaddr / returnaddr builtins to i32 type, when needed.Anton Korobeynikov2009-12-271-2/+10
| | | | | | | This is needed for the platforms, where bitwidth of "int" is not 32 bits (e.g. 16 on msp430). llvm-svn: 92176
* Fill in the return value slot in CGExprAgg::VisitCallExpr. This takes us ↵Anders Carlsson2009-12-241-0/+1
| | | | | | halfway towards fixing PR5824. llvm-svn: 92142
* Add a ReturnValueSlot class. Change the argument order in EmitCall to match ↵Anders Carlsson2009-12-241-3/+3
| | | | | | the other overload better. llvm-svn: 92136
* Update for the intrinsic changes in llvm: the object size intrinsicEric Christopher2009-12-231-1/+10
| | | | | | | only takes a boolean second argument now. Update tests accordingly. Currently the builtin still accepts the full range for compatibility. llvm-svn: 91983
* Fix a few MSVC warnings.Daniel Dunbar2009-12-181-3/+1
| | | | llvm-svn: 91714
* Fix for PR5801: codegen memcpy, memmove, memset directly to LLVM intrinsics.Eli Friedman2009-12-171-0/+3
| | | | llvm-svn: 91573
* Add an addition check for undefined behavior for when we hit aMike Stump2009-12-161-0/+2
| | | | | | __builtin_unreachable. WIP. llvm-svn: 91499
* Revert mmx palignr to use an intrinsic, since mmx shuffle patterns are missing.Nate Begeman2009-12-141-1/+4
| | | | llvm-svn: 91269
* Support x86's PALIGNR instruction without the use of a palignr intrinsic.Nate Begeman2009-12-141-4/+32
| | | | llvm-svn: 91264
* Remove obsolete fallback code for objectsize.Mike Stump2009-12-071-10/+0
| | | | llvm-svn: 90780
* Update for llvm intrinsics change.Eric Christopher2009-12-011-0/+7
| | | | llvm-svn: 90208
* Explicitly use setVolatile instead of extra IRBuilder argument.Daniel Dunbar2009-11-291-1/+3
| | | | llvm-svn: 90095
* Pass a value for the isSigned parameter of CreateIntCast, rather thanDuncan Sands2009-11-161-5/+10
| | | | | | passing the name (an exotic way of specifying that the result is signed!). llvm-svn: 88909
* Enable the use of the new llvm objectsize intrinsic.Mike Stump2009-11-091-4/+2
| | | | llvm-svn: 86607
* __builtin_object_size refinements. Ensure we handle expressions withMike Stump2009-10-271-5/+7
| | | | | | | | | | side-effects up front, as when we switch to the llvm intrinsic call for __builtin_object_size later, it will have two evaluations. We also finish off the intrinsic version of the code so we can just turn it on once llvm has the intrinsic. llvm-svn: 85324
* Prep for future __builtin_object_size refinements. The theory is thatMike Stump2009-10-261-0/+11
| | | | | | | | | | someone will add an llvm intrinsic for us to use, so the optimizer can figure out the hard cases. WIP. For those that want to help, double check with Eric before starting. He has a bit of code this will plug into. llvm-svn: 85175
* Simplify pointer creation with the new Type::getInt*Ptr methods.Benjamin Kramer2009-10-131-10/+6
| | | | llvm-svn: 83964
* Implement __builtin_unreachable(), a GCC 4.5 extension.Chris Lattner2009-09-211-1/+6
| | | | llvm-svn: 82433
* Fix subtle bug in generating LLVM function declarations for builtin functions.Daniel Dunbar2009-09-141-1/+1
| | | | | | | | | | The decl wasn't being passed down, which meant that function attributes were not being set correctly. This is particularly important for ARM, since it wants to override the calling convention. Instead we would emit the builtin with the wrong calling convention, and instcombine would come along and merrily shred all the calls to it. :) llvm-svn: 81756
* Remove tabs, and whitespace cleanups.Mike Stump2009-09-091-77/+77
| | | | llvm-svn: 81346
* PR4836, part 2: CodeGen for __builtin_isnan.Eli Friedman2009-09-011-0/+5
| | | | llvm-svn: 80655
* Remove TargetInfo::getTargetPrefix().Daniel Dunbar2009-08-241-6/+12
| | | | llvm-svn: 79907
* Update for LLVM API change.Owen Anderson2009-08-131-31/+31
| | | | llvm-svn: 78946
* Update for LLVM API change.Owen Anderson2009-07-311-3/+3
| | | | llvm-svn: 77722
* Update for LLVM API changes.Owen Anderson2009-07-301-2/+2
| | | | llvm-svn: 77638
* Update for LLVM API change.Owen Anderson2009-07-291-9/+9
| | | | llvm-svn: 77514
* Update for LLVM API change.Owen Anderson2009-07-271-1/+1
| | | | llvm-svn: 77249
* Switch to getName()Daniel Dunbar2009-07-261-1/+1
| | | | llvm-svn: 77151
* Update for LLVM API change.Owen Anderson2009-07-241-17/+18
| | | | llvm-svn: 77012
* Update for LLVM API change, and contextify a bunch of related stuff.Owen Anderson2009-07-141-32/+33
| | | | llvm-svn: 75705
* Update for LLVM API change.Owen Anderson2009-07-131-3/+4
| | | | llvm-svn: 75446
* Remove the ASTContext parameter from the attribute-related methods of Decl.Argyrios Kyrtzidis2009-06-301-2/+2
| | | | | | | | | The implementations of these methods can Use Decl::getASTContext() to get the ASTContext. This commit touches a lot of files since call sites for these methods are everywhere. I used pre-tokenized "carbon.h" and "cocoa.h" headers to do some timings, and there was no real time difference between before the commit and after it. llvm-svn: 74501
* Move the static DeclAttrs map into ASTContext. Fixes <rdar://problem/6983177>.Douglas Gregor2009-06-181-2/+2
| | | | llvm-svn: 73702
OpenPOWER on IntegriCloud