summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/TargetInfo.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* When we're passing a vector with an illegal type through memory on x86-64, ↵Eli Friedman2011-12-021-7/+27
| | | | | | use byval so we're sure the backend does the right thing. Fixes va_arg with illegal vectors and an obscure ABI mismatch with __m64 vectors. llvm-svn: 145652
* Don't use a varargs convention for calls unprototyped functions where one of ↵Eli Friedman2011-12-011-5/+24
| | | | | | the arguments is an AVX vector. llvm-svn: 145574
* Correct the code generation for function arguments of vec3 types on x86_64 ↵Tanya Lattner2011-11-281-1/+1
| | | | | | | | when they are greater than 128 bits. This was incorrectly coercing things like long3 into a double2. Add test case. llvm-svn: 145312
* Finish r144971, which was an incomplete commit.Eli Friedman2011-11-181-1/+1
| | | | llvm-svn: 144972
* Fix the meaning of an "empty" record for the case of a zero-length array. ↵Eli Friedman2011-11-181-3/+7
| | | | | | Use isEmptyRecord for arguments on x86-32; there are structs of size 0 which don't count as empty. llvm-svn: 144971
* Make va_arg on x86-64 compute alignment the same way as argument passing.Eli Friedman2011-11-181-7/+5
| | | | | | Fixes <rdar://problem/10463281>. llvm-svn: 144966
* A bunch of fixes to argument passing and va_arg on Darwin x86-32 for ↵Eli Friedman2011-11-181-3/+21
| | | | | | structures containing an SSE vector. llvm-svn: 144963
* Don't try to expand struct arguments containing holes on x86-32. From gcc ↵Eli Friedman2011-11-181-0/+8
| | | | | | struct layout tests. llvm-svn: 144961
* Simplify code for returning a struct for Darwin x86-32 ABI. Use a better ↵Eli Friedman2011-11-181-41/+16
| | | | | | type for a function returning a struct containing only a pointer. Handle the edge case of a struct containing only a float or double plus some dead padding instead of asserting. llvm-svn: 144960
* Ignore empty unions in argument lowering on x86-32. From gcc struct layout ↵Eli Friedman2011-11-181-2/+2
| | | | | | tests. llvm-svn: 144944
* Use a single integer type for a sub-doubleword part of a byval structure.Akira Hatanaka2011-11-031-11/+4
| | | | llvm-svn: 143666
* Do not add "byval" attribute to records with non-trivial copy constructorsJan Wen Voung2011-11-031-1/+7
| | | | | | and destructors in the DefaultABIInfo. llvm-svn: 143601
* Set MinABIStackAlignInBytes to 8 if ABI is N32/64.Akira Hatanaka2011-11-031-4/+3
| | | | llvm-svn: 143597
* Convert the type of a structure passed by value if it has double precisionAkira Hatanaka2011-11-021-0/+71
| | | | | | fields in order to ease handling of such structures in backend. llvm-svn: 143596
* Return function results whose size is smaller than 128-bits in registers if ABIAkira Hatanaka2011-11-021-6/+9
| | | | | | is N32/64. llvm-svn: 143589
* Check for homogeneous aggregate return values with ARM's AAPCS-VFP ABI.Bob Wilson2011-11-021-0/+8
| | | | llvm-svn: 143530
* Remove the SystemZ backend.Dan Gohman2011-10-241-82/+0
| | | | llvm-svn: 142879
* TCE target: conversion of OpenCL reqd_work_group_size attr to metadataPeter Collingbourne2011-10-131-2/+73
| | | | | | Patch by Pekka Jääskeläinen! llvm-svn: 141865
* Constant expression evaluation refactoring:Richard Smith2011-10-101-2/+1
| | | | | | | | | | | - Remodel Expr::EvaluateAsInt to behave like the other EvaluateAs* functions, and add Expr::EvaluateKnownConstInt to capture the current fold-or-assert behaviour. - Factor out evaluation of bitfield bit widths. - Fix a few places which would evaluate an expression twice: once to determine whether it is a constant expression, then again to get the value. llvm-svn: 141561
* Free 'TheTargetCodeGenInfo' in the class CodeGenModule. This looks like an ↵Ted Kremenek2011-10-081-3/+0
| | | | | | obvious memory leak that was reported from LLDB devs. The comment indicates the leak is deliberate, but I have no idea why this needs to be so. Please comment/revert if you know otherwise. llvm-svn: 141479
* CUDA: set proper calling conventions for PTXPeter Collingbourne2011-10-061-7/+13
| | | | llvm-svn: 141296
* PTX: Set proper calling conventions for PTX in OpenCL mode.Justin Holewinski2011-10-051-5/+40
| | | | llvm-svn: 141193
* Removing a bunch of dead returns/breaks after llvm_unreachables.David Blaikie2011-09-231-1/+0
| | | | llvm-svn: 140407
* Switch assert(0/false) llvm_unreachable.David Blaikie2011-09-231-4/+4
| | | | llvm-svn: 140367
* ANSI C requires that a call to an unprototyped function type succeedJohn McCall2011-09-211-0/+17
| | | | | | | | | | | | | | | | | if the definition has a non-variadic prototype with compatible parameters. Therefore, the default rule for such calls must be to use a non-variadic convention. Achieve this by casting the callee to the function type with which it is required to be compatible, unless the target specifically opts out and insists that unprototyped calls should use the variadic rules. The only case of that I'm aware of is the x86-64 convention, which passes arguments the same way in both cases but also sets a small amount of extra information; here we seek to maintain compatibility with GCC, which does set this when calling an unprototyped function. Addresses PR10810 and PR10713. llvm-svn: 140241
* Create a MipsTargetCodeGenInfo object for mips64/mips64el. The size of theAkira Hatanaka2011-09-201-0/+4
| | | | | | UnwindException structure is 32 for mips64. llvm-svn: 140165
* Add a parameter to MipsTargetCodeGenInfo's constructor.Akira Hatanaka2011-09-201-4/+5
| | | | llvm-svn: 140161
* Extend the ASTContext constructor to delay the initialization ofDouglas Gregor2011-09-021-7/+7
| | | | | | | | builtin types (When requested). This is another step toward making ASTUnit build the ASTContext as needed when loading an AST file, rather than doing so after the fact. No actual functionality change (yet). llvm-svn: 138985
* The size of struct UnwindException varies by platform with noJohn McCall2011-08-301-2/+30
| | | | | | | apparent general rule. Just special-case it as appropriate. PR10789. llvm-svn: 138792
* Alignment of a va_arg must be at least as large as the ABI's minimum alignment.Akira Hatanaka2011-08-121-0/+1
| | | | llvm-svn: 137420
* Add definition of a static member of a class.Akira Hatanaka2011-08-121-0/+2
| | | | llvm-svn: 137411
* Handle "homogeneous aggregates" as required by the ARM AAPCS-VFP ABI.Bob Wilson2011-08-031-0/+74
| | | | | | | | | | | | | A homogeneous aggregate is an aggregate data structure where after flattening any nesting there are 1 to 4 elements of the same base type that is either a float, double, or Neon vector. All Neon vectors of the same size, either 64 or 128 bits, are treated as equivalent for this purpose. When using the AAPCS-VFP ABI, check for homogeneous aggregates and pass them as arguments by expanding them into a sequence of their base types. This requires extending the existing support for expanded arguments to handle not only structs, but also constant arrays and complex types. llvm-svn: 136767
* Implements alignment for long long and double types in va_arg on ARM AAPCS.Rafael Espindola2011-08-021-1/+10
| | | | | | Patch by Jim (Ningjie) Chen. llvm-svn: 136734
* Revert "Re-enable byval for ARM in clang. rdar://problem/7662569"Bob Wilson2011-08-011-10/+6
| | | | | | | | | | | This reverts commit 67d097e1232b7d66f58989c16a45b8a11721f76e. We found a miscompile with ARM byval, which is still being investigated. In the meantime, this works around the problem by disabling ARM byval. Conflicts: lib/CodeGen/TargetInfo.cpp llvm-svn: 136662
* Implement MipsABIInfo::EmitVAArg. This fix enables clang to complete compilationAkira Hatanaka2011-08-011-1/+31
| | | | | | | | | | without bailing out when va_arg is an aggregate expression. However, alignment checking needs to be added in isSafeToEliminateVarargsCast in InstCombineCalls.cpp in order to produce correct mips code (see link below). http://lists.cs.uiuc.edu/pipermail/llvmdev/2011-July/042047.html llvm-svn: 136647
* Pass records with non-trivial destructors or constructors indirectly.Akira Hatanaka2011-08-011-0/+5
| | | | llvm-svn: 136630
* remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner2011-07-231-8/+8
| | | | | | | | LLVM.h imports them into the clang namespace. llvm-svn: 135852
* de-constify llvm::Type, patch by David Blaikie!Chris Lattner2011-07-181-30/+30
| | | | llvm-svn: 135370
* Fix typoJoerg Sonnenberger2011-07-151-1/+1
| | | | llvm-svn: 135285
* Reapply r134946 with fixes. Tested on Benjamin testcase and other test-suite ↵Bruno Cardoso Lopes2011-07-131-2/+10
| | | | | | failures. llvm-svn: 135091
* Revert r134946Bruno Cardoso Lopes2011-07-121-8/+1
| | | | llvm-svn: 135004
* Fix a typo!Bruno Cardoso Lopes2011-07-121-1/+1
| | | | llvm-svn: 134952
* Do the same as r134946 for arrays. Add more testcases for avx x86_64 argBruno Cardoso Lopes2011-07-121-0/+7
| | | | | | passing. llvm-svn: 134951
* Fix one x86_64 abi issue and the test to actually look for the right thing,Bruno Cardoso Lopes2011-07-121-1/+8
| | | | | | which is: { <4 x float>, <4 x float> } should continue to go through memory. llvm-svn: 134946
* Reapply r134754, which turns out to be working correctly and alsoBruno Cardoso Lopes2011-07-111-41/+73
| | | | | | add one more testcase. llvm-svn: 134934
* De-constify Types in StructType::get() and TargetData::getIntPtrType().Jay Foad2011-07-111-11/+11
| | | | llvm-svn: 134893
* clang side to match the LLVM IR type system rewrite patch.Chris Lattner2011-07-091-38/+35
| | | | llvm-svn: 134831
* Change -mno-mmx to be more compatible with gcc. Specifically, -mno-mmx ↵Eli Friedman2011-07-081-8/+16
| | | | | | | | | | | | should not imply -mno-sse. Note that because we don't usually touch the MMX registers anyway, all -mno-mmx needs to do is tweak the x86-32 calling convention a little for vectors that look like MMX vectors, and prevent the definition of __MMX__. clang doesn't actually stop the user from using MMX inline asm operands or MMX builtins in -mno-mmx mode; as a QOI issue, it would be nice to diagnose, but I doubt it really matters much. <rdar://problem/9694837> llvm-svn: 134770
* Revert x86_64 ABI changes until I have time to check the items raised by Eli.Bruno Cardoso Lopes2011-07-081-74/+42
| | | | llvm-svn: 134765
* Add support for AVX 256-bit in the x86_64 ABI (as in the 0.99.5 draft)Bruno Cardoso Lopes2011-07-081-42/+74
| | | | llvm-svn: 134754
OpenPOWER on IntegriCloud