Chris Lattner
37bd2ecb11
local static vars are globals also. This fixes a testcase
...
reported by Seo.
llvm-svn: 45156
2007-12-18 08:16:44 +00:00
Anders Carlsson
aa5c91980e
Turns out the LLVMFoldingBuilder can fold InsertElement. Knowing this, we can get rid of our special casing of constants when creating vectors.
...
llvm-svn: 45145
2007-12-18 02:45:33 +00:00
Chris Lattner
b8be97e239
introduce a new CodeGenModule::getIntrinsic method, which wraps
...
Intrinsic::getDeclaration, allowing much more terse code.
llvm-svn: 45136
2007-12-18 00:25:38 +00:00
Fariborz Jahanian
24cb52c9b0
Patch to implemented objective-c's dynamic object pointer qualified with
...
the protocol list (id<P,...> types).
llvm-svn: 45121
2007-12-17 21:03:50 +00:00
Chris Lattner
e6a76da763
Make the insertion point with an explicit new instead of the builder.
...
llvm-svn: 45118
2007-12-17 20:50:59 +00:00
Chris Lattner
28c91c5f35
add a hack so that codegen doesn't abort on missing sema of initializers, now
...
we emit stuff like this:
abort on missing sema of initializers, now
we emit stuff like this:
t3.c:1:24: warning: cannot codegen this initializer yet
const char x[2][4] = { { 'a', 'b', '\0', '\0' }, { 'c', 'd', 'e', '\0' } };
^~~~~~~~~~~~~~~~~~~~~~~~
This should be removed when sema is finished.
llvm-svn: 45086
2007-12-17 05:17:42 +00:00
Christopher Lamb
77560fbde7
Update to use new PointerType::getUnqual() api.
...
llvm-svn: 45081
2007-12-17 01:11:20 +00:00
Anders Carlsson
ca6bcae0be
Start generating SSE intrinsics.
...
llvm-svn: 45079
2007-12-16 22:33:50 +00:00
Anders Carlsson
f5f6544edc
We now support all MMX intrinsics. SSE intrinsics are next.
...
llvm-svn: 45062
2007-12-15 21:23:30 +00:00
Anders Carlsson
4d3094a9bb
Simplify the vector code. Add more shift intrinsics.
...
llvm-svn: 45035
2007-12-14 17:48:24 +00:00
Seo Sanghyeon
d4d8c3c717
Array subscription in aggregate expression
...
llvm-svn: 45023
2007-12-14 02:04:12 +00:00
Seo Sanghyeon
3abb6d8435
Implement dereference operator in aggregate expression
...
llvm-svn: 45020
2007-12-14 01:09:11 +00:00
Chris Lattner
eb13c73c36
minor cleanups
...
llvm-svn: 44996
2007-12-13 07:47:54 +00:00
Chris Lattner
13653d7668
simplify some code.
...
llvm-svn: 44994
2007-12-13 07:34:23 +00:00
Devang Patel
527048247b
Add assert to detect incomplete implementation work.
...
llvm-svn: 44974
2007-12-13 01:24:16 +00:00
Chris Lattner
70efff25be
builtin id 0 is invalid, don't use a slot for it.
...
llvm-svn: 44968
2007-12-13 00:38:03 +00:00
Chris Lattner
b8bd2db8b3
fix off-by-one error.
...
llvm-svn: 44963
2007-12-12 23:46:36 +00:00
Ted Kremenek
1daa3cfbae
TargetInfo no longer includes a reference to SourceManager.
...
Moved all clients of Diagnostics to use FullSourceLoc instead of SourceLocation.
Added many utility methods to FullSourceLoc to provide shorthand for:
FullLoc.getManager().someMethod(FullLoc.getLocation());
instead we have:
FullLoc.someMethod();
Modified TextDiagnostics (and related classes) to use this short-hand.
llvm-svn: 44957
2007-12-12 22:39:36 +00:00
Chris Lattner
c6208a72f7
Fix a codegen crash on test/CodeGen/cast.c, reported by Keith.
...
llvm-svn: 44908
2007-12-12 04:13:20 +00:00
Devang Patel
b37b12d102
Match union field type when member expression is u->x
...
llvm-svn: 44879
2007-12-11 21:33:16 +00:00
Ted Kremenek
d4e5fbacab
Mega-patch: ripped SourceManager out of Diagnostic/DiagnosticClient. Now
...
SourceManager is passed by reference, allowing the SourceManager to be
associated with a specific translation unit, and not the entire execution
of the driver.
Modified all users of Diagnostics to comply with this new interface.
Integrated SourceManager as a member variable of TargetInfo. TargetInfo will
eventually be associated with a single translation unit (just like
SourceManager).
Made the SourceManager reference in ASTContext private. Provided accessor
getSourceManager() for clients to use instead. Modified clients to comply with
new interface.
llvm-svn: 44878
2007-12-11 21:27:55 +00:00
Devang Patel
e3f9fa6322
Refactor bit-field handling code into a separate method.
...
No functionality change.
llvm-svn: 44875
2007-12-11 19:51:39 +00:00
Chris Lattner
63ba2c06c4
fix a build issue with non-apple-gcc-4.0 compilers.
...
llvm-svn: 44844
2007-12-11 04:33:00 +00:00
Anders Carlsson
f1c18350e3
Generate more builtins.
...
llvm-svn: 44841
2007-12-11 03:09:22 +00:00
Anders Carlsson
eee7566205
Generate code for some more intrinsics.
...
llvm-svn: 44839
2007-12-11 02:25:54 +00:00
Chris Lattner
11fbda2b5a
Reimplement support for strings that initialize global inits now that
...
the types are right in sema. Thanks Steve.
llvm-svn: 44834
2007-12-11 01:38:45 +00:00
Devang Patel
7ae82e7305
Separate access field number is not required.
...
llvm-svn: 44833
2007-12-11 01:23:33 +00:00
Devang Patel
113bd8be70
Beautify comment.
...
llvm-svn: 44831
2007-12-11 00:54:19 +00:00
Devang Patel
ab6aadb34a
Add support to share llvm fields for bit-fields.
...
For example, struct { char a; short b:2; };
llvm-svn: 44830
2007-12-11 00:49:18 +00:00
Ted Kremenek
f182e81d85
Added missing inclusion of stdarg.h. Now CGExprScalar.cpp
...
compiles again on Linux.
llvm-svn: 44821
2007-12-10 23:44:32 +00:00
Chris Lattner
433fb26707
add support for implicit cast from array to pointer that is not the element
...
type.
llvm-svn: 44809
2007-12-10 19:50:32 +00:00
Anders Carlsson
b9eb82c3ee
Add EmitShuffleVector helper method.
...
llvm-svn: 44806
2007-12-10 19:35:18 +00:00
Devang Patel
b3ae8d7dc2
Add assert to flag incomplete bit-field support.
...
llvm-svn: 44800
2007-12-10 18:52:06 +00:00
Devang Patel
3c31b54b47
Use getABITypeSizeInBits() instead of getTypeSizeInBits() during struct layout.
...
llvm-svn: 44799
2007-12-10 18:37:40 +00:00
Devang Patel
bb5c0d8960
Use getABITypeSizeInBits() instead of getTypeSizeInBits() during struct layout.
...
llvm-svn: 44798
2007-12-10 18:25:34 +00:00
Chris Lattner
cb04ac9599
abort when we lower an initializer to the wrong type, as we currently do for:
...
char text[] = "string";
llvm-svn: 44752
2007-12-10 00:05:55 +00:00
Chris Lattner
686628e052
extend or truncate the initializer for a string initializer to match its type.
...
llvm-svn: 44751
2007-12-10 00:00:56 +00:00
Chris Lattner
c25c42f3ca
Implement codegen support for:
...
char text[8] = "string";
Big fixme remains.
llvm-svn: 44750
2007-12-09 23:49:42 +00:00
Anders Carlsson
92c4e44da1
Address Chris's comments.
...
llvm-svn: 44749
2007-12-09 23:39:18 +00:00
Anders Carlsson
895af08562
Move target specific builtin IDs to TargetBuiltins.h so that they can be used by CGBuiltin.cpp
...
llvm-svn: 44748
2007-12-09 23:17:02 +00:00
Anders Carlsson
8e1d8cf241
Implement __builtin_ia32_mulps.
...
llvm-svn: 44745
2007-12-09 21:51:19 +00:00
Anders Carlsson
a020c43034
Generate code for target specific intrinsics.
...
llvm-svn: 44744
2007-12-09 21:20:04 +00:00
Chris Lattner
283d094b75
implement support for functions that initialize globals.
...
llvm-svn: 44730
2007-12-09 00:36:01 +00:00
Devang Patel
65a2288eef
More struct bitfields layout work. Now handle,
...
struct STestB1 {char a; char b:2; } stb1;
struct STestB2 {char a; char b:5; char c:4} stb2;
llvm-svn: 44664
2007-12-06 19:16:05 +00:00
Chris Lattner
6eed001371
fix some bogus code noticed by Kevin Andre
...
llvm-svn: 44615
2007-12-05 17:21:34 +00:00
Anders Carlsson
a297e7a888
Implement CodeGen for vectors. Don't create unnecessary conversion instructions if the value to be converted is a constant.
...
llvm-svn: 44606
2007-12-05 07:36:10 +00:00
Anders Carlsson
e8ee04c0bc
Implement codegen for builtin infinity functions.
...
llvm-svn: 44604
2007-12-05 07:22:48 +00:00
Seo Sanghyeon
3d072bea09
Ignore typedefs in pointer arithmetic codegen.
...
llvm-svn: 44529
2007-12-03 06:23:43 +00:00
Anders Carlsson
ef93b9d011
Implement __builtin_bswap32 and __builtin_bswap64.
...
llvm-svn: 44521
2007-12-02 21:58:10 +00:00
Chris Lattner
4e4186b2de
fix logic for member expr codegen.
...
llvm-svn: 44520
2007-12-02 18:52:07 +00:00