summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/TargetInfo.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert 'Fix a typo 'iff' => 'if''. iff is an abreviation of if and only if. ↵Sylvestre Ledru2012-09-271-3/+3
| | | | | | See: http://en.wikipedia.org/wiki/If_and_only_if Commit 164766 llvm-svn: 164769
* Fix a typo 'iff' => 'if'Sylvestre Ledru2012-09-271-3/+3
| | | | llvm-svn: 164766
* Update for encapsulating the "construct*AlignmentFromInt" methods.Bill Wendling2012-09-211-1/+1
| | | | llvm-svn: 164374
* Use custom ABIInfo for le32/PNaCl argument codegenDerek Schuff2012-09-061-0/+86
| | | | | | | | | This patch uses a new ABIInfo implementation specific to the le32 target, rather than falling back to DefaultABIInfo. Its behavior is basically the same, but it also allows the regparm argument attribute. It also includes basic tests for argument codegen and attributes. llvm-svn: 163333
* Rename ANDROIDEABI to Android.Logan Chien2012-09-021-1/+2
| | | | | | | | | | | | | Most of the code guarded with ANDROIDEABI are not ARM-specific, and having no relation with arm-eabi. Thus, it will be more natural to call this environment "Android" instead of "ANDROIDEABI". Note: We are not using ANDROID because several projects are using "-DANDROID" as the conditional compilation flag. llvm-svn: 163088
* ARM: enable struct byval for AAPCS-VFP.Manman Ren2012-08-131-7/+4
| | | | | | rdar://9877866 llvm-svn: 161790
* Add comments for turning on byvalManman Ren2012-08-101-0/+2
| | | | llvm-svn: 161702
* ARM: enable struct byval for AAPCS.Manman Ren2012-08-101-3/+1
| | | | | | | rdar://9877866 PR://13350 llvm-svn: 161694
* Fix AAPCS ABI. I can't actually test this, but it restores the behavior ↵Eli Friedman2012-08-091-9/+12
| | | | | | from before r159168. PR13562. llvm-svn: 161554
* clang support for Bitrig (an OpenBSD fork); patch by David Hill.Eli Friedman2012-08-081-0/+1
| | | | llvm-svn: 161546
* Handle functions with struct arguments or return types and the regparmRafael Espindola2012-07-311-13/+91
| | | | | | | | | | | | | | attribute. It is a variation of the x86_64 ABI: * A struct returned indirectly uses the first register argument to pass the pointer. * Floats, Doubles and structs containing only one of them are not passed in registers. * Other structs are split into registers if they fit on the remaining ones. Otherwise they are passed in memory. * When a struct doesn't fit it still consumes the registers. llvm-svn: 161022
* move X86_32ABIInfo::computeInfo out of line.Rafael Espindola2012-07-241-8/+9
| | | | llvm-svn: 160652
* Make classifyReturnType and classifyArgumentType private.Rafael Espindola2012-07-231-3/+3
| | | | llvm-svn: 160648
* Add "long double" to permitted list of ARM complex homogeneous aggregates.Tim Northover2012-07-201-1/+2
| | | | | | | Under AAPCS, long double is the same as double, which means it should be allowed as part of a homogeneous aggregate. llvm-svn: 160586
* Remove get(V)BaseClassOffsetInBits, the CharUnit functions should be used ↵Benjamin Kramer2012-07-041-2/+3
| | | | | | | | instead. No functionality change. llvm-svn: 159719
* Make the following changes in the way Mips handles vector arguments and returnAkira Hatanaka2012-07-031-32/+31
| | | | | | | | | | | values: - Return integer vectors in integer registers. - Pass vector arguments in integer registers. - Set an upper bound for argument alignment. The largest alignment is 8-byte for O32 and 16-byte for N32/64. llvm-svn: 159676
* ARM: enable struct byval for APCS.Manman Ren2012-06-251-6/+10
| | | | | | Revert r136662 which disables ARM byval. llvm-svn: 159168
* Revert Decl's iterators back to pointer value_type rather than reference ↵David Blaikie2012-06-061-6/+6
| | | | | | | | | | | | | | value_type In addition, I've made the pointer and reference typedef 'void' rather than T* just so they can't get misused. I would've omitted them entirely but std::distance likes them to be there even if it doesn't use them. This rolls back r155808 and r155869. Review by Doug Gregor incorporating feedback from Chandler Carruth. llvm-svn: 158104
* Fix a bug with va_arg and vectors on Darwin x86-32. <rdar://problem/11592208>.Eli Friedman2012-06-051-2/+7
| | | | llvm-svn: 158017
* Replace PTX back-end with NVPTX back-end in all places where Clang caresJustin Holewinski2012-05-241-18/+18
| | | | | | NV_CONTRIB llvm-svn: 157403
* Teach Clang about the NVPTX backend.Peter Collingbourne2012-05-201-0/+2
| | | | llvm-svn: 157173
* Coerce byval aggregate arguments to integers whose size matches the integerAkira Hatanaka2012-05-111-35/+44
| | | | | | | register size of the target architecture. llvm-svn: 156650
* Fix handling of vector return types.Akira Hatanaka2012-05-111-1/+1
| | | | | | | A vector should be returned via the hidden pointer argument except if its size is equal to or smaller than 16-bytes and the target ABI is N32 or N64. llvm-svn: 156642
* Implement PPC64TargetCodeGenInfo.Roman Divacky2012-05-091-0/+60
| | | | llvm-svn: 156491
* Remove the ref/value inconsistency in filter_decl_iterator.David Blaikie2012-04-301-9/+9
| | | | | | | | | | | | | filter_decl_iterator had a weird mismatch where both op* and op-> returned T* making it difficult to generalize this filtering behavior into a reusable library of any kind. This change errs on the side of value, making op-> return T* and op* return T&. (reviewed by Richard Smith) llvm-svn: 155808
* Step forward with supporting of ARM homogenous aggregates:Anton Korobeynikov2012-04-131-10/+14
| | | | | | | - Handle unions - Handle C++ classes llvm-svn: 154664
* Unify naming of LangOptions variable/get function across the Clang stack ↵David Blaikie2012-03-111-4/+4
| | | | | | | | | | (Lex to AST). The member variable is always "LangOpts" and the member function is always "getLangOpts". Reviewed by Chris Lattner llvm-svn: 152536
* IRgen/ABI/x86_64: Avoid passing small structs using byval sometimes.Daniel Dunbar2012-03-101-9/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - We do this when it is easy to determine that the backend will pass them on the stack properly by itself. Currently LLVM codegen is really bad in some cases with byval, for example, on the test case here (which is derived from Sema code, which likes to pass SourceLocations around):: struct s47 { unsigned a; }; void f47(int,int,int,int,int,int,struct s47); void test47(int a, struct s47 b) { f47(a, a, a, a, a, a, b); } we used to emit code like this:: ... movl %esi, -8(%rbp) movl -8(%rbp), %ecx movl %ecx, (%rsp) ... to handle moving the struct onto the stack, which is just appalling. Now we generate:: movl %esi, (%rsp) which seems better, no? llvm-svn: 152462
* Adding support for Microsoft's thiscall calling convention. Clang side of ↵Aaron Ballman2012-02-221-9/+23
| | | | | | the patch. llvm-svn: 151122
* Whether an argument is required (in contrast with being anJohn McCall2012-02-171-16/+27
| | | | | | | | | | | | | | | | | | | | | optional argument passed through the variadic ellipsis) potentially affects how we need to lower it. Propagate this information down to the various getFunctionInfo(...) overloads on CodeGenTypes. Furthermore, rename those overloads to clarify their distinct purposes, and make sure we're calling the right one in the right place. This has a nice side-effect of making it easier to construct a function type, since the 'variadic' bit is no longer separable. This shouldn't really change anything for our existing platforms, with one minor exception --- we should now call variadic ObjC methods with the ... in the "right place" (see the test case), which I guess matters for anyone running GNUStep on MIPS. Mostly it's just a substantial clean-up. llvm-svn: 150788
* Class objects passed by value follow the same rules as structure objects.Akira Hatanaka2012-02-091-3/+6
| | | | | | | Double fields of by-value class objects should be passed in floating point registers. llvm-svn: 150200
* Fix bugs in function MipsABIInfo::returnAggregateInRegs. Functions returningAkira Hatanaka2012-02-091-14/+27
| | | | | | class objects follow the same rules as those returning struct objects. llvm-svn: 150196
* Do not return records with non trivial destructors or copy constructors inAkira Hatanaka2012-02-081-1/+1
| | | | | | registers. llvm-svn: 150035
* simplify a bunch of code to use the well-known LLVM IR types computed by ↵Chris Lattner2012-02-071-67/+31
| | | | | | CodeGenModule. llvm-svn: 149943
* Add some ABI tweaks for i386-pc-win32 triple so that we return structs in an ↵Eli Friedman2012-01-251-14/+28
| | | | | | MSVC-compatible way. Patch by Joe Groff. llvm-svn: 148992
* Make sure the integer type used to align the vaarg address is the same as theAkira Hatanaka2012-01-231-7/+9
| | | | | | type of pointers. llvm-svn: 148753
* Ignore return type if its size is zero.Akira Hatanaka2012-01-231-2/+3
| | | | llvm-svn: 148744
* More dead code removal (using -Wunreachable-code)David Blaikie2012-01-201-1/+0
| | | | llvm-svn: 148577
* Take into account the pointer to an aggregate that is passed as a hiddenAkira Hatanaka2012-01-121-2/+6
| | | | | | argument when Offset is initialized. llvm-svn: 147986
* Call CodeGenTypes::ConvertType to get LLVM::Type*.Akira Hatanaka2012-01-121-25/+4
| | | | | | Remove function MipsABIInfo::GetFloatingPointTy. llvm-svn: 147985
* Remove switch/case statements and call GetFloatingPointTy() instead to get theAkira Hatanaka2012-01-101-13/+1
| | | | | | floating point type. llvm-svn: 147894
* Flatten float complex arguments. N32/64 requires float complex arguments beAkira Hatanaka2012-01-101-4/+28
| | | | | | passed in floating point registers. llvm-svn: 147892
* Remove space.Akira Hatanaka2012-01-101-2/+2
| | | | llvm-svn: 147889
* Add support for the androideabi environment to our triple support, andChandler Carruth2012-01-101-1/+1
| | | | | | | | | | for the arm-linux-androideabi triple in particular. Also use this to do a better job of selecting soft FP settings. Patch by Evgeniy Stepanov. llvm-svn: 147872
* Contrary to the other BSDs, NetBSD followed the ELF ABI for structureJoerg Sonnenberger2012-01-101-1/+0
| | | | | | passing on i386 and does not use registers. llvm-svn: 147856
* Insert padding before unaligned long double arguments.Akira Hatanaka2012-01-091-13/+28
| | | | llvm-svn: 147791
* Add field PaddingType to ABIArgInfo which specifies the type of padding thatAkira Hatanaka2012-01-071-10/+24
| | | | | | | | is inserted before the real argument. Padding is needed to ensure the backend reads from or writes to the correct argument slots when the original alignment of a byval structure is unavailable due to flattening. llvm-svn: 147699
* Have functions return structures smaller than 128-bit in registers if ABIAkira Hatanaka2012-01-041-3/+54
| | | | | | is either N32 or N64. llvm-svn: 147520
* Hexagon backend supportTony Linthicum2011-12-121-0/+144
| | | | llvm-svn: 146413
* Minor comment update.Eli Friedman2011-12-061-1/+3
| | | | llvm-svn: 145905
OpenPOWER on IntegriCloud