summaryrefslogtreecommitdiffstats
path: root/clang/CodeGen/CodeGenFunction.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Make a major restructuring of the clang tree: introduce a top-levelChris Lattner2008-03-151-182/+0
| | | | | | | | | | lib dir and move all the libraries into it. This follows the main llvm tree, and allows the libraries to be built in parallel. The top level now enforces that all the libs are built before Driver, but we don't care what order the libs are built in. This speeds up parallel builds, particularly incremental ones. llvm-svn: 48402
* Update to reflect changes in parameter attribute api.Chris Lattner2008-03-121-4/+3
| | | | llvm-svn: 48290
* Add fastcall/stdcall attribute supportNate Begeman2008-03-071-0/+4
| | | | | | Generate CallingConv::Fast when fastcall attribute is present llvm-svn: 48017
* remove the source location arguments to various target query methods.Chris Lattner2008-03-051-2/+1
| | | | llvm-svn: 47954
* fix codegen support for functions that are nothrow and noreturn.Chris Lattner2008-03-031-9/+8
| | | | llvm-svn: 47838
* Add a bunch of attributes, patch by Nuno Lopes.Chris Lattner2008-03-031-4/+27
| | | | llvm-svn: 47837
* Implement codegen for the following static var init.Lauro Ramos Venancio2008-02-261-0/+4
| | | | | | | | | | | void g() { static char a[10]; static char *b = a; } Now we can compile wget! llvm-svn: 47627
* Change the key of CGRecordLayouts from being an llvm type* to being a decl*. ↵Chris Lattner2008-02-051-7/+4
| | | | | | | | | | | LLVM Type*'s can change as types are refined, so we can't use them as a stable key in the map. Decls don't change, so use them instead. This patch was written by Anders, but he's too shy to commit it himself :) llvm-svn: 46743
* Don't attribute in file headers anymore. See llvmdev for theChris Lattner2007-12-291-2/+2
| | | | | | discussion of this change. llvm-svn: 45410
* Make the insertion point with an explicit new instead of the builder.Chris Lattner2007-12-171-4/+6
| | | | llvm-svn: 45118
* warn about unhandled initializers instead of crashing on them.Chris Lattner2007-12-021-6/+1
| | | | llvm-svn: 44510
* Handle global variable definitions which change the type of a definition, ↵Chris Lattner2007-12-021-36/+1
| | | | | | | | | | | such as: extern int x[]; void foo() { x[0] = 1; } int x[10]; void bar() { x[0] = 1; } llvm-svn: 44509
* remove the alloca insertion point inst, which is an internal helper.Chris Lattner2007-12-021-0/+4
| | | | llvm-svn: 44508
* implement codegen for functions whose function body type don't matchChris Lattner2007-12-021-1/+35
| | | | | | their prototype. llvm-svn: 44506
* convert the rest of the stderr users in codegen to use diagnostics.Chris Lattner2007-12-021-3/+4
| | | | llvm-svn: 44503
* move unsupported warning into a centralized place.Chris Lattner2007-12-021-0/+11
| | | | llvm-svn: 44502
* take an initial stab at setting function linkage right. HandleChris Lattner2007-11-271-1/+7
| | | | | | static and inline at least. llvm-svn: 44355
* Rename classes and collections that maintain record layout information.Devang Patel2007-11-011-4/+4
| | | | | | | Now, at AST level record info is maintained by ASTRecordLayout class. Now, at code gen level record info is maintained by CGRecordLayout class. llvm-svn: 43619
* Constify methods and reuse RecordOrganizer object.Devang Patel2007-10-241-1/+1
| | | | llvm-svn: 43284
* untabifyDevang Patel2007-10-241-1/+1
| | | | llvm-svn: 43280
* Begin struct layout work.Devang Patel2007-10-231-0/+11
| | | | llvm-svn: 43236
* Generate code for va_start and va_end.Anders Carlsson2007-10-121-2/+2
| | | | llvm-svn: 42939
* Code gen case statement ranges.Devang Patel2007-10-081-1/+2
| | | | llvm-svn: 42766
* switch statement code gen.Devang Patel2007-10-041-0/+10
| | | | llvm-svn: 42616
* Do not codegen dummy block.Devang Patel2007-09-281-7/+21
| | | | | | Dummy block is an empty block with no predecessors. llvm-svn: 42451
* eliminate some VC++ warnings, patch contributed by Hartmut KaiserChris Lattner2007-09-041-2/+2
| | | | llvm-svn: 41692
* implement initial codegen for aggregate return functions. This implementsChris Lattner2007-08-101-1/+1
| | | | | | | | | | | | | | | codegen for: _Complex double bar(int); void test(_Complex double*); void test2(int c) { _Complex double X; X = bar(1); test(&X); } llvm-svn: 40993
* Implement break and continue. Patch by Anders Carlsson!Chris Lattner2007-07-161-0/+3
| | | | llvm-svn: 39927
* A significant refactoring of the type size stuff to also Chris Lattner2007-07-141-1/+3
| | | | | | compute type alignment. This info is needed for struct layout. llvm-svn: 39850
* Add support for vector formal arguments.Chris Lattner2007-07-101-1/+2
| | | | llvm-svn: 39721
* fix codegen of void return functionsChris Lattner2007-06-271-1/+1
| | | | llvm-svn: 39694
* implement support for struct and complex returns.Chris Lattner2007-06-221-1/+13
| | | | llvm-svn: 39674
* remove location tracking for target infoChris Lattner2007-06-221-4/+4
| | | | llvm-svn: 39671
* Hook up global function and variable handling. We can now compile:Chris Lattner2007-06-201-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | int X, bar(int,int,int); short Y; double foo() { return bar(X, Y, 3); } into: @X = external global i32 ; <i32*> [#uses=1] @Y = external global i16 ; <i16*> [#uses=1] define double @foo() { entry: %tmp = load i32* @X ; <i32> [#uses=1] %tmp1 = load i16* @Y ; <i16> [#uses=1] %promote = sext i16 %tmp1 to i32 ; <i32> [#uses=1] %call = tail call i32 @bar( i32 %tmp, i32 %promote, i32 3 ) ; <i32> [#uses=1] %conv = sitofp i32 %call to double ; <double> [#uses=1] ret double %conv } declare i32 @bar(i32, i32, i32) llvm-svn: 39663
* Refactor CodeGenTypes out to CodeGenModule so it can be used for functionsChris Lattner2007-06-161-2/+2
| | | | | | and globals. llvm-svn: 39661
* Split type analysis out to its own file, now the integer constant expr ↵Chris Lattner2007-06-161-111/+2
| | | | | | | | evaluation is ready. llvm-svn: 39660
* Finally bite the bullet and make the major change: split the clang namespaceChris Lattner2007-06-151-17/+14
| | | | | | | | | | | | | out of the llvm namespace. This makes the clang namespace be a sibling of llvm instead of being a child. The good thing about this is that it makes many things unambiguous. The bad things is that many things in the llvm namespace (notably data structures like smallvector) now require an llvm:: qualifier. IMO, libsystem and libsupport should be split out of llvm into their own namespace in the future, which will fix this issue. llvm-svn: 39659
* Implement support for formal arguments. We can now compile this:Chris Lattner2007-06-131-8/+18
| | | | | | | | | | | | | | | | | | | | | | | | int test(int X, short Y, float Z) { return (int)(X*Y+Z); } to: define i32 @test(i32 %X, i16 %Y, float %Z) { entry: %promote = sext i16 %Y to i32 ; <i32> [#uses=1] %mul = mul i32 %promote, %X ; <i32> [#uses=1] %promote3 = sitofp i32 %mul to float ; <float> [#uses=1] %add = add float %promote3, %Z ; <float> [#uses=1] %conv = fptosi float %add to i32 ; <i32> [#uses=1] ret i32 %conv } with: $ clang -emit-llvm t.c | llvm-as | opt -std-compile-opts | llvm-dis llvm-svn: 39652
* Convert argument types over, which works for trivial scalars.Chris Lattner2007-06-091-4/+15
| | | | llvm-svn: 39625
* Implement array subscripts for non-vla types.Chris Lattner2007-06-081-0/+1
| | | | llvm-svn: 39622
* implement codegen of a bunch more loop constructs and most expressionsChris Lattner2007-06-051-2/+4
| | | | llvm-svn: 39593
* Type::isSignedInteger() and isUnsignedInteger() did not properly account forChris Lattner2007-06-031-1/+2
| | | | | | | | | | 'char', which varies based on the target. Instead of spreading target knowledge throughout the compiler, bifurcate char into Char_S and Char_U, and have ASTContext create the right one based on the target, when it starts up. llvm-svn: 39577
* implement a first hack at codegen'ing the usual unary conversions.Chris Lattner2007-06-021-0/+6
| | | | | | | | | | | | | | | | | | | | | | This allows us to compile: int func() { int A[10]; if (!A) { to: define i32 @func() { entry: %A = alloca [10 x i32] ; <[10 x i32]*> [#uses=1] %arraydecay = getelementptr [10 x i32]* %A, i32 0, i32 0 ; <i32*> [#uses=1] %tobool = icmp ne i32* %arraydecay, null ; <i1> [#uses=1] %lnot = xor i1 %tobool, true ; <i1> [#uses=1] br i1 %lnot, label %ifthen, label %ifend -Chris llvm-svn: 39564
* Implement translation of pointer, reference and simple array types. We nowChris Lattner2007-06-021-4/+22
| | | | | | | | | | | | | | | | compile: void foo() { int A[10]; int *P; into: entry: %A = alloca [10 x i32] ; <[10 x i32]*> [#uses=0] %P = alloca i32* ; <i32**> [#uses=0] llvm-svn: 39561
* Add initial support for fixed-size local vardecls. This allows us to compile:Chris Lattner2007-06-021-0/+5
| | | | | | | | | | | | | | | | | | int func() { register int X; { int Y; into: define i32 @func() { entry: %X = alloca i32 ; <i32*> [#uses=0] %Y = alloca i32 ; <i32*> [#uses=0] %allocapt = bitcast i32 undef to i32 ; <i32> [#uses=0] ... llvm-svn: 39553
* Start stubbing out decl codegen.Chris Lattner2007-06-021-0/+3
| | | | llvm-svn: 39550
* implement codegen support for return of void and simple scalars.Chris Lattner2007-06-021-0/+1
| | | | llvm-svn: 39547
* Add support for functions that return non-void.Chris Lattner2007-06-021-5/+10
| | | | llvm-svn: 39546
* split stmt/expr codegen into their own files.Chris Lattner2007-06-011-185/+0
| | | | llvm-svn: 39540
* emit a return at the end of the function. Run the llvm verifier.Chris Lattner2007-05-301-0/+8
| | | | llvm-svn: 39534
OpenPOWER on IntegriCloud