summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Rename CGVtable files to CGVTables.Anders Carlsson2010-04-085-5/+5
| | | | llvm-svn: 100778
* Clarify an assert.Anders Carlsson2010-04-081-0/+3
| | | | llvm-svn: 100776
* Unbreak the buildDouglas Gregor2010-04-081-1/+2
| | | | llvm-svn: 100775
* Eliminate excessive PCH deserialization caused by the search forDouglas Gregor2010-04-083-36/+12
| | | | | | | | | | | | | | | | | | | | | | __cxxabiv1::__fundamental_type_info in every translation unit. Previously, we would perform name lookup for __cxxabiv1::__fundamental_type_info at the end of IRGen for a each translation unit, to determine whether it was present. If so, we we produce type information for all of the fundamental types. However, this name lookup causes PCH deserialization of a significant part of the translation unit, which has a woeful impact on performance. With this change, we now look at each record type after we've generated its vtable to see if it is __cxxabiv1::__fundamental_type_info. If so, we generate type info for all of the fundamental types. This works because __cxxabiv1::__fundamental_type_info should always have a key function (typically the virtual destructor), that will be defined once in the support library. The fundamental type information will end up there. Fixes <rdar://problem/7840011>. llvm-svn: 100772
* IRgen: Move the bit-field access type into CGBitFieldInfo, and change ↵Daniel Dunbar2010-04-085-27/+39
| | | | | | bit-field LValues to just store the base address of object containing the bit-field. llvm-svn: 100745
* @llvm.sqrt isn't really close enough to C's sqrt to justify emitting callsJohn McCall2010-04-071-7/+6
| | | | | | | | to the intrinsic, even when math-errno is off. Fixes rdar://problem/7828230 by falling back on the library function. llvm-svn: 100613
* a ridiculous amount of propagation through the backend later, Chris Lattner2010-04-071-2/+9
| | | | | | | | | | | | | | | | have the code generate slap a srcloc metadata on inline asm nodes. This allows us to diagnose invalid inline asms with such nice diagnostics as: <inline asm>:1:2: error: unrecognized instruction abc incl %eax ^ asm.c:2:12: note: generated from here __asm__ ("abc incl %0" : "+r" (X)); ^ 2 diagnostics generated. llvm-svn: 100608
* fit in 80 colsChris Lattner2010-04-061-2/+3
| | | | llvm-svn: 100534
* IRgen: Move BitFieldIsSigned bit into CGBitFieldInfo.Daniel Dunbar2010-04-065-23/+22
| | | | llvm-svn: 100513
* Simplify.Daniel Dunbar2010-04-061-28/+11
| | | | llvm-svn: 100512
* Simplify.Daniel Dunbar2010-04-061-6/+2
| | | | llvm-svn: 100511
* IRgen: Move BitField LValues to just hold a reference to the CGBitFieldInfo.Daniel Dunbar2010-04-055-43/+52
| | | | | | | | | - Unfortunately, this requires some horrible code in CGObjCMac which always allocats a CGBitFieldInfo because we don't currently build a proper layout for Objective-C classes. It needs to be cleaned up, but I don't want the bit-field cleanups to be blocked on that. llvm-svn: 100474
* Emit debug info for objc getters and setters.Devang Patel2010-04-052-4/+7
| | | | llvm-svn: 100462
* IRgen: Lift BitFieldInfo to CGBitFieldInfo at namespace level.Daniel Dunbar2010-04-054-18/+16
| | | | llvm-svn: 100433
* Add a FIXME and reduce nesting.Daniel Dunbar2010-04-051-18/+16
| | | | llvm-svn: 100432
* Reapply patch for adding support for address spaces and added a isVolatile ↵Mon P Wang2010-04-046-48/+89
| | | | | | field to memcpy, memmove, and memset. llvm-svn: 100305
* Don't produce a vtable for a class if we have an explicit template ↵Rafael Espindola2010-04-031-2/+7
| | | | | | | | instantiation declaration and no key function. We will produce the vtable at the explicit template instantiation. Fixes PR6748 llvm-svn: 100266
* IRgen/NeXT: Remove my refactoring-enabling asserts, and add a FIXME.Daniel Dunbar2010-04-021-12/+3
| | | | llvm-svn: 100237
* IRgen/Obj-C: Eliminate FindIvarInterface, now that ivar's are in the right ↵Daniel Dunbar2010-04-021-43/+25
| | | | | | | | DeclContexts (-2 FIXMEs). We still have an annoying linear scan + hidden dependency on how Obj-C layout is done. - This is also an algorithmic improvement in IRgen for Obj-C, although it probably doesn't matter in practice. llvm-svn: 100228
* NewDebugLoc got renamed to DebugLoc.Chris Lattner2010-04-021-5/+5
| | | | llvm-svn: 100219
* Revert r100193 since it causes failures in objc in clangMon P Wang2010-04-026-89/+44
| | | | llvm-svn: 100200
* Rework our handling of copy construction of temporaries, which was aDouglas Gregor2010-04-021-17/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | poor (and wrong) approximation of the actual rules governing when to build a copy and when it can be elided. The correct implementation is actually simpler than the approximation. When we only enumerate constructors as part of initialization (e.g., for direct initialization or when we're copying from a class type or one of its derived classes), we don't create a copy. When we enumerate all conversion functions, we do create a copy. Before, we created some extra copies and missed some others. The new test copy-initialization.cpp shows a case where we missed creating a (required, non-elidable) copy as part of a user-defined conversion, which resulted in a miscompile. This commit also fixes PR6757, where the missing copy made us reject well-formed code in the ternary operator. This commit also cleans up our handling of copy elision in the case where we create an extra copy of a temporary object, which became necessary now that we produce the right copies. The code that seeks to find the temporary object being copied has moved into Expr::getTemporaryObject(); it used to have two different not-quite-the-same implementations, one in Sema and one in CodeGen. Note that we still do not attempt to perform the named return value optimization, so we miss copy elisions for return values and throw expressions. llvm-svn: 100196
* Reapply patch for adding support for address spaces and added a isVolatile ↵Mon P Wang2010-04-026-44/+89
| | | | | | field to memcpy, memmove, and memset. llvm-svn: 100193
* CG/NeXT: Assert some invariants on an ivar's containing decl context that I ↵Daniel Dunbar2010-04-021-0/+13
| | | | | | am about to refactor based on, following some testing. llvm-svn: 100188
* adjust to IRBuilder change and use faster DebugLoc apis.Chris Lattner2010-04-012-21/+11
| | | | llvm-svn: 100093
* Extend DependentNameType with a keyword enum that specifies whetherDouglas Gregor2010-03-311-2/+3
| | | | | | | this was parsed as a typename-specifier, elaborated-type-specifier (including the kind), or just a dependent qualified type name. llvm-svn: 100039
* Rename TypenameType to DependentNameType in anticipation of someDouglas Gregor2010-03-311-2/+2
| | | | | | refactoring work in this area. llvm-svn: 100019
* Minor include pruning.Benjamin Kramer2010-03-318-7/+1
| | | | llvm-svn: 100007
* use the new optimized debug info metadata accessors. InChris Lattner2010-03-312-4/+4
| | | | | | | | addition to the inherent win, this eliminates the pointless cost of going through the name -> mdkind stringmap that we were paying. llvm-svn: 99983
* IRGen: Move the auxiliary data structures tracking AST -> LLVM mappings out ↵Daniel Dunbar2010-03-317-76/+75
| | | | | | | | of CodeGenTypes, to per-record CGRecordLayout structures. - I did a cursory check that this was perf neutral, FWIW. llvm-svn: 99978
* CGRecordLayoutBuilder: Switch unions to use same mechanism for tracking ↵Daniel Dunbar2010-03-311-3/+4
| | | | | | | | field and bit-field info as structs. - Anders, please check. llvm-svn: 99977
* Drastically simplify the computation of linkage for typeinfo by usingDouglas Gregor2010-03-311-75/+12
| | | | | | | | the existing (and already well-tested) linkage computation for types, with minor tweaks for dynamic classes and (pointers to) incomplete types. Fixes PR6597. llvm-svn: 99968
* IRGen: Hide CGRecordLayoutBuilder class, because I can.Daniel Dunbar2010-03-315-181/+145
| | | | llvm-svn: 99967
* Introduce a new kind of derived-to-base cast which bypasses the need forJohn McCall2010-03-302-0/+5
| | | | | | | null checks, and make sure we elide null checks when accessing base class members. llvm-svn: 99963
* Revert Mon Ping's 99930 due to broken llvm-gcc buildbots.Bob Wilson2010-03-306-89/+48
| | | | llvm-svn: 99949
* IRGen: Narrow getCGRecordLayout type.Daniel Dunbar2010-03-302-2/+2
| | | | llvm-svn: 99946
* IRgen: Move CGRecordLayout to its own happy little file.Daniel Dunbar2010-03-305-30/+52
| | | | llvm-svn: 99945
* Minor formatting/FIXME cleanups.Daniel Dunbar2010-03-303-5/+2
| | | | llvm-svn: 99944
* Remember the regparm attribute in FunctionType::ExtInfo.Rafael Espindola2010-03-302-11/+14
| | | | | | Fixes PR3782. llvm-svn: 99940
* Added support for address spaces and added a isVolatile field to memcpy, ↵Mon P Wang2010-03-306-48/+89
| | | | | | memmove, and memset llvm-svn: 99930
* the big refactoring bits of PR3782.Rafael Espindola2010-03-3011-57/+55
| | | | | | | | This introduces FunctionType::ExtInfo to hold the calling convention and the noreturn attribute. The next patch will extend it to include the regparm attribute and fix the bug. llvm-svn: 99920
* Don't produce a vtable if we are just instantiating a method and theRafael Espindola2010-03-301-3/+12
| | | | | | | | class has no key function. Fix PR6738. llvm-svn: 99900
* Replace some constant-sized SmallVectors.Benjamin Kramer2010-03-302-14/+11
| | | | llvm-svn: 99884
* Remove the old vtable layout code.Anders Carlsson2010-03-308-1360/+0
| | | | llvm-svn: 99869
* Remove UseNewVTableCode checks.Anders Carlsson2010-03-302-44/+7
| | | | llvm-svn: 99868
* Use the new function in EmitClassAggrMemberwiseCopy, fixing the same assert ↵Anders Carlsson2010-03-301-15/+2
| | | | | | as seen in PR6628 but for arrays this time. llvm-svn: 99867
* Factor emitting a call to a copy constructor out into a separate function.Anders Carlsson2010-03-302-43/+57
| | | | llvm-svn: 99866
* Introduce a CXXTemporariesCleanupScope RAII object and use it to cleanup the ↵Anders Carlsson2010-03-303-33/+49
| | | | | | temporaries code. llvm-svn: 99865
* Handle default arguments when calling copy constructors for bases or members ↵Anders Carlsson2010-03-301-0/+20
| | | | | | when synthesizing a copy constructor. Fixes PR6628. llvm-svn: 99864
* Flip the switch and use the new vtable layout code for everything. I've ↵Anders Carlsson2010-03-301-1/+1
| | | | | | verified that this passes a self-host but I'll let the bots self host as well before removing the now dead code. llvm-svn: 99861
OpenPOWER on IntegriCloud