aboutsummaryrefslogtreecommitdiff
path: root/CodeGen
AgeCommit message (Collapse)Author
2007-12-11Reimplement support for strings that initialize global inits now thatChris Lattner
the types are right in sema. Thanks Steve. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44834 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-11Separate access field number is not required.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44833 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-11Beautify comment.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44831 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-11Add support to share llvm fields for bit-fields.Devang Patel
For example, struct { char a; short b:2; }; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44830 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-10Added missing inclusion of stdarg.h. Now CGExprScalar.cppTed Kremenek
compiles again on Linux. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44821 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-10add support for implicit cast from array to pointer that is not the elementChris Lattner
type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44809 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-10Add EmitShuffleVector helper method.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44806 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-10Add assert to flag incomplete bit-field support.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44800 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-10Use getABITypeSizeInBits() instead of getTypeSizeInBits() during struct layout.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44799 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-10Use getABITypeSizeInBits() instead of getTypeSizeInBits() during struct layout.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44798 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-10abort when we lower an initializer to the wrong type, as we currently do for:Chris Lattner
char text[] = "string"; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44752 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-10extend or truncate the initializer for a string initializer to match its type.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44751 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-09Implement codegen support for:Chris Lattner
char text[8] = "string"; Big fixme remains. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44750 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-09Address Chris's comments.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44749 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-09Move target specific builtin IDs to TargetBuiltins.h so that they can be ↵Anders Carlsson
used by CGBuiltin.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44748 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-09Implement __builtin_ia32_mulps.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44745 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-09Generate code for target specific intrinsics.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44744 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-09implement support for functions that initialize globals.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44730 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-06More struct bitfields layout work. Now handle,Devang Patel
struct STestB1 {char a; char b:2; } stb1; struct STestB2 {char a; char b:5; char c:4} stb2; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44664 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-05fix some bogus code noticed by Kevin AndreChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44615 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-05Implement CodeGen for vectors. Don't create unnecessary conversion ↵Anders Carlsson
instructions if the value to be converted is a constant. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44606 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-05Implement codegen for builtin infinity functions.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44604 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-03Ignore typedefs in pointer arithmetic codegen.Seo Sanghyeon
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44529 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-02Implement __builtin_bswap32 and __builtin_bswap64.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44521 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-02fix logic for member expr codegen.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44520 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-02Treat discarding array initializer elements as an extwarn (so ↵Christopher Lamb
-pedantic-errors flags it). Allow CodeGen to truncate the initializer if needed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44518 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-02globals can't be vla'sChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44512 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-02add codegen support for global inits that require array decay.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44511 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-02warn about unhandled initializers instead of crashing on them.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44510 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-02Handle global variable definitions which change the type of a definition, ↵Chris Lattner
such as: extern int x[]; void foo() { x[0] = 1; } int x[10]; void bar() { x[0] = 1; } git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44509 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-02remove the alloca insertion point inst, which is an internal helper.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44508 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-02merge the llvm global variable when there are multiple C decls.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44507 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-02implement codegen for functions whose function body type don't matchChris Lattner
their prototype. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44506 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-02merge functions with multiple function decls if they have the same name.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44505 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-02convert the rest of the stderr users in codegen to use diagnostics.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44503 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-02move unsupported warning into a centralized place.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44502 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-02Warn about unsupported codegen with the diags machinery, giving us:Chris Lattner
t.c:3322:5: warning: cannot codegen this yet __asm__ ("bswap %0" : "+r" (_data)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ instead of: Unimplemented stmt! (AsmStmt 0x80eaa0 <t.c:3331:5, line:3334:28>) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44501 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-02Add support for __builtin_expect which is needed for assert, Oliver Hunt
among other things. Also change a codegen warning to dump to stderr so it doesn't mess with -emit-llvm output git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44497 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-02Support initalisers for more than just int-typed static variables.Oliver Hunt
We now use the CodeGenModule logic for generating the constant initialiser expression, so happily further initialiser fixes should automatically work for statics as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44495 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-01Better match llvm-gcc's behavior for CodeGen naming of anonymous structs and ↵Christopher Lamb
unions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44490 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-01When generating the CodeGen type name of a struct, union, enum use the typedef Christopher Lamb
name if a tag type name is not available for the type. This matches how llvm-gcc chooses CodeGen type names. This means that "typedef struct {...} foo" now results in a CodeGen name of "struct.foo" rather than "struct." git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44489 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-01fix a couple switch codegen problems Oliver reported.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44484 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-30fix a bug handling typedefs in member expr codegen. Patch Chris Lattner
by Seo Sanghyeon git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44455 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-30Fix a codegen crash on void ?: reported by OliverChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44454 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-30Support fully general case expressions, patch by Sanghyeon Seo!Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44453 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-28Implement support for -fwritable-strings and make the code generatorChris Lattner
merge string literals when it is not provided. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44394 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-27update to match change in mainline llvm.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44367 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-27take an initial stab at setting function linkage right. HandleChris Lattner
static and inline at least. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44355 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-26Fix sema support for the gnu ?: expression with a Chris Lattner
missing middle expression, and fix a codegen bug where we didn't correctly promote the condition to the right result type. This fixes PR1824. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44322 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-23improve codegen for global variable initializers, implementing Chris Lattner
test/CodeGen/global-with-initialiser.c Patch by Oliver Hunt! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44290 91177308-0d34-0410-b5e6-96231b3b80d8