Граф коммитов

161 Коммитов

Автор SHA1 Сообщение Дата
Douglas Gregor bcfd1f55bf Extend the ASTContext constructor to delay the initialization of
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).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138985 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-02 00:18:52 +00:00
John McCall 49e34be6ae The size of struct UnwindException varies by platform with no
apparent general rule.  Just special-case it as appropriate.
PR10789.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138792 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-30 01:42:09 +00:00
Akira Hatanaka 7b0a0383ef Alignment of a va_arg must be at least as large as the ABI's minimum alignment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137420 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-12 02:30:14 +00:00
Akira Hatanaka 3827e42982 Add definition of a static member of a class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137411 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-12 01:43:14 +00:00
Bob Wilson 194f06a476 Handle "homogeneous aggregates" as required by the ARM AAPCS-VFP ABI.
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136767 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-03 05:58:22 +00:00
Rafael Espindola e164c18052 Implements alignment for long long and double types in va_arg on ARM AAPCS.
Patch by Jim (Ningjie) Chen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136734 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-02 22:33:37 +00:00
Bob Wilson 53fc1a6151 Revert "Re-enable byval for ARM in clang. rdar://problem/7662569"
This reverts commit 67d097e123.
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136662 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-01 23:39:04 +00:00
Akira Hatanaka c35e69d758 Implement MipsABIInfo::EmitVAArg. This fix enables clang to complete compilation
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





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136647 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-01 20:48:01 +00:00
Akira Hatanaka 511949bf7e Pass records with non-trivial destructors or constructors indirectly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136630 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-01 18:09:58 +00:00
Chris Lattner 5f9e272e63 remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports
them into the clang namespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135852 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-23 10:55:15 +00:00
Chris Lattner 2acc6e3fed de-constify llvm::Type, patch by David Blaikie!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135370 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-18 04:24:23 +00:00
Joerg Sonnenberger e9b5d77b7b Fix typo
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135285 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-15 18:23:44 +00:00
Bruno Cardoso Lopes b8981df0ed Reapply r134946 with fixes. Tested on Benjamin testcase and other test-suite failures.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135091 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-13 21:58:55 +00:00
Bruno Cardoso Lopes 548e478b8b Revert r134946
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135004 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-12 22:30:58 +00:00
Bruno Cardoso Lopes 75d28b58d9 Fix a typo!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134952 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-12 02:47:38 +00:00
Bruno Cardoso Lopes 089d8927ab Do the same as r134946 for arrays. Add more testcases for avx x86_64 arg
passing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134951 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-12 01:27:38 +00:00
Bruno Cardoso Lopes ccafadb68f Fix one x86_64 abi issue and the test to actually look for the right thing,
which is: { <4 x float>, <4 x float> } should continue to go through memory.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134946 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-12 00:30:27 +00:00
Bruno Cardoso Lopes 4943c15df5 Reapply r134754, which turns out to be working correctly and also
add one more testcase.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134934 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-11 22:41:29 +00:00
Jay Foad ef6de3da85 De-constify Types in StructType::get() and TargetData::getIntPtrType().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134893 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-11 09:56:20 +00:00
Chris Lattner 9cbe4f0ba0 clang side to match the LLVM IR type system rewrite patch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134831 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-09 17:41:47 +00:00
Eli Friedman c3e0fb406f Change -mno-mmx to be more compatible with gcc. Specifically, -mno-mmx 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>



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134770 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-08 23:31:17 +00:00
Bruno Cardoso Lopes 528a8c7b4c Revert x86_64 ABI changes until I have time to check the items raised by Eli.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134765 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-08 22:57:35 +00:00
Bruno Cardoso Lopes df41b4c10a Add support for AVX 256-bit in the x86_64 ABI (as in the 0.99.5 draft)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134754 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-08 22:18:40 +00:00
Eli Friedman 14508ff0bf Don't use x86_mmx where it isn't necessary.
The start of some work on getting -mno-mmx working the way we want it to.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134300 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-02 00:57:27 +00:00
Eli Friedman ded137fcab We don't pass classes with a copy-constructor or destructor byval, so the address takes up an integer register (if one is available). Make sure the x86-64 ABI implementation takes that into account properly.
The fixed implementation is compatible with the implementation both gcc and llvm-gcc use.

