summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* Use CodeGenModule API for ObjC runtime function references.Fariborz Jahanian2009-03-301-14/+28
| | | | | | Patch by David Chisnall. llvm-svn: 68043
* Push DeclGroup much farther throughout the compiler. Now the variousChris Lattner2009-03-291-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | productions (except the already broken ObjC cases like @class X,Y;) in the parser that can produce more than one Decl return a DeclGroup instead of a Decl, etc. This allows elimination of the Decl::NextDeclarator field, and exposes various clients that should look at all decls in a group, but which were only looking at one (such as the dumper, printer, etc). These have been fixed. Still TODO: 1) there are some FIXME's in the code about potentially using DeclGroup for better location info. 2) ParseObjCAtDirectives should return a DeclGroup due to @class etc. 3) I'm not sure what is going on with StmtIterator.cpp, or if it can be radically simplified now. 4) I put a truly horrible hack in ParseTemplate.cpp. I plan to bring up #3/4 on the mailing list, but don't plan to tackle #1/2 in the short term. llvm-svn: 68002
* Initial implementation of ARM ABI. Mostly untested. Note that I'm not Eli Friedman2009-03-291-0/+88
| | | | | | | | really intending to take ownership of this; I wrote this mostly because I was curious about how the ARM ABI works. It should be a decent start, though. llvm-svn: 67969
* rename some methods.Chris Lattner2009-03-281-1/+1
| | | | llvm-svn: 67923
* change HandleTranslationUnit to take an ASTContext instead of TranslationUnitChris Lattner2009-03-281-1/+1
| | | | llvm-svn: 67910
* Trivial cleanup.Eli Friedman2009-03-281-2/+2
| | | | llvm-svn: 67899
* Move where block-related variables are initialized so that block Eli Friedman2009-03-282-10/+10
| | | | | | types don't get generated when blocks aren't used. llvm-svn: 67898
* Minor cleanup.Eli Friedman2009-03-281-11/+1
| | | | llvm-svn: 67896
* Misc small fixes/cleanups/comment changes.Eli Friedman2009-03-281-20/+28
| | | | llvm-svn: 67895
* Change compound assignment operators to keep track of both the promoted Eli Friedman2009-03-282-63/+18
| | | | | | | | | | | | | | | | | LHS type and the computation result type; this encodes information into the AST which is otherwise non-obvious. Fix Sema to always come up with the right answer for both of these types. Fix IRGen and the analyzer to account for these changes. This fixes PR2601. The approach is inspired by PR2601 comment 2. Note that this changes real *= complex in CodeGen from a silent miscompilation to an explicit error. I'm not really sure that the analyzer changes are correct, or how to test them... someone more familiar with the analyzer should check those changes. llvm-svn: 67889
* Do not emit debug information for variables while generating optimized code. ↵Devang Patel2009-03-272-0/+17
| | | | | | The llvm optimizer and code generator are not yet ready to support optimized code debugging. llvm-svn: 67876
* Finish off semantic analysis for regparm, and remove the warning. Also Eli Friedman2009-03-271-3/+0
| | | | | | remove a redundant error in CodeGen. llvm-svn: 67868
* Besides the warning, issue unsupported diagnostics in Fariborz Jahanian2009-03-271-0/+6
| | | | | | ir gen. No intended change in functionality. llvm-svn: 67857
* - Minor change to dump of ivar layout map.Fariborz Jahanian2009-03-261-1/+4
| | | | | | | | - Temporarily undef'ed __OBJC2__ in nonfragile objc abi mode as it was forcing ivar synthesis in a certain project which clang does not yet support. llvm-svn: 67766
* most of this is plumbing to get CompileOptions down into Chris Lattner2009-03-263-31/+25
| | | | | | | CodeGenModule. Once there, add a new NoCommon option to it and implement -fno-common. llvm-svn: 67735
* More for for objc2's ivar layout map (currentlyFariborz Jahanian2009-03-251-3/+22
| | | | | | is not in use). llvm-svn: 67713
* Remove -f__block as codegen for __block variables should be solid.Mike Stump2009-03-251-22/+0
| | | | llvm-svn: 67697
* Fixup codegen for block literals that bleed copy/dispose informationMike Stump2009-03-252-6/+12
| | | | | | from previous block literals. llvm-svn: 67696
* simplify some conditionals, don't copy LangOptions.Chris Lattner2009-03-251-11/+15
| | | | llvm-svn: 67674
* Encode language.Devang Patel2009-03-241-4/+15
| | | | llvm-svn: 67650
* Support member reference on ?: of struct type.Daniel Dunbar2009-03-242-0/+21
| | | | llvm-svn: 67603
* Fix the ABI convention for struct returns on x86 outside of Darwin.Eli Friedman2009-03-231-1/+9
| | | | llvm-svn: 67577
* Must allow for strong cast of floats as well (objc2 gc).Fariborz Jahanian2009-03-231-17/+50
| | | | llvm-svn: 67551
* Some minor fixes for complex IRGen.Eli Friedman2009-03-231-23/+16
| | | | llvm-svn: 67501
* Fix a subtle bug in CodeGen for the increment of a bitfield.Eli Friedman2009-03-231-5/+7
| | | | llvm-svn: 67499
* switch getBuiltinLibFunction to use the new GetOrCreateLLVMFunction Chris Lattner2009-03-222-36/+5
| | | | | | | | functionality, fixing a crash on the attached testcase. Eliminate the BuiltinFunctions cache, as it can contain dangling pointers. This fixes a bunch of valgrind errors on test/CodeGen/builtins.c llvm-svn: 67484
* emit aliases as the definitions fly by, don't bother deferring untilChris Lattner2009-03-222-82/+64
| | | | | | the end of the module. llvm-svn: 67482
* make alias definition logic more similar to functions/globals.Chris Lattner2009-03-221-12/+29
| | | | llvm-svn: 67481
* fix PR3200 by making alias emission use the new infrastructure. Fold Chris Lattner2009-03-221-11/+17
| | | | | | some tests into the alias.c file. llvm-svn: 67479
* pull "runtime globals" into the same framework as other functions/global ↵Chris Lattner2009-03-225-162/+132
| | | | | | | | variables. No intended functionality change. llvm-svn: 67478
* Remove dead code.Eli Friedman2009-03-221-41/+0
| | | | llvm-svn: 67477
* fix a fixme: non-proto struct returning function definitions should be compiledChris Lattner2009-03-221-4/+7
| | | | | | | | | to something like: define void @bar(%struct.foo* noalias sret %agg.result) nounwind { instead of: define void @bar(%struct.foo* noalias sret %agg.result, ...) nounwind { llvm-svn: 67475
* don't set the name of a call instruction to "call" in release-asserts Chris Lattner2009-03-222-11/+10
| | | | | | build. This shaves another 3% off. llvm-svn: 67460
* fix CreateTempAlloca to not set a name on the alloca for temporariesChris Lattner2009-03-223-6/+11
| | | | | | | | | in release-assert builds. For automatic variables, explicitly set a name with setName that does not make a temporary std::string. This speeds up -emit-llvm-only -disable-free on PR3810 by 4.6% llvm-svn: 67459
* set function/global names with setName instead of passing the name into theChris Lattner2009-03-221-2/+4
| | | | | | | ctor function. This avoids creating a temporary std::string for the name, speeding up the testcase in PR3810 by 3.8% llvm-svn: 67457
* Fixup codegen for nested block literals so that we generateMike Stump2009-03-212-3/+5
| | | | | | copy_helpers and dispose_helpers as necessary for them. llvm-svn: 67453
* Issue error if variables are defined inside an objc class,Fariborz Jahanian2009-03-211-11/+3
| | | | | | category or protocol. llvm-svn: 67450
* now that all the decl reference and creation stuff is going through twoChris Lattner2009-03-212-41/+74
| | | | | | | very simple places, reimplement the deferred decl emission logic to not be O(N^2), fixing PR3810. llvm-svn: 67447
* fix a crash that could occur when a variable declaration became aChris Lattner2009-03-212-43/+61
| | | | | | function definition. llvm-svn: 67446
* simplify and cleanup global variable creation stuff to all go through oneChris Lattner2009-03-212-69/+74
| | | | | | code path. llvm-svn: 67445
* simplify management of llvm::Function creation to all go throughChris Lattner2009-03-212-64/+48
| | | | | | GetAddrOfFunction. This is simpler and more efficient. llvm-svn: 67444
* code cleanups, rename EmitForwardFunctionDefinition -> Chris Lattner2009-03-212-46/+47
| | | | | | | CreateFunctionPrototypeIR, though my next patch will eliminate it entirely. llvm-svn: 67443
* fix several problems with asm renaming, by pulling it into the mangling code:Chris Lattner2009-03-213-26/+18
| | | | | | | | 1. it wasn't applying to definitions, only declarations, e.g. int x __asm("foo") 2. multiple definitions were conflicting, they weren't getting merged. 3. the code was duplicated in several places. llvm-svn: 67442
* add some fixmesChris Lattner2009-03-211-10/+9
| | | | llvm-svn: 67441
* reduce redundant calls of getMangledName.Chris Lattner2009-03-211-8/+10
| | | | llvm-svn: 67440
* simplify some more code.Chris Lattner2009-03-212-28/+33
| | | | llvm-svn: 67439
* simplify and comment some code better. Make BindRuntimeGlobalsChris Lattner2009-03-213-26/+35
| | | | | | more optimistic that it will work (optimizing for the common case). llvm-svn: 67438
* random code cleanups.Chris Lattner2009-03-211-14/+12
| | | | llvm-svn: 67437
* remove obviously dead code: you can't bitcast a pointer to "Ty" (a function ↵Chris Lattner2009-03-211-5/+1
| | | | | | type). llvm-svn: 67436
* avoid making constant folding logic eliminate obviously dead bitcasts, ↵Chris Lattner2009-03-211-2/+7
| | | | | | | | speeding up PR3810 by ~2%. llvm-svn: 67434
OpenPOWER on IntegriCloud