summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Make __builtin_shufflevector and -ftrapv work correctly together. PR9945.Eli Friedman2011-05-191-11/+5
| | | | llvm-svn: 131611
* Add ARMTargetCodeGenInfo::initDwarfEHRegSizeTable() defining 16 32bit regs.Roman Divacky2011-05-181-0/+16
| | | | llvm-svn: 131558
* Conditionalize the use of 4.4 or 4.2 format based on the target.Bill Wendling2011-05-171-4/+6
| | | | | | <rdar://problem/8107317> llvm-svn: 131504
* Code cleanup of my last patch.Fariborz Jahanian2011-05-171-13/+8
| | | | llvm-svn: 131499
* Patch to fix IR-gen crash generating structure ABI which implementsFariborz Jahanian2011-05-174-16/+35
| | | | | | | user specified string class via -fconstant-string-class option. pr9914. llvm-svn: 131496
* For calls returning first-class aggregates, store by element instead of ↵Eli Friedman2011-05-171-2/+25
| | | | | | creating aggregate stores in common cases. This is more friendly to fast-isel. llvm-svn: 131490
* Revert r131434, my commit disabling the complete-object constructorJohn McCall2011-05-171-2/+1
| | | | | | | optimization for abstract classes; there was a misunderstanding, and it turns out that there are no kexts which rely on this. llvm-svn: 131489
* Revert r131447, see if it fixes the buildbot.Argyrios Kyrtzidis2011-05-171-2/+5
| | | | llvm-svn: 131450
* Inside isEmptyRecord function, for CXXRecordDecl just check the isEmpty bit.Argyrios Kyrtzidis2011-05-171-5/+2
| | | | llvm-svn: 131447
* Set up appropriate context for member function.Devang Patel2011-05-171-0/+3
| | | | | | Radar 9440721 llvm-svn: 131441
* Fix crash on C++ code when compiling with -finstrument-functions.Ted Kremenek2011-05-161-1/+1
| | | | llvm-svn: 131435
* Emit complete-object constructors for abstract classes in kext mode forJohn McCall2011-05-161-1/+2
| | | | | | reasons that honestly really, really need to be looked into. llvm-svn: 131434
* Fix another regression from the "skip vtable pointer initialization"Anders Carlsson2011-05-163-2/+4
| | | | | | | optimization. Make sure to require a vtable when trying to get the address of a VTT, otherwise we would never end up emitting the VTT. llvm-svn: 131400
* Don't actually emit calls to the reserved global placement new and deleteJohn McCall2011-05-161-28/+18
| | | | | | | | | operators; their semantics are guaranteed by the language. If someone wants to argue that freestanding compiles shouldn't recognize this, I might be convinceable. llvm-svn: 131395
* Re-enable the fix for PR9181 now that all the edge cases are handled.Anders Carlsson2011-05-151-18/+70
| | | | llvm-svn: 131385
* The array-size operand to a new-expression is not necessarily a size_t.John McCall2011-05-151-140/+209
| | | | | | | It can be larger, it can be smaller, it can be signed, whatever. Handle all the crazy cases with grace and spirit. llvm-svn: 131378
* Make CGF.getContext() inlinable, because it's trivial, and optimizeJohn McCall2011-05-152-8/+36
| | | | | | hasAggregateLLVMType. llvm-svn: 131375
* More killing of std::vector.John McCall2011-05-152-40/+41
| | | | llvm-svn: 131374
* Use arrays and SmallVectors instead of std::vectors when building functionJohn McCall2011-05-155-193/+148
| | | | | | | types. Also, cache a translation of 'void' in CGM and provide a ptrdiff_t alias. No functionality change. llvm-svn: 131373
* Disable the optimization until the bug noticed by Sean Hunt has been fixed.Anders Carlsson2011-05-151-0/+4
| | | | llvm-svn: 131372
* When emitting the destructor for a class with a vtable, if we can determineAnders Carlsson2011-05-142-13/+35
| | | | | | | | | | that the destructor body is trivial and that all member variables also have either trivial destructors or trivial destructor bodies, we don't need to initialize the vtable pointers since no virtual member functions will be called on the destructor. Fixes PR9181. llvm-svn: 131368
* Only perform the null-initialization of an aggregate result of a messageJohn McCall2011-05-141-16/+50
| | | | | | | | | send if the receiver is null. Normally it's not worthwhile to check this, but avoiding the null-initialization is nice, and this also avoids nasty problems where the null-initialization is visible within the call because we use an aliased result buffer. rdar://problem/9402992 llvm-svn: 131366
* Objective-C vtables are not taking the world by storm; call themJohn McCall2011-05-141-121/+139
| | | | | | | | | out as "v-table" message sends and stop calling normal messages "legacy" message sends. Also, fix some comments to reveal the true state of affairs. llvm-svn: 131335
* Reorganize this method to avoid multiple calls for computing CGFunctionInfoJohn McCall2011-05-131-77/+109
| | | | | | and to decrease the amount of effort in appending strings. llvm-svn: 131323
* SimplifyJoerg Sonnenberger2011-05-131-1/+1
| | | | llvm-svn: 131321
* Bug 8765: Honor assembler labels for builtins. Ensure that the label isJoerg Sonnenberger2011-05-131-4/+14
| | | | | | | mangled to avoid doing it twice for platforms that use prefixes like Darwin. llvm-svn: 131311
* Remove the 'unaligned load' builtins now that they're no longer used in the ↵Bill Wendling2011-05-131-13/+0
| | | | | | *mmintrin.h files. llvm-svn: 131300
* Produce UTF-8 strings with -fconstant-string-classFariborz Jahanian2011-05-131-21/+15
| | | | | | -fno-constant-cfstrings. Patch by Jonathan Schleifer. llvm-svn: 131298
* When determining whether we can make a declaration into a globalDouglas Gregor2011-05-132-19/+4
| | | | | | | constant, also consider whether it's a class type that has any mutable fields. If so, it can't be a global constant. llvm-svn: 131276
* Doug convinced me that DW_AT_APPLE_objc_complete_type is more appropriate name.Devang Patel2011-05-121-1/+1
| | | | | | s/DW_AT_APPLE_objc_class_extension/DW_AT_APPLE_objc_complete_type/g llvm-svn: 131245
* Do not add AT_APPLE_objc_class_extension attribute if @implementation is not ↵Devang Patel2011-05-121-2/+1
| | | | | | seen. llvm-svn: 131242
* Use DW_AT_APPLE_objc_class_extension attribute to identify interfaces that ↵Devang Patel2011-05-121-1/+6
| | | | | | | | represent class extension. Radar 9423077. llvm-svn: 131239
* LLVM doesn't always optimize away the four loads from this:Bill Wendling2011-05-121-0/+2
| | | | | | | | | | (__m128){ p[0], p[1], p[2], p[3] } which produces really bad code. This could be done in instcombine, but it's probably better to do it in the front-end instead. <rdar://problem/9424836> llvm-svn: 131237
* Make this code more resilient against catch variables which need cleanups.John McCall2011-05-121-3/+4
| | | | llvm-svn: 131215
* Rename "hasTrivialConstructor" to "hasTrivialDefaultConstructor" andAlexis Hunt2011-05-093-3/+3
| | | | | | | modify the semantics slightly to accomodate default constructors (I hope). llvm-svn: 131087
* Move code to emit the callee of an CXXOperatorCallExpr out into a separate ↵Anders Carlsson2011-05-083-12/+137
| | | | | | function in CGClass.cpp llvm-svn: 131075
* Don't emit complete constructors for abstract classes. Also, don't emitAnders Carlsson2011-05-081-2/+9
| | | | | | | complete destructors for abstract classes unless the destructor is virtual and thus needs to be in the vtable. llvm-svn: 131068
* In C++, allow us to emit a global as 'constant' even if it has classDouglas Gregor2011-05-071-7/+10
| | | | | | | type, so long as it is known to have a constant initializer and the class type is a POD class. Fixes <rdar://problem/9306265>. llvm-svn: 131060
* Revert r130717, which caused a regression (<rdar://problem/9402621>).Douglas Gregor2011-05-072-18/+4
| | | | llvm-svn: 131057
* Fix false positive warning about uninitialized variable.Cameron Esfahani2011-05-061-1/+1
| | | | llvm-svn: 131019
* Modify some deleted function methods to better reflect reality:Alexis Hunt2011-05-062-3/+3
| | | | | | | | | | | | | | | | | | | | - New isDefined() function checks for deletedness - isThisDeclarationADefinition checks for deletedness - New doesThisDeclarationHaveABody() does what isThisDeclarationADefinition() used to do - The IsDeleted bit is not propagated across redeclarations - isDeleted() now checks the canoncial declaration - New isDeletedAsWritten() does what it says on the tin. - isUserProvided() now correct (thanks Richard!) This fixes the bug that we weren't catching void foo() = delete; void foo() {} as being a redefinition. llvm-svn: 131013
* Don't emit nsw flags for vector operations; there's basically no benefit, ↵Eli Friedman2011-05-061-7/+4
| | | | | | and a lot of downside (like PR9850, which is about clang's xmmintrin.h making an unexpected transformation on an expression involving _mm_add_epi32). llvm-svn: 131000
* Add an implementation of thunks for varargs methods. The implementation is ↵Eli Friedman2011-05-063-46/+153
| | | | | | a bit messy, but it is correct as long as the method in question doesn't use indirect gotos. A couple of possible alternative implementations are outlined in FIXME's in this patch. rdar://problem/8077308 . llvm-svn: 130993
* Reset the emitted initializers.Axel Naumann2011-05-061-0/+2
| | | | | | This enables incremental codegen, where the initializer array can be removed from the module, such that only new initializers will be emitted and run. llvm-svn: 130986
* type of last arg of objc_assign_ivar is ptrdiff_t. Fariborz Jahanian2011-05-051-1/+5
| | | | | | // rdar://9362887 llvm-svn: 130956
* Implement support for C++0x alias templates.Richard Smith2011-05-052-0/+2
| | | | llvm-svn: 130953
* Do not drop uint128 on the floor.Devang Patel2011-05-051-0/+2
| | | | llvm-svn: 130929
* Preserve the full name of the file, so that '-c -o foo.pic.o' producesNick Lewycky2011-05-052-8/+8
| | | | | | foo.pic.gcno instead of foo.gcno. llvm-svn: 130899
* Pack ivar offsets together.Bill Wendling2011-05-041-1/+1
| | | | | | | | | | Ivar offsets for synthesized ivars are wrong, which could end up with a large number of dirty pages because of ivar fixups at runtime. When we pack all of the synthesized ivars into the same section, it limits the number of dirty pages created. Place them in the "__DATA,__objc_ivar" section. <rdar://problem/9374905> llvm-svn: 130870
* Record where the GCOV data files should be placed.Nick Lewycky2011-05-042-0/+24
| | | | llvm-svn: 130866
OpenPOWER on IntegriCloud