Dan Gohman
ed0347333e
This cast is no longer needed; the FIXME is fixed.
...
llvm-svn: 104919
2010-05-28 01:45:35 +00:00
Jim Grosbach
4cf59b9e91
Update __builtin_setjmp codegen to match llvmCore changes in r104900.
...
llvm-svn: 104902
2010-05-27 23:54:20 +00:00
John McCall
02269a66b3
Enable the implementation of __builtin_setjmp and __builtin_longjmp. Not all
...
LLVM backends support these yet.
llvm-svn: 104867
2010-05-27 18:47:06 +00:00
Benjamin Kramer
fdb61d78e9
Implement codegen for __builtin_isnormal.
...
llvm-svn: 104118
2010-05-19 11:24:26 +00:00
Chris Lattner
3628326b44
add todos for isinf_sign and isnormal, which I don't intend to implement
...
in the near future.
llvm-svn: 103169
2010-05-06 06:13:53 +00:00
Chris Lattner
dbff4bf5f4
implement codegen support for __builtin_isfinite, part of PR6083
...
llvm-svn: 103168
2010-05-06 06:04:13 +00:00
Chris Lattner
43660c5bc0
implement part of PR6083: codegen support for isinf. Like isnan,
...
this is generating correct but suboptimal (extra extend to double)
code for the float case. Will investigate next.
llvm-svn: 103166
2010-05-06 05:35:16 +00:00
Eric Christopher
1bbc7086ff
Rewrite handling of 64-bit palignr intrinsics to be vector shuffles.
...
Stop multiplying constant by 8 accordingly in the header and change
intrinsic definition for what types we expect.
Add to existing palignr test to check that we're emitting the correct things.
llvm-svn: 101332
2010-04-15 01:43:08 +00:00
Chris Lattner
dad4062b4d
implement altivec.h and a bunch of support code, patch by Anton Yartsev!
...
llvm-svn: 101215
2010-04-14 03:54:58 +00:00
John McCall
8586bfd85d
@llvm.sqrt isn't really close enough to C's sqrt to justify emitting calls
...
to the intrinsic, even when math-errno is off.
Fixes rdar://problem/7828230 by falling back on the library function.
llvm-svn: 100613
2010-04-07 08:20:20 +00:00
Mon P Wang
cc2ab0cdc9
Reapply patch for adding support for address spaces and added a isVolatile field to memcpy, memmove, and memset.
...
llvm-svn: 100305
2010-04-04 03:10:52 +00:00
Mon P Wang
f7f3bff646
Revert r100193 since it causes failures in objc in clang
...
llvm-svn: 100200
2010-04-02 18:43:42 +00:00
Mon P Wang
4b82a88764
Reapply patch for adding support for address spaces and added a isVolatile field to memcpy, memmove, and memset.
...
llvm-svn: 100193
2010-04-02 18:04:30 +00:00
Bob Wilson
adb58e32cc
Revert Mon Ping's 99930 due to broken llvm-gcc buildbots.
...
llvm-svn: 99949
2010-03-30 22:28:46 +00:00
Mon P Wang
231e99743a
Added support for address spaces and added a isVolatile field to memcpy, memmove, and memset
...
llvm-svn: 99930
2010-03-30 21:02:45 +00:00
Daniel Dunbar
3f540c0d7d
Remove support for nand atomic builtins. They are inconsistently implemented in
...
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
2010-03-25 17:13:09 +00:00
Daniel Dunbar
4ff562d557
IRgen: Wrap atomic intrinsics with memory barriers, to ensure we honor the semantics.
...
- This should be conservatively correct, we eventually should have target hooks for platforms that are less strict.
llvm-svn: 99050
2010-03-20 07:04:11 +00:00
Eli Friedman
99d20f83ba
PR6515: Implement __builtin_signbit and friends.
...
I'm reasonably sure my implementation is correct, but it would be nice if
someone could double-check.
llvm-svn: 97864
2010-03-06 02:17:52 +00:00
John McCall
beec5a080f
Implement __builtin_dwarf_sp_column for i386 (Darwin and not), x86-64 (all),
...
and ARM. Implement __builtin_init_dwarf_reg_size_table for i386 (both) and
x86-64 (all).
llvm-svn: 97859
2010-03-06 00:35:14 +00:00
John McCall
731be6620c
Revert changes r97693, r97700, and r97718.
...
Our testing framework can't deal with disabled targets yet.
llvm-svn: 97719
2010-03-04 04:29:44 +00:00
John McCall
81d4d12504
Implement __builtin_dwarf_sp_column().
...
llvm-svn: 97700
2010-03-04 00:44:01 +00:00
Chris Lattner
5cc15e058b
add framework for ARM builtins, Patch by Edmund Grimley Evans!
...
llvm-svn: 97656
2010-03-03 19:03:45 +00:00
John McCall
515c3c548c
Sketch out an implementation for __builtin_dwarf_cfa. I have no idea
...
why the front-end is calculating the argument to llvm.eh.dwarf.cfa().
llvm-svn: 97653
2010-03-03 10:30:05 +00:00
John McCall
66769f8544
Implement __builtin_eh_return.
...
llvm-svn: 97643
2010-03-03 05:38:58 +00:00
John McCall
d4f4b7f5ee
Add proper target hooks for __builtin_extract_return_address and
...
__builtin_frob_return_address. The implementations for both are
still trivial in the default case.
llvm-svn: 97638
2010-03-03 04:15:11 +00:00
John McCall
b6cc2c0439
Inspired by seeing "MIPS" go by in the commits, I've gone ahead and
...
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
2010-03-02 03:50:12 +00:00
John McCall
4b613fae35
After much consultation aimed at figuring out what this builtin actually
...
does, document the results and then implement __builtin_extend_pointer for
platforms where it's a no-op.
llvm-svn: 97540
2010-03-02 02:31:24 +00:00
Daniel Dunbar
a7566f163a
IRgen: Add CreateMemTemp, for creating an temporary memory object for a 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
2010-02-09 02:48:28 +00:00
Daniel Dunbar
8848175547
IRgen: Fix some CreateTempAlloca calls to use ConvertTypeForMem when that is
...
conceptually correct. Review appreciated (Chris, Eli, Anders).
llvm-svn: 95401
2010-02-05 18:56:49 +00:00
Eli Friedman
d6ef69a7db
Add bzero builtin; this should help codegen quality for code using this
...
function.
llvm-svn: 94320
2010-01-23 19:00:10 +00:00
David Chisnall
481e3a87fe
Created __builtin___NSStringMakeConstantString() builtin, which generates constant Objective-C strings.
...
llvm-svn: 94274
2010-01-23 02:40:42 +00:00
Tanya Lattner
dbfd16014a
Add codgen for BI__builtin_llvm_memory_barrier.
...
llvm-svn: 93611
2010-01-16 01:21:14 +00:00
Anton Korobeynikov
73d50b9141
Promote arguments of frameaddr / returnaddr builtins to i32 type, when needed.
...
This is needed for the platforms, where bitwidth of "int" is not 32 bits
(e.g. 16 on msp430).
llvm-svn: 92176
2009-12-27 14:27:22 +00:00
Anders Carlsson
1749083e2e
Fill in the return value slot in CGExprAgg::VisitCallExpr. This takes us halfway towards fixing PR5824.
...
llvm-svn: 92142
2009-12-24 20:40:36 +00:00
Anders Carlsson
0435ed5875
Add a ReturnValueSlot class. Change the argument order in EmitCall to match the other overload better.
...
llvm-svn: 92136
2009-12-24 19:08:58 +00:00
Eric Christopher
c87915629b
Update for the intrinsic changes in llvm: the object size intrinsic
...
only takes a boolean second argument now. Update tests accordingly.
Currently the builtin still accepts the full range for compatibility.
llvm-svn: 91983
2009-12-23 03:49:37 +00:00
Daniel Dunbar
91b640abfc
Fix a few MSVC warnings.
...
llvm-svn: 91714
2009-12-18 20:58:47 +00:00
Eli Friedman
7f4933f6c7
Fix for PR5801: codegen memcpy, memmove, memset directly to LLVM intrinsics.
...
llvm-svn: 91573
2009-12-17 00:14:28 +00:00
Mike Stump
b85ffb689e
Add an addition check for undefined behavior for when we hit a
...
__builtin_unreachable. WIP.
llvm-svn: 91499
2009-12-16 03:07:12 +00:00
Nate Begeman
67dfd4236a
Revert mmx palignr to use an intrinsic, since mmx shuffle patterns are missing.
...
llvm-svn: 91269
2009-12-14 05:15:02 +00:00
Nate Begeman
72ec6bc6f4
Support x86's PALIGNR instruction without the use of a palignr intrinsic.
...
llvm-svn: 91264
2009-12-14 04:57:03 +00:00
Mike Stump
52d7141186
Remove obsolete fallback code for objectsize.
...
llvm-svn: 90780
2009-12-07 18:58:11 +00:00
Eric Christopher
c377c81dcf
Update for llvm intrinsics change.
...
llvm-svn: 90208
2009-12-01 05:00:51 +00:00
Daniel Dunbar
1dd0164bbe
Explicitly use setVolatile instead of extra IRBuilder argument.
...
llvm-svn: 90095
2009-11-29 21:11:47 +00:00
Duncan Sands
7876dad8e7
Pass a value for the isSigned parameter of CreateIntCast, rather than
...
passing the name (an exotic way of specifying that the result is signed!).
llvm-svn: 88909
2009-11-16 13:11:21 +00:00
Mike Stump
68ec7ee0e8
Enable the use of the new llvm objectsize intrinsic.
...
llvm-svn: 86607
2009-11-09 22:40:09 +00:00
Mike Stump
876387ba4f
__builtin_object_size refinements. Ensure we handle expressions with
...
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
2009-10-27 22:09:17 +00:00
Mike Stump
7a484dd6a9
Prep for future __builtin_object_size refinements. The theory is that
...
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
2009-10-26 23:39:48 +00:00
Benjamin Kramer
abd5b90e4c
Simplify pointer creation with the new Type::getInt*Ptr methods.
...
llvm-svn: 83964
2009-10-13 10:07:13 +00:00
Chris Lattner
bf20638966
Implement __builtin_unreachable(), a GCC 4.5 extension.
...
llvm-svn: 82433
2009-09-21 03:09:59 +00:00