aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/TargetABIInfo.cpp
AgeCommit message (Collapse)Author
2010-01-10Rename file to generalization in next commitsAnton Korobeynikov
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93117 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-22x86_64: Structures with no fields but which have padding should be classified asDaniel Dunbar
integer. - This is consistent, but may not be correct. I will revisit x86_64 ABI handling for C++ as a whole at some point. - PR5831. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91874 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-03Convert ABIArgInfo::dump to raw_ostream.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90440 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-22x86_64, PR5582: Layout bases for C++ records.Daniel Dunbar
- Ideally we would have an single iteration interface for this, but this works for now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89632 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-09Rename areAllFields32Or64BitBasicType to canExpandIndirectArgument to closer ↵Daniel Dunbar
match what it is semantically used for. Also, fix a major bug where fields from a C++ struct might be dropped -- the expand action doesn't handle them correctly yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86502 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-21Add AuroraUX ABI Triple in correct place.Edward O'Callaghan
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84758 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-20Fix the 32-bit ABI to return structures with non-trivial copy ctors or dtors ↵Anders Carlsson
indirectly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84686 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-20Add missing semi-colon.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84650 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-20Bring Darwin into the switch-case statement instead of its own if for ↵Edward O'Callaghan
readability. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84646 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-13Simplify pointer creation with the new Type::getInt*Ptr methods.Benjamin Kramer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83964 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-26Use ABIArgInfo::getDirect() for all types that have a pointer representation.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82845 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-24Darwin/x86-32: Enumerated types and block pointer types in structures were notDaniel Dunbar
handled correctly. - <rdar://problem/7247671> Function arguments incorrect when function returns a struct on i386 w/ llvm-g++ and clang git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82681 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-21Change all the Type::getAsFoo() methods to specializations of Type::getAs().John McCall
Several of the existing methods were identical to their respective specializations, and so have been removed entirely. Several more 'leaf' optimizations were introduced. The getAsFoo() methods which imposed extra conditions, like getAsObjCInterfacePointerType(), have been left in place. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82501 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-16x86-64 ABI: If a type is a C++ record with either a non-trivial destructor ↵Anders Carlsson
or a non-trivial copy constructor, it should be passed in a pointer. Daniel, plz review. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82050 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-14ARM/[A]APCS: Ignore empty records passed as arguments.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81798 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-14ARM/APCS: Don't treat structs w/ floating point types as "integer like".Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81748 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-14Some minor clang/ARM/AAPCS tweaks.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81737 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-14Add TargetInfo::getABI(), and base ARM APCS vs AAPCS choice on that.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81735 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-13ARM/APCS: Only "integer like" aggregates should be returned in r0 (followingDaniel Dunbar
gcc's interpretation of APCS' somewhat loose specification). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81671 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-12Stub out room for ARM APCS ABI implementation (and AAPCS_VFP, although you can'tDaniel Dunbar
hit this via command line options yet). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81595 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-12Formatting fixes.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81594 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-11Swizzle the target triple based on -mthumb, and update clang-cc to recognizeDaniel Dunbar
thumb-foo-bar as an ARM target. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81497 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-09Remove tabs, and whitespace cleanups.Mike Stump
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-03Fixed bug introduced in r79900 where FreeBSD was turned into NetBSD, ↵David Chisnall
transposing the ABIs and breaking both platforms. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80870 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-24Fix build of clang with gcc-4.4: #include <cstdio> was missing.Torok Edwin
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79916 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-24Switch TargetInfo to store an llvm::Triple.Daniel Dunbar
- Primarily to discourage clients form making decisions based on the string. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79901 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-24Switch ABI selection to use llvm::Triple instead of string munging.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79900 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-17Fixed typo in last commit pointed out by Anton.David Chisnall
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79290 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-17Changes to TargetABIInfo to (hopefully) select the correct calling ↵David Chisnall
convention. This has been tested on FreeBSD, and now correctly generates GCC-compatible code for functions returning small structures. Please test it on other platforms! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79288 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-13Update for LLVM API change.Owen Anderson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78946 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-05Update for LLVM API change.Owen Anderson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78259 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29Update for LLVM API change.Owen Anderson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77514 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29Change uses of:Ted Kremenek
Type::getAsReferenceType() -> Type::getAs<ReferenceType>() Type::getAsRecordType() -> Type::getAs<RecordType>() Type::getAsPointerType() -> Type::getAs<PointerType>() Type::getAsBlockPointerType() -> Type::getAs<BlockPointerType>() Type::getAsLValueReferenceType() -> Type::getAs<LValueReferenceType>() Type::getAsRValueReferenceType() -> Type::getAs<RValueReferenceType>() Type::getAsMemberPointerType() -> Type::getAs<MemberPointerType>() Type::getAsReferenceType() -> Type::getAs<ReferenceType>() Type::getAsTagType() -> Type::getAs<TagType>() And remove Type::getAsReferenceType(), etc. This change is similar to one I made a couple weeks ago, but that was partly reverted pending some additional design discussion. With Doug's pending smart pointer changes for Types, it seemed natural to take this approach. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77510 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29No longer need to keep base class offsets in the offsetFariborz Jahanian
table as it has its own place now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77491 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27Some minor changes toward support of dataFariborz Jahanian
member access in the presense of non-virtual bases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77246 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24Update for LLVM API change.Owen Anderson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77012 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18Revert r75641.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76327 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17Per offline discussion with Steve Naroff, add back Type::getAsXXXType() methodsTed Kremenek
until Doug Gregor's Type smart pointer code lands (or more discussion occurs). These methods just call the new Type::getAs<XXX> methods, so we still have reduced implementation redundancy. Having explicit getAsXXXType() methods makes it easier to set breakpoints in the debugger. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76193 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-17Replaced Type::getAsLValueReferenceType(), Type::getAsRValueReferenceType(), ↵Ted Kremenek
Type::getAsMemberPointerType(), Type::getAsTagType(), and Type::getAsRecordType() with their Type::getAs<XXX> equivalents. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76139 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16Hook in s390x stuff into clangAnton Korobeynikov
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76099 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14Update for LLVM API change, and contextify a bunch of related stuff.Owen Anderson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75705 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14Rename RecordLayout.h to ASTRecordLayout.hAnders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75641 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-30De-ASTContext-ify DeclContext.Argyrios Kyrtzidis
Remove ASTContext parameter from DeclContext's methods. This change cascaded down to other Decl's methods and changes to call sites started "escalating". Timings using pre-tokenized "cocoa.h" showed only a ~1% increase in time run between and after this commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74506 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-13Fix the calling convention for structs/unions containing SSE vectors on Eli Friedman
x86-32. This is slightly messy, but I think it's consistent with gcc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73306 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-06Add new ABIArgInfo kind: Extend. This allows target to implement its own ↵Anton Korobeynikov
argument zero/sign extension logic (consider, e.g. target has only 64 bit registers and thus i32's should be extended as well). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72998 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-05Factor out TargetABIInfo stuff into separate file. No functionality change.Anton Korobeynikov
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72962 91177308-0d34-0410-b5e6-96231b3b80d8