rdar://9686430 . (This is the issue that was reported in the thread "[LLVMdev] Segfault calling LLVM libs from a clang-compiled executable".)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134059 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-29 07:04:55 +00:00
NAKAMURA Takumi 4857947d18 De-Unicode-ify in comments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133501 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-21 03:19:28 +00:00
Chris Lattner 7650d95a1a update for api change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133365 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-18 22:49:11 +00:00
John McCall f85e193739 Automatic Reference Counting.
Language-design credit goes to a lot of people, but I particularly want
to single out Blaine Garst and Patrick Beard for their contributions.

Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself,
in no particular order.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133103 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-15 23:02:42 +00:00
Akira Hatanaka 619e8875d2 Add stuff for o32 ABI conformance.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132443 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-02 00:09:17 +00:00
Chris Lattner de92d739ba make the x86-32 backend specify a byval alignment, even when the
code generator will do it.  With this patch, clang compiles the example
in PR9794 to not have an alloca temporary.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131881 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-22 23:35:00 +00:00
Chris Lattner 855d227967 Fix x86-64 byval passing to specify the alignment even when the code
generator will give it something sufficient.  This is important because
the mid-level optimizer doesn't know what alignment is required otherwise.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131879 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-22 23:21:23 +00:00
Roman Divacky 09345d1c2a Add ARMTargetCodeGenInfo::initDwarfEHRegSizeTable() defining 16 32bit regs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131558 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-18 19:36:54 +00:00
Argyrios Kyrtzidis c5f18f3e8c Revert r131447, see if it fixes the buildbot.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131450 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-17 02:17:52 +00:00
Argyrios Kyrtzidis b7d2516f5d Inside isEmptyRecord function, for CXXRecordDecl just check the isEmpty bit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131447 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-17 00:46:40 +00:00
Stuart Hastings a1dadc9874 Raise ARM byval minimum size from 32 to 64, addressing a performance
regression in mason.  rdar://problem/7662569


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130444 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-28 21:35:59 +00:00
Stuart Hastings ea971e968f Replace unitary array with scalar. rdar://problem/7662569
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130423 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-28 19:24:47 +00:00
Stuart Hastings b7f62d0136 Replace SmallVector with an array, as suggested by Frits van Bommel. rdar://problem/7662569
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130417 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-28 18:16:06 +00:00
Stuart Hastings 67d097e123 Re-enable byval for ARM in clang. rdar://problem/7662569
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130312 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-27 17:24:02 +00:00
Eric Christopher ad27eeaf03 Temporarily revert r130176, it appears to have broken a few tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130179 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-26 01:02:04 +00:00
Stuart Hastings df39fa2811 Turn on byval parameters in Clang for ARM APCS. rdar://problem/7662569
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130176 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-25 23:48:12 +00:00
Justin Holewinski 0259c3a3df PTX: Add default PTX calling conventions
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129987 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-22 11:10:38 +00:00
John McCall 67a5773ba5 The 0.98 revision of the x86-64 ABI clarified a lot of things, some
of which break strict compatibility with previous compilers.  Implement
one of them and then immediately opt out on Darwin.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129899 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-21 01:20:55 +00:00
Daniel Dunbar db57a4cdb0 ADT/Triple: Switch to using .isOSDarwin() predicate.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129823 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-19 21:43:27 +00:00
Chris Lattner fc8f0e14ad fix a bunch of comment typos found by codespell. Patch by
Luis Felipe Strano Moraes!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129559 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-15 05:22:18 +00:00
Anton Korobeynikov 414d8967e1 Implement ARM pcs attribute. Basically it's another way of calling convention selection (AAPCS or
AAPCS+VFP), similar to fastcall / stdcall / whatevercall seen on x86.

In particular, all library functions should always be AAPCS regardless of floating point ABI used.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129534 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-14 20:06:49 +00:00
Sandeep Patel 34c1af83e1 Set AAPCS-VFP calling convention accordingly and hard float ABI command handling.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128866 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-05 00:23:47 +00:00
Jay Foad bbf3bacb3e Remove PHINode::reserveOperandSpace(). Instead, add a parameter to
PHINode::Create() giving the (known or expected) number of operands.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128538 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-30 11:28:58 +00:00
Bill Wendling 0507be662d When we adjust the inline ASM type, we need to take into account an early
clobber with the 'y' constraint. Otherwise, we get the wrong return type and an
assert, because it created a '<1 x i64>' vector type instead of the x86_mmx
type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127185 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-07 22:47:14 +00:00
Tilmann Scheller 9c6082fe89 Revert "Add CC_Win64ThisCall and set it in the necessary places."
This reverts commit 126863.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126886 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-02 21:36:49 +00:00
Tilmann Scheller 88d117c2ee Add CC_Win64ThisCall and set it in the necessary places.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126863 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-02 19:36:23 +00:00