summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* This patch addresses PR13948.Bill Schmidt2012-10-121-7/+25
| | | | | | | | | | | | For 64-bit PowerPC SVR4, an aggregate containing only one floating-point field (float, double, or long double) must be passed in a register as though just that field were present. This patch addresses the issue during Clang code generation by specifying in the ABIArgInfo for the argument that the underlying type is passed directly in a register. The included test case verifies flat and nested structs for the three data types. llvm-svn: 165816
* Add TargetTransformInfo to the clang driver.Nadav Rotem2012-10-111-1/+5
| | | | llvm-svn: 165741
* Fix build failure from r165722Derek Schuff2012-10-111-1/+1
| | | | llvm-svn: 165731
* Add in the first iteration of support for llvm/clang/lldb to allow variable ↵Micah Villmow2012-10-111-1/+1
| | | | | | per address space pointer sizes to be optimized correctly. llvm-svn: 165726
* Properly factor Native Client defines to support NaCl as an OSDerek Schuff2012-10-111-2/+8
| | | | | | with x86/ARM architecture llvm-svn: 165722
* Make X86_64ABIInfo clean for ABIs with 32 bit pointers, such as X32Derek Schuff2012-10-111-6/+14
| | | | | | and Native Client llvm-svn: 165715
* Add codegen support for __uuidof().Nico Weber2012-10-115-2/+103
| | | | llvm-svn: 165710
* objective-C IRgen: When sending a method to 'super'Fariborz Jahanian2012-10-101-9/+2
| | | | | | | | | in a category class method, don't read 'isa' pointer. Instead, save the desired OBJC_METACLASS_$_ClassName in __DATA,__objc_superrefs and read that without reading any isa pointers. // rdar://12459358 llvm-svn: 165674
* Rename ObjCMethodDecl::isSynthesized to isPropertyAccessor.Jordan Rose2012-10-101-3/+3
| | | | | | | | | | | | | This more accurately reflects its use: this flag is set when a method matches the getter or setter name for a property in the same class, and does not actually specify whether or not the definition of the method will be synthesized (either implicitly or explicitly with @synthesize). This renames the setter and backing field as well, and changes the (soon-to-be-obsolete?) XML dump format to use 'property_accessor' instead of 'synthesized'. llvm-svn: 165626
* Apply the same fundamental fix for PR14048 as was applied for PR11905.Chandler Carruth2012-10-101-2/+19
| | | | | | | | | | | | | | | | | | The issue arises when coercing to/from types of different sizes. We need to be certain that the allocation on either end has sufficient room for the coerced type. When it doesn't, we need to make room, copy across, and then proceed. PR11905 handled the case of storing function arguments back into allocas in the function prolog, this patch handles the case of setting up the function arguments in a call expression. This is actually significantly simpler than the fix for PR11905. It ends up being a trivial change to create a temporary alloca when the source is too small and memcpy across. This should preserve the compile-time fast-isel benefits of doing gep+load sequences and avoiding FCAs. Reviewed by Benjamin and Evgeniy (who fixed PR11905). llvm-svn: 165615
* Remove the final bits of Attributes being declared in the AttributeBill Wendling2012-10-106-58/+82
| | | | | | | namespace. Use the attribute's enum value instead. No functionality change intended. llvm-svn: 165611
* Have 'addFnAttr' take the attribute enum value. Then have it build the ↵Bill Wendling2012-10-106-21/+22
| | | | | | attribute object and add it appropriately. No functionality change. llvm-svn: 165596
* Tidy up formatting.Richard Smith2012-10-101-2/+1
| | | | llvm-svn: 165584
* -fcatch-undefined-behavior: catch a VLA bound which evalutes to a ↵Richard Smith2012-10-101-1/+18
| | | | | | non-positive value. llvm-svn: 165583
* -fcatch-undefined-behavior: store the type name directly at the end of a ↵Richard Smith2012-10-091-5/+5
| | | | | | type descriptor. 5% binary size reduction due to fewer relocations. llvm-svn: 165572
* -fcatch-undefined-behavior: emit calls to the runtime library whenever one ↵Richard Smith2012-10-098-49/+265
| | | | | | of the checks fails. llvm-svn: 165536
* We use the enums to query whether an Attributes object has that attribute. TheBill Wendling2012-10-091-1/+1
| | | | | | opaque layer is responsible for knowing where that specific attribute is stored. llvm-svn: 165489
* Move TargetData to DataLayout.Micah Villmow2012-10-0824-127/+127
| | | | llvm-svn: 165395
* Expose __builtin_bswap16.Benjamin Kramer2012-10-061-0/+1
| | | | | | | GCC has always supported this on PowerPC and 4.8 supports it on all platforms, so it's a good idea to expose it in clang too. LLVM supports this on all targets. llvm-svn: 165362
* Propagate calling convention for aliases and weakrefs.Alex Rosenberg2012-10-051-2/+3
| | | | llvm-svn: 165343
* Make sure to generate the right kind of MDNode for enum forward declarations.Eli Friedman2012-10-051-9/+22
| | | | | | PR14029, clang part. llvm-svn: 165289
* If we flow off the end of a value-returning function:Richard Smith2012-10-041-0/+14
| | | | | | | | - outside C++, return undef (behavior is not undefined unless the value is used) - in C++, with -fcatch-undefined-behavior, perform an appropriate trap - in C++, produce an 'unreachable' (behavior is undefined immediately) llvm-svn: 165273
* Fail early with a clear assert if an operation with multiple uses somehow endsLang Hames2012-10-041-0/+4
| | | | | | up being contracted during codegen. llvm-svn: 165197
* Always initialize FPContractable.Benjamin Kramer2012-10-031-0/+3
| | | | | | | false is used as a baseline here, we may want to allow contraction in some of the cases. Found by valgrind. llvm-svn: 165156
* This patch enables general varargs support for the 64-bit PPC SVR4 ABI.Bill Schmidt2012-10-031-4/+102
| | | | | | | | | | | | | | Most of the pieces for this were already in place, but a proper EmitVAArg is needed for aggregates and complex numbers to be handled. Although the va_list for 64-bit PowerPC SVR4 consists of GPRs 3 through 10 together with the overflow portion of the parameter save area, we can treat va_list as pointing to contiguous memory for all parameters, since the back end forces the parameter GPRs to memory for varargs functions. There is no need at this time to model parameters and return values beyond what the DefaultABIInfo provides. llvm-svn: 165143
* Teach getCXXRecordDeclForPointerType about references.Jordan Rose2012-10-031-8/+7
| | | | | | | | | Then, rename it getPointeeCXXRecordDecl and give it a nice doc comment, and actually use it. No intended functionality change. llvm-svn: 165077
* Add FP_CONTRACT support for clang.Lang Hames2012-10-022-4/+86
| | | | | | | | Clang will now honor the FP_CONTRACT pragma and emit LLVM fmuladd intrinsics for expressions of the form A * B + C (when they occur in a single statement). llvm-svn: 164989
* CodeGen: Copy tail padding when we're not dealing with a trivial copy assign ↵Benjamin Kramer2012-09-303-7/+25
| | | | | | | | | | or move assign operator. This fixes a regression from r162254, the optimizer has problems reasoning about the smaller memcpy as it's often not safe to widen a store but making it smaller is. llvm-svn: 164917
* Add Clang support for iOS6.Bob Wilson2012-09-291-7/+2
| | | | llvm-svn: 164907
* Add an FMA intrinsic for ARM Neon.Bob Wilson2012-09-291-0/+8
| | | | llvm-svn: 164904
* PR13941: Mark all virtual functions as unnamed_addr. It's not possible toRichard Smith2012-09-281-0/+4
| | | | | | | observe their addresses (taking their address gives the vtable slot) so we are free to merge their definitions. llvm-svn: 164864
* Add basic support for adding !tbaa.struct metadata on llvm.memcpy calls forDan Gohman2012-09-285-1/+86
| | | | | | struct assignment. llvm-svn: 164853
* Revert 'Fix a typo 'iff' => 'if''. iff is an abreviation of if and only if. ↵Sylvestre Ledru2012-09-279-19/+19
| | | | | | See: http://en.wikipedia.org/wiki/If_and_only_if Commit 164766 llvm-svn: 164769
* Fix a typo 'iff' => 'if'Sylvestre Ledru2012-09-279-19/+19
| | | | llvm-svn: 164766
* Update to new function attribute querying syntax.Bill Wendling2012-09-261-1/+1
| | | | llvm-svn: 164726
* Add codegen support for the __debugbreak intrinsic.Nico Weber2012-09-261-0/+4
| | | | llvm-svn: 164660
* When performing a ::delete of an object with a virtual destructor,John McCall2012-09-254-1/+50
| | | | | | | | | | | | | | be sure to delete the complete object pointer, not the original pointer. This is necessary if the base being deleted is at a non-zero offset in the complete object. This is only required for objects with virtual destructors because deleting an object via a base-class subobject when the base does not have a virtual destructor is undefined behavior. Noticed while reviewing the last four years of cxx-abi-dev activity. llvm-svn: 164597
* In the MS ABI, ctors return 'this'. Patch by Dmitry Sokolov.John McCall2012-09-251-12/+35
| | | | llvm-svn: 164592
* During jump-scope checking, build an ExprWithCleanups immediatelyJohn McCall2012-09-251-0/+12
| | | | | | | | | | | | into the enclosing scope; this is a more accurate model but is (I believe) unnecessary in my test case due to other flaws. However, one of those flaws is now intentional: blocks which appear in return statements can be trivially observed to not extend in lifetime past the return, and so we can allow a jump past them. Do the necessary magic in IR-generation to make this work. llvm-svn: 164589
* Mark the passed in "self" for a block as an object pointer soEric Christopher2012-09-211-3/+9
| | | | | | | | | that the backend can mark it as the representative pointer for the block. rdar://12001329 llvm-svn: 164418
* Call CGM.SetLLVMFunctionAttributesForDefinition on thunks so that they getRafael Espindola2012-09-211-0/+2
| | | | | | | attributes like uwtable. Without uwtable a stack unwinder would be unable to go past the thunks. llvm-svn: 164411
* Update for encapsulating the "construct*AlignmentFromInt" methods.Bill Wendling2012-09-212-2/+2
| | | | llvm-svn: 164374
* ARM: Use a dedicated intrinsic for vector bitwise select.Jim Grosbach2012-09-211-0/+4
| | | | | | | | | | | The expression based expansion too often results in IR level optimizations splitting the intermediate values into separate basic blocks, preventing the formation of the VBSL instruction as the code author intended. In particular, LICM would often hoist part of the computation out of a loop. rdar://11011471 llvm-svn: 164342
* Tidy up. Trailing whitespace and 80 columns.Jim Grosbach2012-09-211-67/+69
| | | | llvm-svn: 164341
* Grammar.Eric Christopher2012-09-191-1/+1
| | | | llvm-svn: 164260
* Update and expand comment.Eric Christopher2012-09-191-2/+4
| | | | llvm-svn: 164254
* Handle a captured this for the debug information as well.Eric Christopher2012-09-191-0/+10
| | | | llvm-svn: 164253
* Fix awkward comment.Eric Christopher2012-09-191-1/+1
| | | | llvm-svn: 164252
* Update clang for API change.Benjamin Kramer2012-09-191-1/+3
| | | | llvm-svn: 164218
* Use LLVM_DELETED_FUNCTION in place of 'DO NOT IMPLEMENT' comments.Dmitri Gribenko2012-09-153-10/+10
| | | | llvm-svn: 163983
OpenPOWER on IntegriCloud