summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* Add support for the common and nocommon attributes.Eric Christopher2010-12-021-1/+3
| | | | | | rdar://8560647 llvm-svn: 120650
* Enhance the init generation logic to emit a memset followed by a few stores whenChris Lattner2010-12-021-6/+41
| | | | | | | | | | | | | | | | | | | | | | | | | a global is larger than 32 bytes and has fewer than 6 non-zero values in the initializer. Previously we'd turn something like this: char test8(int X) { char str[10000] = "abc"; into a 10K global variable which we then memcpy'd from. Now we generate: %str = alloca [10000 x i8], align 16 %tmp = getelementptr inbounds [10000 x i8]* %str, i64 0, i64 0 call void @llvm.memset.p0i8.i64(i8* %tmp, i8 0, i64 10000, i32 16, i1 false) store i8 97, i8* %tmp, align 16 %0 = getelementptr [10000 x i8]* %str, i64 0, i64 1 store i8 98, i8* %0, align 1 %1 = getelementptr [10000 x i8]* %str, i64 0, i64 2 store i8 99, i8* %1, align 2 Which is much smaller in space and also likely faster. This is part of PR279 llvm-svn: 120645
* Simplify the ASTs by consolidating ObjCImplicitGetterSetterExpr and ↵John McCall2010-12-029-113/+70
| | | | | | | | ObjCPropertyRefExpr into the latter. llvm-svn: 120643
* Restore the lvalue-to-rvalue conversion patch with a minimal fix.John McCall2010-12-013-6/+44
| | | | llvm-svn: 120555
* add some infrastructure that will let us codegenChris Lattner2010-12-011-6/+67
| | | | | | | | http://llvm.org/bugs/show_bug.cgi?id=279#c3 better. No functionality change yet. llvm-svn: 120530
* get some i32/i8/i1 constants from Builder, which is much less painful thanChris Lattner2010-12-011-18/+9
| | | | | | using ConstantInt::get. llvm-svn: 120527
* A CGRecordLayout object persists. Since its contained types mayJohn McCall2010-11-301-4/+5
| | | | | | | refer to opaque types, they must be held via PATypeHolders. I'm not sure why this hasn't blown up before. llvm-svn: 120491
* CGRecordLayoutBuilder does not need to be exported from this module.John McCall2010-11-301-3/+1
| | | | llvm-svn: 120489
* Declaring local static in global blockFariborz Jahanian2010-11-301-3/+13
| | | | | | | literal declaration caused crash in CodeGen. This patch fixes it. pr8707 llvm-svn: 120486
* L-value to r-value conversion is not ready for prime-time.John McCall2010-11-303-44/+6
| | | | llvm-svn: 120433
* Introduce an r-value to l-value cast kind. I'm not promising anythingJohn McCall2010-11-303-6/+44
| | | | | | about the reliability of this yet. llvm-svn: 120422
* Harden CGDebugInfo::CreateType() a bit for cases where we couldn't generate ↵Douglas Gregor2010-11-301-1/+9
| | | | | | type info for its component types llvm-svn: 120401
* Merge System into Support.Michael J. Spencer2010-11-291-1/+1
| | | | llvm-svn: 120297
* Don't store the maximum alignment, we can trivially compute it.Anders Carlsson2010-11-281-12/+21
| | | | llvm-svn: 120268
* More work on laying out virtual bases.Anders Carlsson2010-11-281-9/+46
| | | | llvm-svn: 120257
* BuildVirtualCall doesn't need to take a reference to a pointer.Anders Carlsson2010-11-282-2/+2
| | | | llvm-svn: 120252
* Make the destructor be the 'vtable anchor' of the CGCXXABI class.Anders Carlsson2010-11-282-4/+2
| | | | llvm-svn: 120251
* Move CGCXXABI functions to CGCXXABI.cppAnders Carlsson2010-11-282-157/+155
| | | | llvm-svn: 120250
* Add a CGCXXABI.cpp file.Anders Carlsson2010-11-282-0/+19
| | | | llvm-svn: 120249
* Hide a bunch of symbols.Benjamin Kramer2010-11-252-27/+27
| | | | llvm-svn: 120153
* Begin work on actually laying out virtual bases.Anders Carlsson2010-11-251-1/+32
| | | | llvm-svn: 120140
* Rename RecordLayout::getPrimaryBaseWasVirtual to isPrimaryBaseVirtual.Anders Carlsson2010-11-244-10/+10
| | | | llvm-svn: 120133
* Move code off the primary base info iterator. No functionality change.Anders Carlsson2010-11-241-4/+14
| | | | llvm-svn: 120132
* Add CXXRecordDecl::getIndirectPrimaryBases.Anders Carlsson2010-11-241-1/+6
| | | | llvm-svn: 120129
* Simplify code.Anders Carlsson2010-11-241-4/+2
| | | | llvm-svn: 120118
* Fix a (probably very old) regression where we weren't using the typedef name ↵Anders Carlsson2010-11-241-6/+5
| | | | | | for anonymous tag types. llvm-svn: 120113
* Revert r120110. We don't want to call ConvertType from within getCGRecordLayout.Anders Carlsson2010-11-241-7/+5
| | | | llvm-svn: 120112
* Use ConvertType instead of ConvertTagDeclType, since ConvertType will assign ↵Anders Carlsson2010-11-241-3/+5
| | | | | | a name to the type. llvm-svn: 120110
* Simplify code.Anders Carlsson2010-11-242-20/+2
| | | | llvm-svn: 120109
* Fix build.Anders Carlsson2010-11-241-1/+2
| | | | llvm-svn: 120108
* Make CodeGenTypes::getCGRecordLayout compute the layout lazily if it doesn't ↵Anders Carlsson2010-11-242-1/+9
| | | | | | exist. This matches ASTContext::getASTRecordLayout and is less confusing. llvm-svn: 120107
* CGRecordLayout types are always struct types.Anders Carlsson2010-11-242-11/+11
| | | | llvm-svn: 120106
* Switch a lot of call-sites over to using the new value-kind calculations.John McCall2010-11-242-8/+8
| | | | llvm-svn: 120084
* Refactor the null-initialization for record types and make it handle bases ↵Anders Carlsson2010-11-221-75/+85
| | | | | | that aren't i8 arrays. llvm-svn: 119980
* Remove FIXME; we don't ever want to lay out empty bases.Anders Carlsson2010-11-221-7/+6
| | | | llvm-svn: 119957
* Rename BaseLLVMType to NonVirtualBaseLLVMType.Anders Carlsson2010-11-212-7/+8
| | | | llvm-svn: 119956
* Add getCGRecordLayout helper function. No functionality change.Anders Carlsson2010-11-211-6/+13
| | | | llvm-svn: 119955
* Fix warning: enumeration value 'IndirectField' not handled in switch.Francois Pichet2010-11-211-0/+1
| | | | llvm-svn: 119924
* Minor cleanup. No change otherwise.Fariborz Jahanian2010-11-191-2/+4
| | | | llvm-svn: 119814
* Fix a bug where write-barriers for assignment through referenceFariborz Jahanian2010-11-181-1/+1
| | | | | | | types was not being generated for objc pointers. // rdar://8681766. llvm-svn: 119751
* Refactoring of Diagnostic class.Argyrios Kyrtzidis2010-11-183-8/+5
| | | | | | | | | | | -Move the stuff of Diagnostic related to creating/querying diagnostic IDs into a new DiagnosticIDs class. -DiagnosticIDs can be shared among multiple Diagnostics for multiple translation units. -The rest of the state in Diagnostic object is considered related and tied to one translation unit. -Have Diagnostic point to the SourceManager that is related with. Diagnostic can now accept just a SourceLocation instead of a FullSourceLoc. -Reflect the changes to various interfaces. llvm-svn: 119730
* Calculate the value kind of an expression when it's created andJohn McCall2010-11-182-18/+18
| | | | | | | | | | | | | store it on the expression node. Also store an "object kind", which distinguishes ordinary "addressed" l-values (like variable references and pointer dereferences) and bitfield, @property, and vector-component l-values. Currently we're not using these for much, but I aim to switch pretty much everything calculating l-valueness over to them. For now they shouldn't necessarily be trusted. llvm-svn: 119685
* comparison of AltiVec vectors now gives bool result (fix for 7533)Anton Yartsev2010-11-181-0/+108
| | | | llvm-svn: 119678
* When forming the !srcloc mdnode for an inline asm, add the SourceLocations Chris Lattner2010-11-171-4/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of all the lines of the inline asm. With the refactoring and enhancement of the backend, we can now reports errors on the correct source line when an asm contains multiple lines of text. For something like this: void foo() { asm("push %rax\n" ".code32\n"); } we used to get this: (note that the line 4 in t.c isn't helpful) t.c:4:7: error: warning: ignoring directive for now asm("push %rax\n" ^ <inline asm>:2:1: note: instantiated into assembly here .code32 ^ now we get: t.c:5:8: error: warning: ignoring directive for now ".code32\n" ^ <inline asm>:2:1: note: instantiated into assembly here .code32 ^ Note that we're pointing to line 5 properly now. This implements rdar://7839391 - inline asm errors should point to the right line in the asm and makes the error message in PR8595 much less confusing. llvm-svn: 119489
* adjust for llvm mainline, yay type safetyChris Lattner2010-11-171-3/+3
| | | | llvm-svn: 119487
* factor some code out to a helper function, no functionality change.Chris Lattner2010-11-171-4/+10
| | | | llvm-svn: 119464
* Fixes synthesis of type for the object which holds info.Fariborz Jahanian2010-11-172-4/+4
| | | | | | about a __block cxx object. llvm-svn: 119411
* Reset the lifetime-managed flag between emission of the agg conditionalJohn McCall2010-11-172-4/+10
| | | | | | branches. Fixes PR8623. llvm-svn: 119408
* Support compound complex operations as l-values in C++. Add a testJohn McCall2010-11-163-5/+39
| | | | | | | case based on CodeGen/volatile-1.c which tests the current C++ semantics, and note the many, many places we fall short of them. llvm-svn: 119402
* Implements __block API for c++ objects. There is stillFariborz Jahanian2010-11-162-10/+43
| | | | | | | issue with runtime which I am discussing it with Blaine. This is wip (so no test yet). llvm-svn: 119368
OpenPOWER on IntegriCloud