History log of /external/clang/lib/CodeGen/TargetInfo.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
77f300250d1e8e20e4f460f40c6f7d051bdf6e6d 11-Oct-2016 Pirama Arumuga Nainar <pirama@google.com> Re-apply local patch dropped during 'git merge'

Bug: http://b/31320715

Re-apply 3bd7be39de21405059e7a7ac22d97dc80cecdf8e that extends
'isAndroid' check in ABIInfo to also check for the RenderScript
LangOopt. This got dropped during 'git merge' because of a refactoring
done upstream.

Test: python external/clang/build.py
Change-Id: I28ea57235c271728ed5ad37f5b33af5652e1dfda
(cherry picked from commit 42604a6b36c634a93e022ee5a0f7c1cdbd36914d)
/external/clang/lib/CodeGen/TargetInfo.cpp
4967a710c84587c654b56c828382219c3937dacb 20-Sep-2016 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master Clang for rebase to r275480

Bug: http://b/31320715

This merges commit ac9cc4764cf47a6c3f031687d8592e080c9f5001 from
aosp/dev.

Test: Build AOSP and run RenderScript tests (host tests for slang and
libbcc, RsTest, CTS)

Change-Id: Ic2875e5c3673c83448cd7d1013861e42947b1b55
/external/clang/lib/CodeGen/TargetInfo.cpp
1567b306a9c2a37c909046959f661092a3c04a76 18-Mar-2016 Pirama Arumuga Nainar <pirama@google.com> Add -fnative-half-arguments-and-returns

Summary:
r246764 handled __fp16 arguments and returns for AAPCS, but skipped this
handling for OpenCL. Simlar to OpenCL, RenderScript also handles __fp16
type natively.

This patch adds the -fnative-half-arguments-and-returns command line
flag to allow such languages to skip this coercion of __fp16.

Reviewers: srhines, olista01

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D18138

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263795 91177308-0d34-0410-b5e6-96231b3b80d8

(cherry picked from commit a630229eafa7a45d95b1a9c6873bbaa415e4df0a)

Change-Id: I26a65c2c2a59e815d9d73ff294a8e20b12c641e6
/external/clang/lib/CodeGen/TargetInfo.cpp
624d665094752329eab37e466852f627571e700d 19-Mar-2016 Pirama Arumuga Nainar <pirama@google.com> Revert "Handle __fp16 natively if HalfArgsAndReturns langopt is set"

This reverts commit ba8a5652592440418dad2c5be62710b994c7fe11.

(cherry picked from commit 65ebe08e20e1e45557f00c6382743b3ea4792529)

Change-Id: Id793081c984af69c6b671ab30c94c3d11a55f684
/external/clang/lib/CodeGen/TargetInfo.cpp
3bd7be39de21405059e7a7ac22d97dc80cecdf8e 11-Mar-2016 Stephen Hines <srhines@google.com> Fix ARM ABI issues for RenderScript.

Bug: http://b/26987366

Although I did upstream a working patch for our ARM ABI vector problems,
the patch is insufficient for RenderScript, as it is *NOT* an Android
target. It is a generic Linux target, so we need to also check our
LanguageOptions to see if we should use the alternate vector ABI.

Change-Id: I7d026b2456f6262aff69627e33cfd4552f418378
/external/clang/lib/CodeGen/TargetInfo.cpp
87d948ecccffea9e9e37d0d053b246e2d6d6c47b 04-Mar-2016 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master clang for rebase to r256229

http://b/26987366

Change-Id: I5d349c9843ea5c24d6e455956f8a446393b6873d
/external/clang/lib/CodeGen/TargetInfo.cpp
1d151515c135a162894b85f6551e7c3930b0ee44 11-Aug-2015 Matt Wala <wala@google.com> RenderScript: ensure that struct arguments and return values are
always coerced to a type of the same size as the original type.

Bug: 23015620

This change is needed for the RenderScript compiler to infer the
proper array stride information for kernels. This is a change to the
ARM call lowering that only occurs when the language is set to
RenderScript.

Change-Id: I7cf8d12da11ac2820d53d0a3d27ce1f47268306d
/external/clang/lib/CodeGen/TargetInfo.cpp
b6d6993e6e6d3daf4d9876794254d20a134e37c2 01-Jul-2015 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master clang for rebase to r239765

Change-Id: I0393bcc952590a7226af8c4b58534a8ee5fd2d99
/external/clang/lib/CodeGen/TargetInfo.cpp
58878f85ab89b13e9eea4af3ccf055e42c557bc8 06-May-2015 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master clang for rebase to r235153

Change-Id: Ia94bbcb6da7c75b6e7c2afedd1001094d62a7324
/external/clang/lib/CodeGen/TargetInfo.cpp
3ea9e33ea25e0c2b12db56418ba3f994eb662c04 08-Apr-2015 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master clang for rebase to r233350

Change-Id: I12d4823f10bc9e445b8b86e7721b71f98d1df442
/external/clang/lib/CodeGen/TargetInfo.cpp
0e2c34f92f00628d48968dfea096d36381f494cb 23-Mar-2015 Stephen Hines <srhines@google.com> Update aosp/master clang for rebase to r230699.

Change-Id: I6a546ab3d4ae37119eebb735e102cca4f80ab520
/external/clang/lib/CodeGen/TargetInfo.cpp
176edba5311f6eff0cad2631449885ddf4fbc9ea 01-Dec-2014 Stephen Hines <srhines@google.com> Update aosp/master Clang for rebase to r222490.

Change-Id: Ic557ac55e97fbf6ee08771c7b7c3594777b0aefd
/external/clang/lib/CodeGen/TargetInfo.cpp
9212d4fb30a3ca2f4ee966dd2748c35573d9682c 16-Aug-2014 Tim Murray <timmurray@google.com> Update vector calling convention for AArch64.

bug 16846318

Change-Id: I3cfd167758b4bd634d8480ee6ba6bb55d61f82a7
/external/clang/lib/CodeGen/TargetInfo.cpp
c568f1e98938584c0ef0b12ae5018ff7d90a4072 21-Jul-2014 Stephen Hines <srhines@google.com> Update Clang for rebase to r212749.

This also fixes a small issue with arm_neon.h not being generated always.

Includes a cherry-pick of:
r213450 - fixes mac-specific header issue
r213126 - removes a default -Bsymbolic on Android

Change-Id: I2a790a0f5d3b2aab11de596fc3a74e7cbc99081d
/external/clang/lib/CodeGen/TargetInfo.cpp
6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 29-May-2014 Stephen Hines <srhines@google.com> Update Clang for 3.5 rebase (r209713).

Change-Id: I8c9133b0f8f776dc915f270b60f94962e771bc83
/external/clang/lib/CodeGen/TargetInfo.cpp
651f13cea278ec967336033dd032faef0e9fc2ec 24-Apr-2014 Stephen Hines <srhines@google.com> Updated to Clang 3.5a.

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/lib/CodeGen/TargetInfo.cpp
1fab7c3e3bd97a909a80b1bfea1909c6e7347fc0 12-Feb-2014 Stephen Hines <srhines@google.com> Merge remote-tracking branch 'upstream/release_34' into merge-20140211

Conflicts:
lib/Basic/Targets.cpp
lib/Sema/SemaDeclAttr.cpp

Change-Id: I17ca7161f32007272ee82036d237d051847dd02e
148a352abe7851d1a1d421d1d205577ab0fd0998 04-Dec-2013 Richard Sandiford <rsandifo@linux.vnet.ibm.com> Merging r196370:
------------------------------------------------------------------------
r196370 | rsandifo | 2013-12-04 09:59:57 +0000 (Wed, 04 Dec 2013) | 14 lines

[SystemZ] Fix handling of pass-by-pointer arguments

I'd misunderstood getIndirect() to mean that the argument should be passed
as a pointer at the ABI level, with the ByVal argument choosing caller-copy
semantics over no-caller-copy (callee-copy-on-write) semantics. But
getIndirect(x) actually means that x is passed by pointer at the IR
level but (at least on all other targets I looked at) directly at the
ABI level. getIndirect(x, false) selects a pointer to a caller-made
copy, which is what SystemZ was aiming for.

This fixes a miscompilation of c-index-test. Structure arguments were being
passed by pointer, but no copy was being made, so a write in the callee
stomped over a caller's local variable.

------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@196371 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
846ff9f2d11efd645825f94c9c997c741d9b3248 22-Nov-2013 Bill Wendling <isanbard@gmail.com> Merging r195268:
------------------------------------------------------------------------
r195268 | jholewinski | 2013-11-20 12:35:34 -0800 (Wed, 20 Nov 2013) | 3 lines

[NVPTX] Update ABI handling

For PTX, we want the target to handle struct returns directly.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@195385 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
dda91e0c4b794b1054a6672a6267942ec72d387f 11-Nov-2013 Akira Hatanaka <ahatanaka@mips.com> [mips] Partially revert r193640. Stack alignment should not be determined by
the floating point register mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194426 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
723ceadd234bc55964c5981c9de5e4cd29bd7902 31-Oct-2013 Rui Ueyama <ruiu@google.com> Use StringRef::endswith_lower. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193788 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
8b54999a831bb195c08541ca995ef0505c96193f 30-Oct-2013 Mark Lacey <mark.lacey@apple.com> Add CodeGenABITypes.h for use in LLDB.

CodeGenABITypes is a wrapper built on top of CodeGenModule that exposes
some of the functionality of CodeGenTypes (held by CodeGenModule),
specifically methods that determine the LLVM types appropriate for
function argument and return values.

I addition to CodeGenABITypes.h, CGFunctionInfo.h is introduced, and the
definitions of ABIArgInfo, RequiredArgs, and CGFunctionInfo are moved
into this new header from the private headers ABIInfo.h and CGCall.h.

Exposing this functionality is one part of making it possible for LLDB
to determine the actual ABI locations of function arguments and return
values, making it possible for it to determine this for any supported
target without hard-coding ABI knowledge in the LLDB code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193717 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
550ed2077e11ac183380478769c8ddc932ce3168 29-Oct-2013 Akira Hatanaka <ahatanaka@mips.com> [mips] Align the stack to 16-bytes for -mfp64.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193640 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
7ebd9538729c38e2b8ed71a38614cbc2be941f3d 29-Oct-2013 Akira Hatanaka <ahatanaka@mips.com> [mips] Use the distance between the current argument's starting address and
the previous argument's ending address to compute the type of the padding
argument.

No intended functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193638 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
b914e87377fd4d7642f544000a79f8648c6f06c9 20-Oct-2013 Peter Collingbourne <peter@pcc.me.uk> Implement function type checker for the undefined behavior sanitizer.

This uses function prefix data to store function type information at the
function pointer.

Differential Revision: http://llvm-reviews.chandlerc.com/D1338

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193058 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
ed9967eb7eff00f5ce61945540c5869559669408 14-Oct-2013 Andy Gibbs <andyg1001@hotmail.co.uk> Fixed "ArgSize may be used uninitialised" error when compiling with gcc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192570 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
645e6fd1ba47f57b523d10c04045c142195a276e 11-Oct-2013 Robert Lytton <robert@xmos.com> XCore : Fix bug in XCoreABIInfo::EmitVAArg()

Incorrect handling of 'double' and 'long long int'

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192436 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
9a6002a09bd0f920ee370360dfe231eba256b37a 06-Oct-2013 Sylvestre Ledru <sylvestre@debian.org> remove a dead assignment. The variables are set just right after. Found by scan-build http://buildd-clang.debian.net/scan-build/

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192061 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
2363072da26da25009bf61c3d9d056a028d4d720 06-Oct-2013 Mark Lacey <mark.lacey@apple.com> Pass CGCXXABIs around directly.

In functions that only need to use the CGCXXABI member of a CodeGenTypes
class, pass that reference around directly rather than a reference to
a CodeGenTypes class.

This makes the actual dependence on CGCXXABI clear at the call sites.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192052 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
2529660fe6c9c40a69dd3d71c0a511e72579eaf2 02-Oct-2013 Mark Lacey <mark.lacey@apple.com> Use the CGCXXABI member on CodeGenTypes.

CodeGenTypes already has a reference to a CGCXXABI. Use this directly
rather than going through CodeGenModule to get to the same information.

This is consistent with other references to CGCXXABI in CodeGenTypes
functions defined in CGCall.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191854 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
64eac850a04e33f5b37a4b17ed7e3a18f6edad82 01-Oct-2013 Tim Northover <tnorthover@apple.com> Implement ARM GNU-style interrupt attribute

This attribute allows users to use a modified C or C++ function as an ARM
exception-handling function and, with care, to successfully return control to
user-space after the issue has been dealt with.

rdar://problem/14207019

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191769 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
57b1da1588a3f5785ad8bd5d9f2d795d685e1058 14-Sep-2013 Cameron Esfahani <dirty@apple.com> Clean up some Triple usage in clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190737 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
ef072033876e295ec5d3402f8730a3ae358ad815 28-Aug-2013 Reid Kleckner <reid@kleckner.net> Delete CC_Default and use the target default CC everywhere

Summary:
Makes functions with implicit calling convention compatible with
function types with a matching explicit calling convention. This fixes
things like calls to qsort(), which has an explicit __cdecl attribute on
the comparator in Windows headers.

Clang will now infer the calling convention from the declarator. There
are two cases when the CC must be adjusted during redeclaration:
1. When defining a non-inline static method.
2. When redeclaring a function with an implicit or mismatched
convention.

Fixes PR13457, and allows clang to compile CommandLine.cpp for the
Microsoft C++ ABI.

Excellent test cases provided by Alexander Zinenko!

Reviewers: rsmith

Differential Revision: http://llvm-reviews.chandlerc.com/D1231

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189412 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
acfea84369810b7e0c9fca90918b22eded9e401e 19-Aug-2013 Alexey Samsonov <samsonov@google.com> Fix -Wcovered-switch-default warning from r188664

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188672 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
276c289061e7578ef819f66dec0f3442e997b293 19-Aug-2013 Robert Lytton <robert@xmos.com> XCore target: Add target specific EmitVAArg

This is so aggregates can be passed as var args too.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188664 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
5f15f4daf0e225ea8463fe2ef522c009c95ffc9c 13-Aug-2013 Robert Lytton <robert@xmos.com> Add XCore target

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188258 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
4ac73c7514f9e836b4d9781738f333c5cb91cb63 08-Aug-2013 Stephen Hines <srhines@google.com> Merge commit '51e75aecf4fb303b91c9e54fd88e3509e5acc7a6' into merge-20130807

Conflicts:
lib/Basic/Targets.cpp
lib/Sema/SemaDeclAttr.cpp

Change-Id: If457223ecbee9e43c73d15333bf10d36590d05c4
ea7fb0ce25acc04664a2e7c2b24af03cef2c0d1f 26-Jul-2013 Bill Schmidt <wschmidt@linux.vnet.ibm.com> [PowerPC] Support powerpc64le as a syntax-checking target.

This patch provides basic support for powerpc64le as an LLVM target.
However, use of this target will not actually generate little-endian
code. Instead, use of the target will cause the correct little-endian
built-in defines to be generated, so that code that tests for
__LITTLE_ENDIAN__, for example, will be correctly parsed for
syntax-only testing. Code generation will otherwise be the same as
powerpc64 (big-endian), for now.

The patch leaves open the possibility of creating a little-endian
PowerPC64 back end, but there is no immediate intent to create such a
thing.

The new test case variant ensures that correct built-in defines for
little-endian code are generated.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187180 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
7185d6272b8dc75d5492a6ea0ed43d7631554b61 25-Jul-2013 Rafael Espindola <rafael.espindola@gmail.com> Remove the mblaze backend from clang.

Approval in here http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-July/064169.html

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187143 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
0323a7887b26f727080d2aa38f1a325dd23a1ee9 24-Jul-2013 Eli Bendersky <eliben@google.com> Partial revert of r185568.

r186899 and r187061 added a preferred way for some architectures not to get
intrinsic generation for math builtins. So the code changes in r185568 can
now be undone (the test remains).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187079 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
b199310f56d6695780b146baf2b823b8676e4525 24-Jul-2013 Bill Schmidt <wschmidt@linux.vnet.ibm.com> [PowerPC64] Fix passing of single-vector-member structs to match ABI.

The 64-bit PowerPC ELF ABI requires a struct that contains a single
vector member to be passed in a vector register as though the wrapping
struct were not present. Instead we were passing this as a byval
struct.

The same logic was already present for floating-point arguments, so
this patch just extends the logic to handle vector types. The new
test case verifies that clang coerces the parameter and annotates it
as inreg.

Thanks,
Bill



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186993 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
b9bad79ca821a59a75557b30613588681c4f793e 08-Jul-2013 Craig Topper <craig.topper@gmail.com> Simplify code. No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185792 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
6b9240e058bf3451685df73fc8ce181b3046e92b 05-Jul-2013 Craig Topper <craig.topper@gmail.com> Use SmallVectorImpl& for function arguments instead of SmallVector.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185715 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
64b22d8351a83593220803ed702e036c73bb8710 03-Jul-2013 Eli Bendersky <eliben@google.com> Add target hook CodeGen queries when generating builtin pow*.

Without fmath-errno, Clang currently generates calls to @llvm.pow.* intrinsics
when it sees pow*(). This may not be suitable for all targets (for
example le32/PNaCl), so the attached patch adds a target hook that CodeGen
queries. The target can state its preference for having or not having the
intrinsic generated. Non-PNaCl behavior remains unchanged;
PNaCl-specific test added.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185568 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
373ac0ab90a2d61fad7dd991712b8cec30c14604 22-Jun-2013 Tim Northover <tnorthover@apple.com> Teach ARM va_arg to ignore empty structs.

Empty structs are ignored for parameter passing purposes, but va_arg was
incrementing the pointer anyway which could lead to va_list getting out of
sync.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184605 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
f5c3a2521972e9d70d0ec5450cc65472d63ec89f 22-Jun-2013 Tim Northover <tnorthover@apple.com> Check for trivial constructibility before emptiness in ARM ABI.

According to the Itanium ABI (3.1.1), types with non-trivial copy constructors
passed by value should be passed indirectly, with the caller creating a
temporary.

We got this mostly correct, but forgot that empty structs can have non-trivial
constructors too and passed them incorrectly. This simply reverses the order of
the check.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184603 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
b8b52972c72b2ba6fe171c522e5d3d7d69503021 18-Jun-2013 John McCall <rjmccall@apple.com> Add support for -fpcc-struct-return. Patch by Arthur O'Dwyer!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184166 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
2049840b0ffe8ee4bf39051cfa8ca08440c8f667 12-Jun-2013 Stephen Hines <srhines@google.com> Merge commit '1342a4ef62dd7b839c6f09348b246a4f00282f29' into merge_20130612
eba7d2fe3aa97e9203f82714c66f321ff7416bcf 12-Jun-2013 Aaron Ballman <aaron@aaronballman.com> Silencing a signed vs unsigned comparison mismatch in MSVC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183837 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
7a1b586a383622e3287a5f3d82736ec513032744 12-Jun-2013 Eli Friedman <eli.friedman@gmail.com> Make va_arg and argument passing to varargs functions work correctly with
AVX vectors when AVX is turned on.

Fixes <rdar://problem/10513611>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183813 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
939d83efba53994af07c7dc82b88873132a18c0d 11-Jun-2013 Eli Friedman <eli.friedman@gmail.com> Fix a very silly mistake in r183590.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183720 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
eeb00624413d4a4856e66809b84c558d2cdce17f 08-Jun-2013 Eli Friedman <eli.friedman@gmail.com> Fix va_arg on x86-64 for a struct containing a single int128_t. PR16248

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183590 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
572ac32bd09e0b0400bdcc2ca872febf70cc3d7d 08-Jun-2013 Eli Friedman <eli.friedman@gmail.com> Fix line endings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183583 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
1bea653e0d0f0182ed6e0deb5c18ad1123bb3bbd 07-Jun-2013 Tim Northover <tnorthover@apple.com> Diagnose malformed x86 inline asm using 'y' constraint.

X86's 'y' inline assembly constraint represents an MMX register, this change
prevents Clang from hitting an assertion when passed an incompatible type to
deal with.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183467 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
a4b56d30389753cbde96ad410e86db4b4b86ac16 05-Jun-2013 Jakob Stoklund Olesen <stoklund@2pi.dk> Implement SparcV9ABIInfo::EmitVAArg.

This could actually be implemented with the LLVM IR va_arg instruction,
but it doesn't seem to offer any advantages over accessing the va_list
pointer directly.

Using the va_list pointer directly makes it possible to perform type
coercion directly from the argument array, and the va_list updates are
exposed to the optimizers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183292 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
a7ff62f9443efa3b13a28a1e566d4625b15b8553 04-Jun-2013 Aaron Ballman <aaron@aaronballman.com> Adding support for MSVC #pragma detect_mismatch functionality by emitting a FAILIFMISMATCH linker command into the object file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183178 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
fc782fbeb25ad880ec667f34997bd45d530aef86 28-May-2013 Jakob Stoklund Olesen <stoklund@2pi.dk> Build correct coercion types in SparcV9ABIInfo.

The coercion type serves two purposes:

1. Pad structs to a multiple of 64 bits, so they are passed
'left-aligned' in registers.

2. Expose aligned floating point elements as first-level elements, so
the code generator knows to pass them in floating point registers.

We also compute the InReg flag which indicates that the struct contains
aligned 32-bit floats. This flag is used by the code generator to pick
the right registers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182753 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
107196cb219128bfddde53f4718e5c9aa3a41ba6 27-May-2013 Jakob Stoklund Olesen <stoklund@2pi.dk> Add a SparcV9ABIInfo class for handling the standard SPARC v9 ABI.

- All integer arguments smaller than 64 bits are extended.
- Large structs are passed indirectly, not using 'byval'.
- Structs up to 32 bytes in size are returned in registers.

Some things are not implemented yet:

- EmitVAArg can be implemented in terms of the va_arg instruction.
- When structs are passed in registers, float members require special
handling because they are passed in the floating point registers.
- Structs are left-aligned when passed in registers. This may require
padding.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182745 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
89735b9516b1a378c6d33620a6c3a0d5705f9d04 24-May-2013 Aaron Ballman <aaron@aaronballman.com> Suffixing #pragma comment(lib) library names with .lib if necessary. This matches MSVC behavior, as well as allows us to properly link libraries such as the ones provided by the MSDN examples.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182647 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
3190ca922d3743137e15fe0c525c04b177b9983b 08-May-2013 Reid Kleckner <reid@kleckner.net> Forward #pragma comment(lib/linker) through as flags metadata

Summary:
Most of this change is wiring the pragma all the way through from the
lexer, parser, and sema to codegen. I considered adding a Decl AST node
for this, but it seemed too heavyweight.

Mach-O already uses a metadata flag called "Linker Options" to do this
kind of auto-linking. This change follows that pattern.

LLVM knows how to forward the "Linker Options" metadata into the COFF
.drectve section where these flags belong. ELF support is not
implemented, but possible.

This is related to auto-linking, which is http://llvm.org/PR13016.

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D723

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181426 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
b8409215523e5478b8b0aa9cdcd10038cf7651fe 06-May-2013 Ulrich Weigand <ulrich.weigand@de.ibm.com> Add SystemZ support

This patch then adds all the usual platform-specific pieces for SystemZ:
driver support, basic target info, register names and constraints,
ABI info and vararg support. It also adds new tests to verify pre-defined
macros and inline asm, and updates a test for the minimum alignment change.

This version of the patch incorporates feedback from reviews by
Eric Christopher and John McCall. Thanks to all reviewers!

Patch by Richard Sandiford.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181211 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
83eba02c2ea333015335e2f74c4d11c5315b655d 03-May-2013 Stephen Hines <srhines@google.com> Merge remote-tracking branch 'upstream/master' into merge-20130502
ed23bdf69dd63e4fd01c02b12a13d1e6cbff9c2f 17-Apr-2013 Timur Iskhodzhanov <timurrrr@google.com> Set SRet flags properly in '-cxx-abi microsoft'.

Also,
- abstract out the indirect/in memory/in registers decisions into the CGCXXABI
- fix handling of empty struct arguments for '-cxx-abi microsoft'
- add/fix tests



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179681 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
64aa4b3ec7e62288e2e66c1935487ece995ca94b 17-Apr-2013 John McCall <rjmccall@apple.com> Standardize accesses to the TargetInfo in IR-gen.

Patch by Stephen Lin!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179638 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
c0783dc18a78b55e9486b72fa0b193dbf1b65fbb 08-Apr-2013 Eli Bendersky <eliben@google.com> The PNaCl target no longer permits __attribute__((regparm)).

Remove the custom lowering code dealing with it, disallow it in PNaclTargetInfo
and adjust tests accordingly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179059 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
732029500ccda392c75024057f875d7b75f6e735 05-Apr-2013 Eli Bendersky <eliben@google.com> Proper prefix for doxygen comments


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178878 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
e45dfd15d9d821b0f2066bc0cad525eef2e307c3 05-Apr-2013 Eli Bendersky <eliben@google.com> Add some documentation for PNaClABIInfo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178802 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
dca8f336e6da2b50eb965535d81d603e39294f9c 30-Mar-2013 Justin Holewinski <jholewinski@nvidia.com> Use kernel metadata to differentiate between kernel and device
functions for the NVPTX target.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178418 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
1f1df1f48e4c804d80d996fa6e38dee9de633dea 25-Mar-2013 Chad Rosier <mcrosier@apple.com> IR-gen should not generate an MMX types unless the code is explicitly using MMX
intrinsics.
rdar://13213542


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177911 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
d8e6d6da90fd5a715c9e5cb676abbb8c3878c85a 19-Mar-2013 Rafael Espindola <rafael.espindola@gmail.com> Revert r177329.

If this should not happen, we should have an assert.
If it should happen, we should have a test and remove the comment.

In no case should we have this self inconsistent code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177399 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
15d68882f5fa4afae8333e75b2bfd5e2834c8aaf 19-Mar-2013 Stephen Hines <srhines@google.com> Merge branch 'upstream' into merge_2013_03_18

Conflicts:
lib/Sema/SemaDeclAttr.cpp

Change-Id: I05e70941163ec5a461eba43ef78f6738cd5a1e69
4882fe02d8d453084da563b9c18eb5545f0783d4 18-Mar-2013 Reed Kotler <rkotler@mips.com> This code works around what appears to be a bug in another part of clang.
I have filed http://llvm.org/bugs/show_bug.cgi?id=15538 against clang.
This code is safer anyway because "cast" assumes you really know that
it's okay to make the cast. In this case isa should not be false and
dyn_cast should not return null as far as I understand. But everything
else is valid so I did not want to revert my previous patch for attributes
mips16/nomips16 or use an llvm_unreachable here which would make a number
of our tests fail for mips.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177329 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
ad4b8b43e66ebc2838fb314358017079665f058f 13-Mar-2013 Reed Kotler <rkotler@mips.com> Cause the mips16/nomips16 attribute to be passed to LLVM from Clang
in the LLVM assembly language output.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176971 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
9d232c884ea9872d6555df0fd7359699819bc1f1 07-Mar-2013 John McCall <rjmccall@apple.com> Change hasAggregateLLVMType, which conflates complex and
aggregate types in a profoundly wrong way that has to be
worked around in every call site, to getEvaluationKind,
which classifies and distinguishes between all of these
cases.

Also, normalize the API for loading and storing complexes.

I'm working on a larger patch and wanted to pull these
changes out, but it would have be annoying to detangle
them from each other.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176656 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
450b86c0c9ff8307f5145ced621914600196c500 06-Mar-2013 Stephen Hines <srhines@google.com> Merge commit 'b58f810669d9c17bcc025b7560de01d162856f34' into merge_20130226

Conflicts:
include/clang/Basic/LangOptions.def
lib/Sema/SemaDeclAttr.cpp

Change-Id: Ia10b4d3b2c949a72d328cb58b113f90237d4a5d5
bd7370a78604e9a20d698bfe328c1e43f12a0613 28-Feb-2013 John McCall <rjmccall@apple.com> Use the actual ABI-determined C calling convention for runtime
calls and declarations.

LLVM has a default CC determined by the target triple. This is
not always the actual default CC for the ABI we've been asked to
target, and so we sometimes find ourselves annotating all user
functions with an explicit calling convention. Since these
calling conventions usually agree for the simple set of argument
types passed to most runtime functions, using the LLVM-default CC
in principle has no effect. However, the LLVM optimizer goes
into histrionics if it sees this kind of formal CC mismatch,
since it has no concept of CC compatibility. Therefore, if this
module happens to define the "runtime" function, or got LTO'ed
with such a definition, we can miscompile; so it's quite
important to get this right.

Defining runtime functions locally is quite common in embedded
applications.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176286 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
c264e16a42b3f6c36521857a29ea0949d9781c22 31-Jan-2013 Tim Northover <Tim.Northover@arm.com> Add support for AArch64 target.

In cooperation with the LLVM patch, this should implement all scalar front-end
parts of the C and C++ ABIs for AArch64.

This patch excludes the NEON support also reviewed due to an outbreak of
batshit insanity in our legal department. That will be committed soon bringing
the changes to precisely what has been approved.

Further reviews would be gratefully received.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174055 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
4055cfc46a5beb13d0daeace53ac3fe56a1f4ad1 24-Jan-2013 Akira Hatanaka <ahatanaka@mips.com> [mips] Do not emit i32 padding if target ABI is O32. This was causing backend
to pass floating point arguments to be passed in integer registers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173375 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
909b6ded6be68a5740d98b478454fa55ea817ad6 23-Jan-2013 Bill Wendling <isanbard@gmail.com> Use the AttributeSet when adding multiple attributes and an Attribute::AttrKind
when adding a single attribute to the function.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173211 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
c3c9d17eab67d51d9990f7c57ab6f92856071191 16-Jan-2013 Stephen Hines <srhines@google.com> Revert to prior ARM ABI behavior on Android.

Change-Id: I66bab71382189842861348af4efb8dad206c693e
/external/clang/lib/CodeGen/TargetInfo.cpp
7dfd18275259df609f8574a25302fc73a000aa64 16-Jan-2013 Reed Kotler <rkotler@mips.com> First step in implementation of mips16 and nomips16 attributes.
Waiting for new llvm attribute code for the next step.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172626 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
19f8e85d2e0ba2b97ad848b5f879ec96ebc1660e 14-Jan-2013 Bill Schmidt <wschmidt@linux.vnet.ibm.com> This patch addresses varargs processing for small complex types under
the 64-bit PowerPC ELF ABI.

The ABI requires that the real and imaginary parts of a complex argument
each occupy their own doubleword. Arguments smaller than 8 bytes are
right-adjusted within the doubleword.

Clang expects EmitVAARG() to return a pointer to a structure in which
the real and imaginary parts are packed adjacently in memory. To accomplish
this, we generate code to load the code appropriately from the varargs
location and pack the values into a temporary variable in the form Clang
expects, returning a pointer to that structure.

The test case demonstrates correct code generation for all "small" complex
types on PPC64: int, short, char, and float.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172438 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
3b844ba7d5be205a9b4f5f0b0d1b7978977f4b8c 02-Jan-2013 Chandler Carruth <chandlerc@gmail.com> Rewrite #includes for llvm/Foo.h to llvm/IR/Foo.h as appropriate to
reflect the migration in r171366.

Re-sort the #include lines to reflect the new paths.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171369 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
72390b39c545426023ec104afe8706395d732bad 20-Dec-2012 Bill Wendling <isanbard@gmail.com> Rename llvm::Attributes to llvm::Attribute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170722 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
ad017fa7a4df7389d245d02a49b3c79ed70bedb9 20-Dec-2012 Bill Wendling <isanbard@gmail.com> Revert r170500. It over-zealously converted *ALL* things named Attributes, which is wrong here.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170721 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
094dbf917127a1228147587076d59ca45b7c258d 19-Dec-2012 Bill Wendling <isanbard@gmail.com> Rename the 'Attributes' class to 'Attribute'. It's going to represent a single attribute in the future.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170500 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
9e6111ad10d29802d8eff99c941d262979e99084 17-Dec-2012 Bill Schmidt <wschmidt@linux.vnet.ibm.com> This patch fixes PR13624, which notes a 64-bit PowerPC ELF ABI
incompatibility with how complex values are returned. It is sufficient
to flag all complex types as direct rather than indirect.

A new test case is provided that checks correct IR generation for the
various supported flavors of _Complex.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170302 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
785b778203a474c6e4b9e17ae91cd2a358868877 08-Dec-2012 Bill Wendling <isanbard@gmail.com> s/AttrListPtr/AttributeSet/g to better label what this class is going to be in the near future.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169652 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
441d9f7a36d3289eed0299823f05f70f810364ee 04-Dec-2012 Eli Bendersky <eliben@google.com> Adapt to LLVM commit 169291 which streamlines the usage of NaCl/NativeClient
in the triple.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169292 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
55fc873017f10f6f566b182b70f6fc22aefa3464 04-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Sort all of Clang's files under 'lib', and fix up the broken headers
uncovered.

This required manually correcting all of the incorrect main-module
headers I could find, and running the new llvm/utils/sort_includes.py
script over the files.

I also manually added quite a few missing headers that were uncovered by
shuffling the order or moving headers up to be main-module-headers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169237 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
db748a380ab89b1c0b6e751e55291f57605cccce 30-Nov-2012 Eli Friedman <eli.friedman@gmail.com> Fix a small calling-convention bug for x86-32. PR14453.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168959 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
c9715fc7c329c85e0b7aa0884c9209fa1fe5b819 27-Nov-2012 Bill Schmidt <wschmidt@linux.vnet.ibm.com> This patch addresses an incompatibility relative to the 64-bit PowerPC
ELF ABI.

Complex values are to be passed in registers as though the real and
imaginary parts were passed as separate parameters. Prior to this
patch, complex values were passed as byval aggregates. It turns out
that specifying getDirect() for all complex types when classifying the
argument type results in the desired behavior.

The new Clang test case verifies that the correct LLVM IR is generated
for caller and callee for each of the underlying types for _Complex.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168673 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
f419a856b56354781141a2a37f6190918be548ed 26-Nov-2012 Anton Korobeynikov <asl@math.spbu.ru> MSPGCC renamed ISR vectors from vector_<address> to __isr_<number>. This patch makes Clang reflect this scheme.
Patch by Job Noorman!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168598 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
426391cd51af86f9d59eceb0fb1c42153eccbb9a 16-Nov-2012 Richard Smith <richard-llvm@metafoo.co.uk> A step towards sorting out handling of triviality of special members in C++11.

Separate out the notions of 'has a trivial special member' and 'has a
non-trivial special member', and use them appropriately. These are not
opposites of one another (there might be no special member, or in C++11 there
might be a trivial one and a non-trivial one). The CXXRecordDecl predicates
continue to produce incorrect results, but do so in fewer cases now, and
they document the cases where they might be wrong.

No functionality changes are intended here (they will come when the predicates
start producing the right answers...).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168119 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
cb489dde66331865281e007b21f8f94da01f8d1e 06-Nov-2012 Manman Ren <mren@apple.com> Cleanup: 80-column violation

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167476 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
885ad6928f8aca8e9f66eeece53e00364e14ea75 06-Nov-2012 Manman Ren <mren@apple.com> ARM byval: when type alignment is bigger than ABI alignment, instead of
disabling byval, we set realign to true.

It will perform an aligned alloca, and call memcpy to copy the byval
argument to the local variable.
Change the size threshold back to 64 bytes.

rdar://12596507


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167440 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
fd1ba91e009ff7775744627f2855ffbfe713333e 05-Nov-2012 Manman Ren <mren@apple.com> ARM byval: when type alignment is bigger than ABI alignment, we can't guarantee
the type alignment of the byval argument. This patch will disable byval in this case,
it also increases the size threshold for turning on byval.

A backend fix will be attempted.

rdar://12596507


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167416 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
71c0dcc129262e565069fbfc0b5239a05c94b86c 05-Nov-2012 Ulrich Weigand <ulrich.weigand@de.ibm.com> On PowerPC64, integer arguments and return values need to be sign- or
zero-extended to 64 bits. This information is currently provided to
the back end by setting "signext" or "zeroext" attributes. However,
this is done only for integer types *smaller* than i32, not for i32
itself. This causes clang to generate code violating the ABI, which
results in a failure of the tramp3d-v4 test case (due to calling a
system library routine without ABI-required extension).

This patch implements custom versions of classifyArgumentType and
classifyReturnType for PPC64_SVR4_ABIInfo, which are the same as the
default versions except that they also classify "int" and "unsigned int"
as types needing extending. This fixed tramp3d-v4 on PowerPC64.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167393 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
710c517431954cfffba519fc7814cfbd8412a9aa 31-Oct-2012 Manman Ren <mren@apple.com> ARM AAPCS-VFP: fix tracking of allocated VFP registers.

According to the spec, we can backfill VFP registers that were skipped due
to alignment constraints.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167159 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
b3fa55f18d7b3759b3a6547719cf5b3418370a96 31-Oct-2012 Manman Ren <mren@apple.com> ARM AAPCS-VFP: fix handling of homogeneous aggreate.

If HA can only partially fit into VFP registers, we add padding to make sure
HA will be on stack and later VFP CPRCs will be on stack as well.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167058 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
485717e8e43034d653ccd7f35f4546773e016e27 26-Oct-2012 Bill Schmidt <wschmidt@linux.vnet.ibm.com> This patch addresses a 64-bit PowerPC ELF ABI compatibility issue with
varargs parameter passing.

A strict reading of the ABI indicates that any argument with alignment greater
than 8 may require skipping doublewords in the parameter save area to align
the argument, and hence require skipping GPRs. In practice, this is not done
by GCC. The alignment restriction is used for internal alignment of a
structure, but a structure with 16-byte alignment, for example, is not
itself 16-byte aligned in the parameter save area. Although this is messy,
it has become the de facto standard used in building existing libraries.

My initial varargs support followed the ABI language, but not the de facto
standard. Running the GCC compatibility test suite exposed this issue, and
indeed showed that LLVM didn't pass parameters self-consistently with my
original logic. Removing the additional alignment logic allows the affected
tests to now pass.

I modified the ppc64-varargs-struct.c test case to remove the existing test
for generation of alignment code, which is no longer appropriate.

Built and tested on powerpc64-unknown-linux-gnu with no new regressions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166805 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
b16abb1bd8ed94c7994836de24915703e6a4e81a 25-Oct-2012 David Tweed <david.tweed@arm.com> Modify the targets to set appropriate calling convention defaults and C variables when using a gnueabihf or aapcs-vfp target.

Tested by me and Wei-Ren Chen.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166679 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
e4aeeaae8ee93ad5e07c646046c650d594f2775e 24-Oct-2012 Rafael Espindola <rafael.espindola@gmail.com> Add padding inreg registers to cause llvm to skip ecx when needed with
the x86_fastcallcc calling convention.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166538 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
b6932692234eba2472ef85a38434496e9342fd38 24-Oct-2012 Rafael Espindola <rafael.espindola@gmail.com> Add inreg markers with the x86_fastcallcc calling convention.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166537 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
5f14fcbd45870585a136ae735d29d0e085c0d7f8 23-Oct-2012 Rafael Espindola <rafael.espindola@gmail.com> Don't try to use inreg with 0 sized structs. Thanks to Eli for reporting the
regression.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166461 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
c6f84cf73e0bc04faacd1a9b7845e014e7fac21e 20-Oct-2012 Benjamin Kramer <benny.kra@googlemail.com> Move private classes into anonymous namespaces.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166377 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
0b4cc950c54c8dd2de51587ef48446de670fa012 19-Oct-2012 Rafael Espindola <rafael.espindola@gmail.com> Fix handling of the regparm attribute in the presence of classes with copy
constructors.

When I first moved regparm support to TargetInfo.cpp I tried to isolate it
in classifyArgumentTypeWithReg, but it is actually a lot easier to flip the
code around and check for regparm at the end of the decision tree.

Without this refactoring classifyArgumentTypeWithReg would have to duplicate
the logic about when to use non-byval indirect arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166266 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
263366f9241366f29ba65b703120f302490c39ff 17-Oct-2012 Derek Schuff <dschuff@google.com> Add pnaclcall convention to Native Client targets.

Because PNaCl bitcode must be target-independent, it uses some
different bitcode representations from other targets (e.g. byval and
sret for structures). This means that without additional type
information, it cannot meet some native ABI requirements for some
targets (e.g. passing structures containing unions by value on
x86-64). To allow generation of code which uses the correct native
ABIs, we also support triples such as x86_64-nacl, which uses
target-dependent IR (as opposed to le32-nacl, which uses byval and
sret).

To allow interoperation between the two types of code, this patch adds
a calling convention attribute to be used in code compiled with the
target-dependent triple, which will generate code using the le32-style
bitcode. This calling convention does not need to be explicitly
supported in the backend because it determines bitcode representation
rather than native conventions (the backend just needs to undersand
how to handle byval and sret for the Native Client OS).

This patch implements __attribute__((pnaclcall)) to generate calls in
bitcode according to the le32 bitcode conventions, an attribute which
is accepted by any Native Client target, but issues a warning
otherwise.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166065 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
933710242edc66da21e865948d4c8e3a6badf2df 16-Oct-2012 Manman Ren <mren@apple.com> ARM ABI: fix ABI alignment issues in varargs.

We generalize r166040 to handle ABI alignment issues for all types.

rdar://12439123


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166052 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
97f81573636068fb9536436188caadf030584e58 16-Oct-2012 Manman Ren <mren@apple.com> ARM ABI: passing illegal vector types as varargs.

We expand varargs in clang and the call site is handled in the back end, it is
hard to match exactly how illegal vectors are handled in the backend. Therefore,
we legalize the illegal vector types in clang:
if (Size <= 32), legalize to i32.
if (Size == 64), legalize to v2i32.
if (Size == 128), legalize to v4i32.
if (Size > 128), use indirect.

rdar://12439123


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166043 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
d105e73368e677e65af724947be85ec87a0fa45e 16-Oct-2012 Manman Ren <mren@apple.com> ARM ABI: fix ABI alignment issues when passing legal vector types as varargs.

We create an aligned temporary space and copy the content over from ap.cur to
the temporary space. This is necessary if the natural alignment of the type is
greater than the ABI alignment.

rdar://12439123


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166040 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
0d5833921cc728bc1d2e45fbaf7b3e11cddbf99d 15-Oct-2012 Bill Wendling <isanbard@gmail.com> Move the Attributes::Builder outside of the Attributes class and into its own class named AttrBuilder. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165961 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
75d37b493e2282f993a19a166bd573b03a7535af 15-Oct-2012 Bill Wendling <isanbard@gmail.com> Use enum values instead of magic numbers for indexing into the attribute list.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165925 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
50e6b18f99c45b31e6216ab221f6b3911b24fa1f 15-Oct-2012 Bill Wendling <isanbard@gmail.com> Attributes Rewrite

Convert the uses of the Attributes class over to the new format. The
Attributes::get method call now takes an LLVM context so that the attributes
object can be uniquified and stored.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165918 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
e91e9ecf2f6ef18ed9d9642915e5e1abb63e150a 14-Oct-2012 Bill Wendling <isanbard@gmail.com> Use the Builder to create the stack alignment attribute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165888 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
b1f5fe017a596e0c7749dee10c9d3ff1c0f2788c 12-Oct-2012 Bill Schmidt <wschmidt@linux.vnet.ibm.com> This patch addresses PR13948.

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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165816 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
90da80c869eebc5a73bf031af5bedb6f281214fb 11-Oct-2012 Derek Schuff <dschuff@google.com> Fix build failure from r165722

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165731 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
7da46f949f6ec63d7c7dcda5f49588261c669ffb 11-Oct-2012 Derek Schuff <dschuff@google.com> Properly factor Native Client defines to support NaCl as an OS
with x86/ARM architecture

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165722 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
babaf31d401310464db93627ef6b195a7ffb1029 11-Oct-2012 Derek Schuff <dschuff@google.com> Make X86_64ABIInfo clean for ABIs with 32 bit pointers, such as X32
and Native Client

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165715 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
fac631052809b59c1b66f687c08a743de7fb50e9 10-Oct-2012 Bill Wendling <isanbard@gmail.com> Have 'addFnAttr' take the attribute enum value. Then have it build the attribute object and add it appropriately. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165596 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
25a6a84cf5067b32c271e3ba078676dee838798d 08-Oct-2012 Micah Villmow <villmow@gmail.com> Move TargetData to DataLayout.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165395 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
2fc107f5652a526d9c2972dc3b386e5d86769e44 03-Oct-2012 Bill Schmidt <wschmidt@linux.vnet.ibm.com> This patch enables general varargs support for the 64-bit PPC SVR4 ABI.

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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165143 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
f3477c13eeaf11b32a41f181398fb5deffd0dd73 27-Sep-2012 Sylvestre Ledru <sylvestre@debian.org> Revert 'Fix a typo 'iff' => 'if''. iff is an abreviation of if and only if. See: http://en.wikipedia.org/wiki/If_and_only_if Commit 164766

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164769 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
94ff8e1f57c6382d91d0de981a4f311509d83e37 27-Sep-2012 Sylvestre Ledru <sylvestre@debian.org> Fix a typo 'iff' => 'if'

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164766 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
db9eeb88d8e63a28f0b7d623011ec286a84f68a3 21-Sep-2012 Bill Wendling <isanbard@gmail.com> Update for encapsulating the "construct*AlignmentFromInt" methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164374 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
9ed63f8b87b1f7d074d21cc1210fd28d93291bea 06-Sep-2012 Derek Schuff <dschuff@google.com> Use custom ABIInfo for le32/PNaCl argument codegen

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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163333 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
94a7142f74bb4a9daa53c22087b19d4568073109 02-Sep-2012 Logan Chien <tzuhsiang.chien@gmail.com> Rename ANDROIDEABI to Android.

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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163088 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
634b3d26969f139a25b223074567ba5ab7ba7dd9 13-Aug-2012 Manman Ren <mren@apple.com> ARM: enable struct byval for AAPCS-VFP.

rdar://9877866


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161790 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
60e25804d14a52c173548f0f6c66d3d831cb901c 10-Aug-2012 Manman Ren <mren@apple.com> Add comments for turning on byval

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161702 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
16ba7c8498933781cff103058612e76e8045c798 10-Aug-2012 Manman Ren <mren@apple.com> ARM: enable struct byval for AAPCS.

rdar://9877866
PR://13350


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161694 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
79f30981fcd25c6ff88807372a2744af02a7690e 09-Aug-2012 Eli Friedman <eli.friedman@gmail.com> Fix AAPCS ABI. I can't actually test this, but it restores the behavior from before r159168. PR13562.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161554 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
42f74f21ece01dc8573d5377859d327fbb23b26c 09-Aug-2012 Eli Friedman <eli.friedman@gmail.com> clang support for Bitrig (an OpenBSD fork); patch by David Hill.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161546 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
b48280ba1790122cd3fa6e17c88ecd6a4571a4eb 31-Jul-2012 Rafael Espindola <rafael.espindola@gmail.com> Handle functions with struct arguments or return types and the regparm
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161022 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
aa9cf8d3abd8760d78b20e9194df169bbd8b0f01 24-Jul-2012 Rafael Espindola <rafael.espindola@gmail.com> move X86_32ABIInfo::computeInfo out of line.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160652 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
b33a3c448ec669a7ef530ef8094cdfc9346468cf 24-Jul-2012 Rafael Espindola <rafael.espindola@gmail.com> Make classifyReturnType and classifyArgumentType private.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160648 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
adfa45ffd67d1959cb1ff8cec88ad2ff3ffb7798 21-Jul-2012 Tim Northover <Tim.Northover@arm.com> Add "long double" to permitted list of ARM complex homogeneous aggregates.

Under AAPCS, long double is the same as double, which means it should be
allowed as part of a homogeneous aggregate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160586 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
d4f5198ae07d9a4958d8191bac694ded12173ad9 04-Jul-2012 Benjamin Kramer <benny.kra@googlemail.com> Remove get(V)BaseClassOffsetInBits, the CharUnit functions should be used instead.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159719 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
c359f2029d19016560a422551704ccc2419be0b1 03-Jul-2012 Akira Hatanaka <ahatanaka@mips.com> Make the following changes in the way Mips handles vector arguments and return
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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159676 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
78eb76e2eefdc381dd4a97bc8ee628ae975aff35 26-Jun-2012 Manman Ren <mren@apple.com> ARM: enable struct byval for APCS.

Revert r136662 which disables ARM byval.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159168 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
581deb3da481053c4993c7600f97acf7768caac5 06-Jun-2012 David Blaikie <dblaikie@gmail.com> Revert Decl's iterators back to pointer value_type rather than reference 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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158104 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
f4bd4d8fe029ca314c2c61edb1d2a65bc18cdbf2 05-Jun-2012 Eli Friedman <eli.friedman@gmail.com> Fix a bug with va_arg and vectors on Darwin x86-32. <rdar://problem/11592208>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158017 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
2c585b991596859f39860b6094247ba027a03530 24-May-2012 Justin Holewinski <jholewinski@nvidia.com> Replace PTX back-end with NVPTX back-end in all places where Clang cares

NV_CONTRIB

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157403 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
edb66f38dbdc501342aa1f17c8a15a34ed73584d 21-May-2012 Peter Collingbourne <peter@pcc.me.uk> Teach Clang about the NVPTX backend.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157173 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
91338cf4129cfdb85af7e9ef396ab09621da10ec 11-May-2012 Akira Hatanaka <ahatanaka@mips.com> Coerce byval aggregate arguments to integers whose size matches the integer
register size of the target architecture.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156650 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
8aeb1471ef62a4befba00721925a3717914f21d8 11-May-2012 Akira Hatanaka <ahatanaka@mips.com> Fix handling of vector return types.

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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156642 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
0fbc4b97bd763850ecd72ad79b22b1ad85c5d965 09-May-2012 Roman Divacky <rdivacky@freebsd.org> Implement PPC64TargetCodeGenInfo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156491 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
262bc18e32500558af7cb0afa205b34bd37bafed 30-Apr-2012 David Blaikie <dblaikie@gmail.com> Remove the ref/value inconsistency in filter_decl_iterator.

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)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155808 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
eaf856db5d1a272dc7188937206ef4572836f82a 13-Apr-2012 Anton Korobeynikov <asl@math.spbu.ru> Step forward with supporting of ARM homogenous aggregates:
- Handle unions
- Handle C++ classes


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154664 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
4e4d08403ca5cfd4d558fa2936215d3a4e5a528d 11-Mar-2012 David Blaikie <dblaikie@gmail.com> Unify naming of LangOptions variable/get function across the Clang stack (Lex to AST).

The member variable is always "LangOpts" and the member function is always "getLangOpts".

Reviewed by Chris Lattner

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
edfac0302490d84419eb958c812c533b8df29785 10-Mar-2012 Daniel Dunbar <daniel@zuster.org> IRgen/ABI/x86_64: Avoid passing small structs using byval sometimes.

- 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?

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152462 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
6c60c8d7466b3191602dbb8e4a81f4ee7d9a09a6 22-Feb-2012 Aaron Ballman <aaron@aaronballman.com> Adding support for Microsoft's thiscall calling convention. Clang side of the patch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151122 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
de5d3c717684f3821b8db58037bc7140acf134aa 17-Feb-2012 John McCall <rjmccall@apple.com> Whether an argument is required (in contrast with being an
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150788 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
a34e92116581531f7325527d952a9ffcc819d905 09-Feb-2012 Akira Hatanaka <ahatanaka@mips.com> Class objects passed by value follow the same rules as structure objects.
Double fields of by-value class objects should be passed in floating point
registers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150200 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
da54ff306270e179f64d046369419724356d30d7 09-Feb-2012 Akira Hatanaka <ahatanaka@mips.com> Fix bugs in function MipsABIInfo::returnAggregateInRegs. Functions returning
class objects follow the same rules as those returning struct objects.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150196 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
526cdfb2bf51c8c6612504f1d06c02c736d3d126 08-Feb-2012 Akira Hatanaka <ahatanaka@mips.com> Do not return records with non trivial destructors or copy constructors in
registers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150035 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
8b418685e9e4f02f4eb2a76e1ec063e07552b68d 07-Feb-2012 Chris Lattner <sabre@nondot.org> simplify a bunch of code to use the well-known LLVM IR types computed by CodeGenModule.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149943 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
55fc7e2b8005ba87a81664d065e9b9e2fff1b1af 25-Jan-2012 Eli Friedman <eli.friedman@gmail.com> Add some ABI tweaks for i386-pc-win32 triple so that we return structs in an MSVC-compatible way. Patch by Joe Groff.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148992 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
8f675e4b18fb9b8972847e9f681044184da5586c 24-Jan-2012 Akira Hatanaka <ahatanaka@mips.com> Make sure the integer type used to align the vaarg address is the same as the
type of pointers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148753 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
a8536c086fbac59bd7f9a6493bc99b4a92d585e4 24-Jan-2012 Akira Hatanaka <ahatanaka@mips.com> Ignore return type if its size is zero.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148744 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
3026348bd4c13a0f83b59839f64065e0fcbea253 20-Jan-2012 David Blaikie <dblaikie@gmail.com> More dead code removal (using -Wunreachable-code)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148577 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
cc66254946ec86a2ec94ff9c8db96b05a364a94f 12-Jan-2012 Akira Hatanaka <ahatanaka@mips.com> Take into account the pointer to an aggregate that is passed as a hidden
argument when Offset is initialized.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147986 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
2afd23da0e33a8cd44c1c46b1651c677fdd27151 12-Jan-2012 Akira Hatanaka <ahatanaka@mips.com> Call CodeGenTypes::ConvertType to get LLVM::Type*.
Remove function MipsABIInfo::GetFloatingPointTy.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147985 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
9db0a5e7e360d8048c83ee1c46a88c4172182791 11-Jan-2012 Akira Hatanaka <ahatanaka@mips.com> Remove switch/case statements and call GetFloatingPointTy() instead to get the
floating point type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147894 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
6d1080fd1851f18bd40bb46fa074aa1252b13e8e 11-Jan-2012 Akira Hatanaka <ahatanaka@mips.com> Flatten float complex arguments. N32/64 requires float complex arguments be
passed in floating point registers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147892 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
9659d59ec368933050684af573b6d32ab5714332 10-Jan-2012 Akira Hatanaka <ahatanaka@mips.com> Remove space.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147889 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
b43550bf1bd944a16cdae9703cb1c2049b04e6bd 10-Jan-2012 Chandler Carruth <chandlerc@gmail.com> Add support for the androideabi environment to our triple support, and
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147872 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
91ee4a7f36b520248f505f7d82418eb8fc08f315 10-Jan-2012 Joerg Sonnenberger <joerg@bec.de> Contrary to the other BSDs, NetBSD followed the ELF ABI for structure
passing on i386 and does not use registers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147856 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
a33fd393d5255716e904fed021f87260095ed00a 09-Jan-2012 Akira Hatanaka <ahatanaka@mips.com> Insert padding before unaligned long double arguments.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147791 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
f0cc2087b18c48b17c2f647c88a3e7eef19285fd 07-Jan-2012 Akira Hatanaka <ahatanaka@mips.com> Add field PaddingType to ABIArgInfo which specifies the type of padding that
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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147699 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
c7ecc2e3691e484cffcfec7fcefef18b2bd23e5f 04-Jan-2012 Akira Hatanaka <ahatanaka@mips.com> Have functions return structures smaller than 128-bit in registers if ABI
is either N32 or N64.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147520 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
9631939f82c0eaa6fb3936a0ce58a41adfbc9011 12-Dec-2011 Tony Linthicum <tlinth@codeaurora.org> Hexagon backend support

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146413 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
68805fef77978e69a14584148a3c6a4239e34171 06-Dec-2011 Eli Friedman <eli.friedman@gmail.com> Minor comment update.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145905 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
ee1ad99f1ced9ffee436466ef674d4541c37864e 02-Dec-2011 Eli Friedman <eli.friedman@gmail.com> When we're passing a vector with an illegal type through memory on x86-64, 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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145652 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
3ed7903d27f0e7e0cd3a61c165d39eca70f3cff5 01-Dec-2011 Eli Friedman <eli.friedman@gmail.com> Don't use a varargs convention for calls unprototyped functions where one of the arguments is an AVX vector.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145574 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
ce275675d33142c235d7027db16abe43da616ee4 29-Nov-2011 Tanya Lattner <tonic@nondot.org> Correct the code generation for function arguments of vec3 types on x86_64 when they are greater than 128 bits. This was incorrectly coercing things like long3 into a double2.
Add test case.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145312 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
5a1ac89b244940a0337ea7ae7dc371e2a9bf7c50 18-Nov-2011 Eli Friedman <eli.friedman@gmail.com> Finish r144971, which was an incomplete commit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144972 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
7e7ad3f8fa150de6144be332ae4bfe5d1acb5c6d 18-Nov-2011 Eli Friedman <eli.friedman@gmail.com> Fix the meaning of an "empty" record for the case of a zero-length array. Use isEmptyRecord for arguments on x86-32; there are structs of size 0 which don't count as empty.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144971 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
8d2fe42417fcc861b3324d585dc29ac4da59bee0 18-Nov-2011 Eli Friedman <eli.friedman@gmail.com> Make va_arg on x86-64 compute alignment the same way as argument passing.

Fixes <rdar://problem/10463281>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144966 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
7b1fb81a512def2a20e2834b4598a7b3a740dc7f 18-Nov-2011 Eli Friedman <eli.friedman@gmail.com> A bunch of fixes to argument passing and va_arg on Darwin x86-32 for structures containing an SSE vector.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144963 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
506d4e375a6a36a49eb70578983dc4acaf2f15ae 18-Nov-2011 Eli Friedman <eli.friedman@gmail.com> Don't try to expand struct arguments containing holes on x86-32. From gcc struct layout tests.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144961 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
bd4d3bcd2cd64d1bba29b2a52705b97d68ebccd5 18-Nov-2011 Eli Friedman <eli.friedman@gmail.com> Simplify code for returning a struct for Darwin x86-32 ABI. Use a better 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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144960 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
5a4d35247f55dae6dd0d5ad349ecadbbea0b4572 18-Nov-2011 Eli Friedman <eli.friedman@gmail.com> Ignore empty unions in argument lowering on x86-32. From gcc struct layout tests.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144944 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
b49d5a6606ec9b912f74279c935934c4ecb39dfa 04-Nov-2011 Akira Hatanaka <ahatanaka@mips.com> Use a single integer type for a sub-doubleword part of a byval structure.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143666 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
90306934bccaadaf2b538b3c90c3dd478aa1e7d8 03-Nov-2011 Jan Wen Voung <jvoung@google.com> Do not add "byval" attribute to records with non-trivial copy constructors
and destructors in the DefaultABIInfo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143601 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
b551dd31f6b15aa959127ee906084fcf5bf0154e 03-Nov-2011 Akira Hatanaka <ahatanaka@mips.com> Set MinABIStackAlignInBytes to 8 if ABI is N32/64.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143597 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
d5a257f39b6f78fb66bb0227486b65592476c572 03-Nov-2011 Akira Hatanaka <ahatanaka@mips.com> Convert the type of a structure passed by value if it has double precision
fields in order to ease handling of such structures in backend.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143596 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
c0e3b665344a39bd733e0d9f55bf0f1937922289 03-Nov-2011 Akira Hatanaka <ahatanaka@mips.com> Return function results whose size is smaller than 128-bits in registers if ABI
is N32/64.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143589 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
3b694fab31d3a7a8379996cbe7ef8d53f7d677bc 02-Nov-2011 Bob Wilson <bob.wilson@apple.com> Check for homogeneous aggregate return values with ARM's AAPCS-VFP ABI.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143530 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
0986eb5c59c43809df95bac10138edd44c1ebb69 25-Oct-2011 Dan Gohman <gohman@apple.com> Remove the SystemZ backend.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142879 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
2f7aa998c0d6494301c12c4fceb6134a1bc248ab 13-Oct-2011 Peter Collingbourne <peter@pcc.me.uk> TCE target: conversion of OpenCL reqd_work_group_size attr to metadata

Patch by Pekka Jääskeläinen!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141865 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
a6b8b2c09610b8bc4330e948ece8b940c2386406 10-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> Constant expression evaluation refactoring:
- 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141561 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
0628b724ff68105dc88af00a39f859447f22981e 08-Oct-2011 Ted Kremenek <kremenek@apple.com> Free 'TheTargetCodeGenInfo' in the class CodeGenModule. This looks like an 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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141479 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
744d90bfe2a43847764a707b1bee7ef1e30ad5f2 06-Oct-2011 Peter Collingbourne <peter@pcc.me.uk> CUDA: set proper calling conventions for PTX

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141296 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
818eafb6ac56c87b80b34be29ca115cd309026d2 05-Oct-2011 Justin Holewinski <justin.holewinski@gmail.com> PTX: Set proper calling conventions for PTX in OpenCL mode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141193 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
eb2d1f1c88836bd5382e5d7aa8f6b85148a88b27 23-Sep-2011 David Blaikie <dblaikie@gmail.com> Removing a bunch of dead returns/breaks after llvm_unreachables.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140407 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
b219cfc4d75f0a03630b7c4509ef791b7e97b2c8 23-Sep-2011 David Blaikie <dblaikie@gmail.com> Switch assert(0/false) llvm_unreachable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140367 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
01f151e0ffba72bcad770bea5f563a9b68ca050e 21-Sep-2011 John McCall <rjmccall@apple.com> ANSI C requires that a call to an unprototyped function type succeed
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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140241 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
8c6dfbe044155277b06e4345f1b98910692390b6 20-Sep-2011 Akira Hatanaka <ahatanak@gmail.com> Create a MipsTargetCodeGenInfo object for mips64/mips64el. The size of the
UnwindException structure is 32 for mips64.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140165 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
e624fa02b2c2c614b3a27a25516885fc64e07001 20-Sep-2011 Akira Hatanaka <ahatanak@gmail.com> Add a parameter to MipsTargetCodeGenInfo's constructor.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140161 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
bcfd1f55bfbb3e5944cd5e03d07b343e280838c4 02-Sep-2011 Douglas Gregor <dgregor@apple.com> 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
/external/clang/lib/CodeGen/TargetInfo.cpp
49e34be6ae0c25b9843610cdd2fd6fea9cd8b870 30-Aug-2011 John McCall <rjmccall@apple.com> 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
/external/clang/lib/CodeGen/TargetInfo.cpp
7b0a0383ef5ba23cbf2968f7cb314be0b80847e8 12-Aug-2011 Akira Hatanaka <ahatanak@gmail.com> 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
/external/clang/lib/CodeGen/TargetInfo.cpp
3827e42982d578ace7713f2e43a7e7e2fa5f8418 12-Aug-2011 Akira Hatanaka <ahatanak@gmail.com> 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
/external/clang/lib/CodeGen/TargetInfo.cpp
194f06a476d299a7a70e5ff1d152f5895dc0a76c 03-Aug-2011 Bob Wilson <bob.wilson@apple.com> 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
/external/clang/lib/CodeGen/TargetInfo.cpp
e164c180527354acc16c1b9b2c5a5ed4a1e484d4 03-Aug-2011 Rafael Espindola <rafael.espindola@gmail.com> 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
/external/clang/lib/CodeGen/TargetInfo.cpp
53fc1a6151ec31350309f479c0d2252366e4815c 02-Aug-2011 Bob Wilson <bob.wilson@apple.com> Revert "Re-enable byval for ARM in clang. rdar://problem/7662569"

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136662 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
c35e69d758e43563ec3785cdd4472d9f2386cf9a 01-Aug-2011 Akira Hatanaka <ahatanak@gmail.com> 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
/external/clang/lib/CodeGen/TargetInfo.cpp
511949bf7ea721556ea3eb2777fc1e36e6c3e243 01-Aug-2011 Akira Hatanaka <ahatanak@gmail.com> 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
/external/clang/lib/CodeGen/TargetInfo.cpp
5f9e272e632e951b1efe824cd16acb4d96077930 23-Jul-2011 Chris Lattner <sabre@nondot.org> 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
/external/clang/lib/CodeGen/TargetInfo.cpp
2acc6e3feda5e4f7d9009bdcf8b1cd777fecfe2d 18-Jul-2011 Chris Lattner <sabre@nondot.org> 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
/external/clang/lib/CodeGen/TargetInfo.cpp
e9b5d77b7bfd3e8bba05df9914a6e8c336d68ff3 15-Jul-2011 Joerg Sonnenberger <joerg@bec.de> Fix typo


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135285 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
b8981df0ed2886dfa221f2fad6d86872c39d3549 13-Jul-2011 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> 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
/external/clang/lib/CodeGen/TargetInfo.cpp
548e478b8bd02b0295bc4efd0c282337f00646fd 13-Jul-2011 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> Revert r134946

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135004 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
75d28b58d97c60cc01898b8e4ca958c27aef05c7 12-Jul-2011 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> Fix a typo!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134952 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
089d8927abe73fe6a806987937d9b54b1a7a8659 12-Jul-2011 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> 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
/external/clang/lib/CodeGen/TargetInfo.cpp
ccafadb68f5a8132a4ee23f441cf5d6976a4133b 12-Jul-2011 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> 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
/external/clang/lib/CodeGen/TargetInfo.cpp
4943c15df59fdec444656a48c16e72a2077ab61f 12-Jul-2011 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> 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
/external/clang/lib/CodeGen/TargetInfo.cpp
ef6de3da8572607f786303c07150daa6e140ab19 11-Jul-2011 Jay Foad <jay.foad@gmail.com> 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
/external/clang/lib/CodeGen/TargetInfo.cpp
9cbe4f0ba01ec304e1e3d071c071f7bca33631c0 09-Jul-2011 Chris Lattner <sabre@nondot.org> 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
/external/clang/lib/CodeGen/TargetInfo.cpp
c3e0fb406fb6fe83566dc6d8b05362e0a2c1e191 09-Jul-2011 Eli Friedman <eli.friedman@gmail.com> 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
/external/clang/lib/CodeGen/TargetInfo.cpp
528a8c7b4c39ae1c551760fd087a508a71ee9541 09-Jul-2011 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> 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
/external/clang/lib/CodeGen/TargetInfo.cpp
df41b4c10ab2a0096957e415e520bd467f8b2e9e 09-Jul-2011 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> 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
/external/clang/lib/CodeGen/TargetInfo.cpp
14508ff0bffee0fdfe5d336946c6db0e709099c8 02-Jul-2011 Eli Friedman <eli.friedman@gmail.com> 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
/external/clang/lib/CodeGen/TargetInfo.cpp
ded137fcab19f0aace08a28b5c91574e6b23debc 29-Jun-2011 Eli Friedman <eli.friedman@gmail.com> 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
/external/clang/lib/CodeGen/TargetInfo.cpp
4857947d18a7d0d0c250892fc5597ec0aecc9823 21-Jun-2011 NAKAMURA Takumi <geek4civic@gmail.com> De-Unicode-ify in comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133501 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
7650d95a1a616ea300f37126a8dfc93dc19a662a 19-Jun-2011 Chris Lattner <sabre@nondot.org> update for api change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133365 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
f85e193739c953358c865005855253af4f68a497 16-Jun-2011 John McCall <rjmccall@apple.com> 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
/external/clang/lib/CodeGen/TargetInfo.cpp
619e8875d29cc019c7360595f66b9f91b3439494 02-Jun-2011 Akira Hatanaka <ahatanak@gmail.com> Add stuff for o32 ABI conformance.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132443 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
de92d739ba0ef42a5a7dcfd6e170329549d0716b 23-May-2011 Chris Lattner <sabre@nondot.org> 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
/external/clang/lib/CodeGen/TargetInfo.cpp
855d227967f8332237f1f1cf8eb63a1e22d8be05 23-May-2011 Chris Lattner <sabre@nondot.org> 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
/external/clang/lib/CodeGen/TargetInfo.cpp
09345d1c2adf95ea90f06911dbb4f12372b7f24c 18-May-2011 Roman Divacky <rdivacky@freebsd.org> Add ARMTargetCodeGenInfo::initDwarfEHRegSizeTable() defining 16 32bit regs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131558 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
c5f18f3e8c3f1e9cb25534f9a9676f112bedc2a7 17-May-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> 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
/external/clang/lib/CodeGen/TargetInfo.cpp
b7d2516f5dd1e5dfb112fc4e273db16f636b7fdc 17-May-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> 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
/external/clang/lib/CodeGen/TargetInfo.cpp
a1dadc9874992fdb5a9a721bec6cf1b9f0e90fed 28-Apr-2011 Stuart Hastings <stuart@apple.com> 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
/external/clang/lib/CodeGen/TargetInfo.cpp
ea971e968f2e4a2cd8cbaf4a8cb416ed70c35ffb 28-Apr-2011 Stuart Hastings <stuart@apple.com> 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
/external/clang/lib/CodeGen/TargetInfo.cpp
b7f62d01369c2a6e4af5dd2a76052ae65892161d 28-Apr-2011 Stuart Hastings <stuart@apple.com> 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
/external/clang/lib/CodeGen/TargetInfo.cpp
67d097e1232b7d66f58989c16a45b8a11721f76e 27-Apr-2011 Stuart Hastings <stuart@apple.com> 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
/external/clang/lib/CodeGen/TargetInfo.cpp
ad27eeaf03fc834f5e8e8d5b343582fe6b29000d 26-Apr-2011 Eric Christopher <echristo@apple.com> 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
/external/clang/lib/CodeGen/TargetInfo.cpp
df39fa2811933737974862ad376f140e4cdfeee1 26-Apr-2011 Stuart Hastings <stuart@apple.com> 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
/external/clang/lib/CodeGen/TargetInfo.cpp
0259c3a3df3c2f3b9de7e3845df1eea3ac04e1aa 22-Apr-2011 Justin Holewinski <justin.holewinski@gmail.com> PTX: Add default PTX calling conventions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129987 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
67a5773ba529aebcad03fa5e7cc95555d133e93d 21-Apr-2011 John McCall <rjmccall@apple.com> 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
/external/clang/lib/CodeGen/TargetInfo.cpp
db57a4cdb0a6abf3239f3a794a900ce312c5887b 19-Apr-2011 Daniel Dunbar <daniel@zuster.org> ADT/Triple: Switch to using .isOSDarwin() predicate.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129823 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
fc8f0e14ad142ed811e90fbd9a30e419e301c717 15-Apr-2011 Chris Lattner <sabre@nondot.org> 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
/external/clang/lib/CodeGen/TargetInfo.cpp
414d8967e1d760ea1e19a4aca96b13777a8cf8c5 14-Apr-2011 Anton Korobeynikov <asl@math.spbu.ru> 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
/external/clang/lib/CodeGen/TargetInfo.cpp
34c1af83e159cfe0f43e7a855e84783f301fc1f1 05-Apr-2011 Sandeep Patel <deeppatel1987@gmail.com> 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
/external/clang/lib/CodeGen/TargetInfo.cpp
bbf3bacb3e0c1ebb3e8a4a8b1330404a7e379315 30-Mar-2011 Jay Foad <jay.foad@gmail.com> 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
/external/clang/lib/CodeGen/TargetInfo.cpp
0507be662df482b5c67b7905ed7ca368cb5c6b69 07-Mar-2011 Bill Wendling <isanbard@gmail.com> 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
/external/clang/lib/CodeGen/TargetInfo.cpp
9c6082fe89c61af697f017aa80937581cc2128d8 02-Mar-2011 Tilmann Scheller <tilmann.scheller@googlemail.com> 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
/external/clang/lib/CodeGen/TargetInfo.cpp
88d117c2eedd7c5bec57ac983a98d5e12bdd2cc6 02-Mar-2011 Tilmann Scheller <tilmann.scheller@googlemail.com> 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
/external/clang/lib/CodeGen/TargetInfo.cpp
6f17433b2d50262856ab09f52af96c6132b01012 22-Feb-2011 NAKAMURA Takumi <geek4civic@gmail.com> lib/CodeGen/TargetInfo.cpp: On Win64, arg i128 should be emitted as INDIRECT.

mingw-w64's i128 tweak should be done with x86_64-mingw32.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126186 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
4b93d660c6326ec79b5e369317d1051cf826c2f3 20-Feb-2011 Peter Collingbourne <peter@pcc.me.uk> Re-instate r125819 and r125820 with no functionality change

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126060 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
96b1d4b4eb6b18dd6df7a2c0833332b45840580f 19-Feb-2011 Rafael Espindola <rafael.espindola@gmail.com> Revert 125820 and 125819 to fix PR9266.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126050 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
ef9a1d0e13662162aa8cdae8732c33b5d751d80c 18-Feb-2011 Peter Collingbourne <peter@pcc.me.uk> Move TargetInfo::adjustInlineAsmType to TargetCodeGenInfo

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125819 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
0aa205765aec0aa5eed672f8e3cade543372edcd 17-Feb-2011 NAKAMURA Takumi <geek4civic@gmail.com> Triple::MinGW64 is deprecated and removed. We can use Triple::MinGW32 instead.

No one uses *-mingw64. mingw-w64 is represented as {i686|x86_64}-w64-mingw32.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125742 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
125b4cb35536e45201f8f2cb19ee620e3ad67c49 17-Feb-2011 NAKAMURA Takumi <geek4civic@gmail.com> Fix whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125741 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
8e50a96b387dca7525caa8a6add31420dd82a2cd 02-Feb-2011 Benjamin Kramer <benny.kra@googlemail.com> Add NetBSD target support. Patch by Joerg Sonnenberger.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124736 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
ff8be0e08e409af53130d12ce36019b35288fb78 19-Jan-2011 NAKAMURA Takumi <geek4civic@gmail.com> lib/CodeGen/TargetInfo.cpp: Fix coding style and erase an obsolete comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123790 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
a75732201b19059a0e56a88b0eb5a0e5dd3c6ca3 17-Jan-2011 NAKAMURA Takumi <geek4civic@gmail.com> lib/CodeGen/TargetInfo.cpp: Add Win64 calling conversion.

FIXME: It would be incompatible to Microsoft's in one point.
On mingw64-gcc, {i128} is expanded for args and returned as {rax, rdx}.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123692 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
29dd67bc59249adef304827d68b094f5b5cfc645 11-Jan-2011 Bob Wilson <bob.wilson@apple.com> Remove special handling for opaque Neon vector types.
Clang does not wrap the vectors in structs anymore so this isn't needed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123241 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
0024f940dd15987b8ffbe6e787dcf860a9ea1eff 11-Jan-2011 Bob Wilson <bob.wilson@apple.com> Move DefaultABIInfo::classifyReturnType where it belongs. No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123195 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
276fdf408050d205f3a7f34c1e788224a67d2098 19-Dec-2010 Wesley Peck <peckw@wesleypeck.com> 1. Add some ABI information for the Microblaze.
2. Add attibutes "interrupt_handler" and "save_volatiles" for the Microblaze target.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122184 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
77d6605159dd7b512be8e555f4fe78b2d6c34290 12-Nov-2010 Benjamin Kramer <benny.kra@googlemail.com> Use a twine.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118892 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
a14f5979572aa25c03d24750ee4724d2031d4ede 01-Nov-2010 Anders Carlsson <andersca@mac.com> Rename getBaseClassOffset to getBaseClassOffsetInBits and introduce a getBaseClassOffset which returns the offset in CharUnits. Do the same thing for getVBaseClassOffset.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117881 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
9cac4942b920d4c5514e71949e3062ed626bfbdf 19-Oct-2010 Michael J. Spencer <bigcheesegs@gmail.com> Fix Whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116798 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
99aaae87ae972ac2dd4cccd8b4886537aabaff43 19-Oct-2010 Bill Wendling <isanbard@gmail.com> We shouldn't keep track of MMX registers "needed" separately from the SSE
registers needed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116772 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
bb465d7d0489a6605bb1eb82dea87350066ac5e2 18-Oct-2010 Bill Wendling <isanbard@gmail.com> Reapply r116684 with fixes. The test cases needed to be updated.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116696 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
b70fba451e5a92df6f77ca288caf80b0c5572593 17-Oct-2010 Bill Wendling <isanbard@gmail.com> Temporarily revert r116684. It was causing failures with

Clang :: CodeGen/x86_32-arguments-darwin.c
Clang :: CodeGen/x86_32-arguments-linux.c


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116687 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
51a9f5309a025f5c54e7dc373eb7d11daabee6df 17-Oct-2010 Bill Wendling <isanbard@gmail.com> The "gcc.dg/compat/vector-1 -m32" test was broken after the MMX rewrite. The
function parameters weren't converted to use the correct type (x86_mmx). Add a
check, similar to the one in llvm-gcc, to see if we need the x86_mmx type for
that function parameter. If so, it coerces the type to be that.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116684 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
757e685512b8616c9de918b3d3fad8247562dce2 11-Oct-2010 Chris Lattner <sabre@nondot.org> Per discussion with Sanjiv, remove the PIC16 target from mainline. When/if
it comes back, it will be largely a rewrite, so keeping the old codebase
in tree isn't helping anyone.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116191 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
f554b1cc3083d9ed1fb9b52a305025f744e90d08 23-Sep-2010 Daniel Dunbar <daniel@zuster.org> IRgen/ABI/ARM: Return large vectors in memory.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114619 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
8aa87c71d9bfec14e135c683b0d7b9de999dbcb0 23-Sep-2010 Daniel Dunbar <daniel@zuster.org> IRgen/ABI/ARM: Trust the backend to pass vectors correctly for the given ABI.
- Therefore, we can lower out the NEON wrapper structs and pass the vectors
directly. This makes a huge difference in the cleanliness of the IR after
optimization.
- I will trust, but verify, via future ABITest testing (for APCS-GNU, at
least).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114618 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
e59d8585bb40a8bae6b847ad258536a2c01f20ea 16-Sep-2010 Daniel Dunbar <daniel@zuster.org> IRgen/ABI/x86-32: Realign indirect arguments when the ABI requires us to pass
them with a smaller alignment than the rest of codegen expects.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114115 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
cf3b6f2504596812db1fcef0df8ce5b3449c4aac 16-Sep-2010 Daniel Dunbar <daniel@zuster.org> IRgen/ABI: Add support for realigning structures which are passed by indirect
reference.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114114 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
93ae947df36133c7a26a0c7d325c0679916ed2ed 16-Sep-2010 Daniel Dunbar <daniel@zuster.org> IRgen/ABI/x86_32/Darwin: On Darwin, only structures with SSE vector types get passed
with a non-default-stack-ABI-alignment (of 16).
- This fixes the ABI convenient, but breaks codegen since we now have
underaligned arguments. Marginal improvement overall though, and will be
fixed in next commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114113 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
fb67d6c3814524fdd43bd2fb159f7c594eae581c 16-Sep-2010 Daniel Dunbar <daniel@zuster.org> IRgen/x86_32/Linux: Linux seems to align all stack objects to 4 bytes, unlike
Darwin. Checked vs the handiest Linux llvm-gcc I had around, someone on Linux is
welcome to investigate more.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114112 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
66e7b68b0016aeebe349e21ace93ff0178665d69 01-Sep-2010 Chris Lattner <sabre@nondot.org> fix rdar://8360877 a really nasty miscompilation in Boost.Xpressive
caused by my ABI work. Passing:

struct outer {
int x;
struct epsilon_matcher {} e;
int f;
};

as {i32,i32} isn't safe, because the offset of the second element
needs to be at 8 when it is interpreted as a memory value.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112686 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
645406a3d3405ad0f4b5a0e46a34ae92d9d23bd3 01-Sep-2010 Chris Lattner <sabre@nondot.org> same refactoring as before, this time on the argument side.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112684 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
3db4dde12de84269c8f803f9dfca37a2d14f9898 01-Sep-2010 Chris Lattner <sabre@nondot.org> refactor some code to cut down on redundancy, no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112683 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
f13721dd91dda7675e499331a2770308ad20ca61 31-Aug-2010 Chris Lattner <sabre@nondot.org> Add support for windows x86-64 varargs, patch by Cameron Esfahani!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112603 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
4599f346cb90bef15e1afd5c66f20c18703e41ae 31-Aug-2010 Chris Lattner <sabre@nondot.org> Fix PR8029, a x86-32 ABI regression in introduced in r112211


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112537 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
7b733505defd34f1bb7e74d9526be0bc41e76693 26-Aug-2010 Chris Lattner <sabre@nondot.org> improve comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112214 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
bbae8b40cd37d5b2815f8450cb588a41da89d7e5 26-Aug-2010 Chris Lattner <sabre@nondot.org> fix 2xi16 to pass as i32 instead of <2 x i16>. The former passes in
memory (as required) the later now passes in an xmm register. This
fixes gcc.dg/compat/vector_1 on x86-32.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112211 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
0fefa4175b0c9101564946f6a975ee9946c16d4b 26-Aug-2010 Chris Lattner <sabre@nondot.org> vector of long and ulong are also classified as INTEGER in x86-64 abi,
this fixes rdar://8358475 a failure of the gcc.dg/compat/vector_1 abi
test.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112205 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
473f8e723be93d84bd5fd15b094f4184802d4676 26-Aug-2010 Chris Lattner <sabre@nondot.org> 1 x ulonglong needs to be classified as INTEGER, just like 1 x longlong,
this fixes a miscompilation on the included testcase, rdar://8359248


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112201 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
a8b7a7d3eaa51dd200cba1e5541f2542d24d7a6e 26-Aug-2010 Chris Lattner <sabre@nondot.org> tame an assertion, fixing rdar://8357396


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112174 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
22fd4baf2eba2103e2b41e463f1a5f6486c398fb 26-Aug-2010 Chris Lattner <sabre@nondot.org> Finally pass "two floats in a 64-bit unit" as a <2 x float> instead of
as a double in the x86-64 ABI. This allows us to generate much better
code for certain things, e.g.:

_Complex float f32(_Complex float A, _Complex float B) {
return A+B;
}

Used to compile into (look at the integer silliness!):

_f32: ## @f32
## BB#0: ## %entry
movd %xmm1, %rax
movd %eax, %xmm1
movd %xmm0, %rcx
movd %ecx, %xmm0
addss %xmm1, %xmm0
movd %xmm0, %edx
shrq $32, %rax
movd %eax, %xmm0
shrq $32, %rcx
movd %ecx, %xmm1
addss %xmm0, %xmm1
movd %xmm1, %eax
shlq $32, %rax
addq %rdx, %rax
movd %rax, %xmm0
ret

Now we get:

_f32: ## @f32
movdqa %xmm0, %xmm2
addss %xmm1, %xmm2
pshufd $16, %xmm2, %xmm2
pshufd $1, %xmm1, %xmm1
pshufd $1, %xmm0, %xmm0
addss %xmm1, %xmm0
pshufd $16, %xmm0, %xmm1
movdqa %xmm2, %xmm0
unpcklps %xmm1, %xmm0
ret

and compile stuff like:

extern float _Complex ccoshf( float _Complex ) ;
float _Complex ccosf ( float _Complex z ) {
float _Complex iz;
(__real__ iz) = -(__imag__ z);
(__imag__ iz) = (__real__ z);
return ccoshf(iz);
}

into:

_ccosf: ## @ccosf
## BB#0: ## %entry
pshufd $1, %xmm0, %xmm1
xorps LCPI4_0(%rip), %xmm1
unpcklps %xmm0, %xmm1
movaps %xmm1, %xmm0
jmp _ccoshf ## TAILCALL

instead of:

_ccosf: ## @ccosf
## BB#0: ## %entry
movd %xmm0, %rax
movq %rax, %rcx
shlq $32, %rcx
shrq $32, %rax
xorl $-2147483648, %eax ## imm = 0xFFFFFFFF80000000
addq %rcx, %rax
movd %rax, %xmm0
jmp _ccoshf ## TAILCALL


There is still "stuff to be done" here for the struct case,
but this resolves rdar://6379669 - [x86-64 ABI] Pass and return
_Complex float / double efficiently



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112111 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
8bea82f6699e4384ef823cdc8800ad5db271177c 25-Aug-2010 Michael J. Spencer <bigcheesegs@gmail.com> Fix horrible white space errors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112067 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
d608cdb7c044365cf4e8764ade1e11e99c176078 22-Aug-2010 John McCall <rjmccall@apple.com> Experiment with using first-class aggregates to represent member function
pointers. I find the resulting code to be substantially cleaner, and it
makes it very easy to use the same APIs for data member pointers (which I have
conscientiously avoided here), and it avoids a plethora of potential
inefficiencies due to excessive memory copying, but we'll have to see if it
actually works.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111776 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
117e3f4cd4d6ea41c3202da8729f94168c5c8239 30-Jul-2010 Chris Lattner <sabre@nondot.org> fix PR5179 and correctly fix PR5831 to not miscompile.

The X86-64 ABI code didn't handle the case when a struct
would get classified and turn up as "NoClass INTEGER" for
example. This is perfectly possible when the first slot
is all padding (e.g. due to empty base classes). In this
situation, the first 8-byte doesn't take a register at all,
only the second 8-byte does.

This fixes this by enhancing the x86-64 abi stuff to allow
and handle this case, reverts the broken fix for PR5831,
and enhances the target independent stuff to be able to
handle an argument value in registers being accessed at an
offset from the memory value.

This is the last x86-64 calling convention related miscompile
that I'm aware of.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109848 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
eb518b4b89e4134b21975530809697142f69b779 29-Jul-2010 Chris Lattner <sabre@nondot.org> move the last hunk of getCoerceResult into the place
that needs it and remove getCoerceResult.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109807 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
1cce1958b127f1722a18825b2cd793ce21246911 29-Jul-2010 Chris Lattner <sabre@nondot.org> now that direct and coerce are merged, getCoerceResult gets simpler.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109805 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
1b32ae9537186c021409bebeaa308db886ed98a2 29-Jul-2010 Chris Lattner <sabre@nondot.org> now that GetSSETypeAtOffset handles passing SSE class values as
float, the special case hack in getCoerceResult can go away.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109804 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
0b3620066bfbb33004bed1816c851a923b9301af 29-Jul-2010 Chris Lattner <sabre@nondot.org> Implement the clang-side of detection for when to pass as
<2 x float> instead of double. This works but can't be turned
on until I teach codegen to pass <2 x float> as one XMM register
instead of two.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109790 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
cba8d310163f84630fd140fbfa9b6fdad9d26587 29-Jul-2010 Chris Lattner <sabre@nondot.org> Look at me, I can count!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109786 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
f47c944b5710a545d564b4d4b641a2f8bac96af3 29-Jul-2010 Chris Lattner <sabre@nondot.org> fix rdar://8251384, another case where we could access beyond the
end of a struct. This improves the case when the struct being passed
contains 3 floats, either due to a struct or array of 3 things. Before
we'd generate this IR for the testcase:

define float @bar(double %X.coerce0, double %X.coerce1) nounwind {
entry:
%X = alloca %struct.foof, align 8 ; <%struct.foof*> [#uses=2]
%0 = bitcast %struct.foof* %X to %1* ; <%1*> [#uses=2]
%1 = getelementptr %1* %0, i32 0, i32 0 ; <double*> [#uses=1]
store double %X.coerce0, double* %1
%2 = getelementptr %1* %0, i32 0, i32 1 ; <double*> [#uses=1]
store double %X.coerce1, double* %2
%tmp = getelementptr inbounds %struct.foof* %X, i32 0, i32 2 ; <float*> [#uses=1]
%tmp1 = load float* %tmp ; <float> [#uses=1]
ret float %tmp1
}

which compiled (with optimization) to:

_bar: ## @bar
## BB#0: ## %entry
movd %xmm1, %rax
movd %eax, %xmm0
ret

Now we produce:

define float @bar(double %X.coerce0, float %X.coerce1) nounwind {
entry:
%X = alloca %struct.foof, align 8 ; <%struct.foof*> [#uses=2]
%0 = bitcast %struct.foof* %X to %0* ; <%0*> [#uses=2]
%1 = getelementptr %0* %0, i32 0, i32 0 ; <double*> [#uses=1]
store double %X.coerce0, double* %1
%2 = getelementptr %0* %0, i32 0, i32 1 ; <float*> [#uses=1]
store float %X.coerce1, float* %2
%tmp = getelementptr inbounds %struct.foof* %X, i32 0, i32 2 ; <float*> [#uses=1]
%tmp1 = load float* %tmp ; <float> [#uses=1]
ret float %tmp1
}

and:

_bar: ## @bar
## BB#0: ## %entry
movaps %xmm1, %xmm0
ret



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109776 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
603519d269d48dca99927f0ad65e92099bd76161 29-Jul-2010 Chris Lattner <sabre@nondot.org> start setting up infrastructure for passing multi-floats
as <2 x float> instead of as double. The backend isn't ready
yet, but infrastructure in the frontend can come up.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109768 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
0d2656d77053cc2ed6f3a3acdf12d67807c7f3a2 29-Jul-2010 Chris Lattner <sabre@nondot.org> rename Get8ByteTypeAtOffset -> GetINTEGERTypeAtOffset to
make it clear that this function should only return a type
that the codegen will classify the same as an INTEGER type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109763 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
9e45a3de3f462785a86bba77dee168ab354d9704 29-Jul-2010 Chris Lattner <sabre@nondot.org> handle a case where we could access off the end of a function
that Eli pointed out, rdar://8249586


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109762 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
a7206c5367c2e5879fe6d9a07ed50aa003a56976 29-Jul-2010 Chris Lattner <sabre@nondot.org> fix PR7742 / rdar://8250764, a miscompilation of struct
return where the struct has a base but no fields. This
was because the x86-64 abi logic was checking the wrong
predicate in one place.

This was introduced in r91874, which was a fix for PR5831,
which lacked a CHECK line, so I verified and added it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109759 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
021c3a349d4f55cc2c7970268758bcf37b924493 29-Jul-2010 Chris Lattner <sabre@nondot.org> This is a little bit far, but optimize cases like:

struct a {
struct c {
double x;
int y;
} x[1];
};

void foo(struct a A) {
}

into:

define void @foo(double %A.coerce0, i32 %A.coerce1) nounwind {
entry:
%A = alloca %struct.a, align 8 ; <%struct.a*> [#uses=1]
%0 = bitcast %struct.a* %A to %struct.c* ; <%struct.c*> [#uses=2]
%1 = getelementptr %struct.c* %0, i32 0, i32 0 ; <double*> [#uses=1]
store double %A.coerce0, double* %1
%2 = getelementptr %struct.c* %0, i32 0, i32 1 ; <i32*> [#uses=1]
store i32 %A.coerce1, i32* %2

instead of:

define void @foo(double %A.coerce0, i64 %A.coerce1) nounwind {
entry:
%A = alloca %struct.a, align 8 ; <%struct.a*> [#uses=1]
%0 = bitcast %struct.a* %A to %0* ; <%0*> [#uses=2]
%1 = getelementptr %0* %0, i32 0, i32 0 ; <double*> [#uses=1]
store double %A.coerce0, double* %1
%2 = getelementptr %0* %0, i32 0, i32 1 ; <i64*> [#uses=1]
store i64 %A.coerce1, i64* %2

I only do this now because I never want to look at this code again :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109738 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
e2962be11e8894329d37985eccaa4f4a12dea402 29-Jul-2010 Chris Lattner <sabre@nondot.org> implement a todo: pass a eight-byte that consists of a
small integer + padding as that small integer. On code
like:

struct c { double x; int y; };
void bar(struct c C) { }

This means that we compile to:

define void @bar(double %C.coerce0, i32 %C.coerce1) nounwind {
entry:
%C = alloca %struct.c, align 8 ; <%struct.c*> [#uses=2]
%0 = getelementptr %struct.c* %C, i32 0, i32 0 ; <double*> [#uses=1]
store double %C.coerce0, double* %0
%1 = getelementptr %struct.c* %C, i32 0, i32 1 ; <i32*> [#uses=1]
store i32 %C.coerce1, i32* %1

instead of:

define void @bar(double %C.coerce0, i64 %C.coerce1) nounwind {
entry:
%C = alloca %struct.c, align 8 ; <%struct.c*> [#uses=3]
%0 = bitcast %struct.c* %C to %0* ; <%0*> [#uses=2]
%1 = getelementptr %0* %0, i32 0, i32 0 ; <double*> [#uses=1]
store double %C.coerce0, double* %1
%2 = getelementptr %0* %0, i32 0, i32 1 ; <i64*> [#uses=1]
store i64 %C.coerce1, i64* %2

which gives SRoA heartburn.

This implements rdar://5711709, a nice low number :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109737 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
800588fd230d2c37ddce8fbf4a3881352715d700 29-Jul-2010 Chris Lattner <sabre@nondot.org> Kill off the 'coerce' ABI passing form. Now 'direct' and 'extend' always
have a "coerce to" type which often matches the default lowering of Clang
type to LLVM IR type, but the coerce case can be handled by making them
not be the same.

This simplifies things and fixes issues where X86-64 abi lowering would
return coerce after making preferred types exactly match up. This caused
us to compile:

typedef float v4f32 __attribute__((__vector_size__(16)));
v4f32 foo(v4f32 X) {
return X+X;
}

into this code at -O0:

define <4 x float> @foo(<4 x float> %X.coerce) nounwind {
entry:
%retval = alloca <4 x float>, align 16 ; <<4 x float>*> [#uses=2]
%coerce = alloca <4 x float>, align 16 ; <<4 x float>*> [#uses=2]
%X.addr = alloca <4 x float>, align 16 ; <<4 x float>*> [#uses=3]
store <4 x float> %X.coerce, <4 x float>* %coerce
%X = load <4 x float>* %coerce ; <<4 x float>> [#uses=1]
store <4 x float> %X, <4 x float>* %X.addr
%tmp = load <4 x float>* %X.addr ; <<4 x float>> [#uses=1]
%tmp1 = load <4 x float>* %X.addr ; <<4 x float>> [#uses=1]
%add = fadd <4 x float> %tmp, %tmp1 ; <<4 x float>> [#uses=1]
store <4 x float> %add, <4 x float>* %retval
%0 = load <4 x float>* %retval ; <<4 x float>> [#uses=1]
ret <4 x float> %0
}

Now we get:

define <4 x float> @foo(<4 x float> %X) nounwind {
entry:
%X.addr = alloca <4 x float>, align 16 ; <<4 x float>*> [#uses=3]
store <4 x float> %X, <4 x float>* %X.addr
%tmp = load <4 x float>* %X.addr ; <<4 x float>> [#uses=1]
%tmp1 = load <4 x float>* %X.addr ; <<4 x float>> [#uses=1]
%add = fadd <4 x float> %tmp, %tmp1 ; <<4 x float>> [#uses=1]
ret <4 x float> %add
}

This implements rdar://8248065



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109733 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
15842bd05bd6d3b7450385ac8f73aaee5f807e19 29-Jul-2010 Chris Lattner <sabre@nondot.org> ignore structs that wrap vectors in IR, the abstraction shouldn't add penalty.

Before we'd compile the example into something like:

%coerce.dive2 = getelementptr %struct.v4f32wrapper* %retval, i32 0, i32 0 ; <<4 x float>*> [#uses=1]
%1 = bitcast <4 x float>* %coerce.dive2 to <2 x double>* ; <<2 x double>*> [#uses=1]
%2 = load <2 x double>* %1, align 1 ; <<2 x double>> [#uses=1]
ret <2 x double> %2

Now we produce:

%coerce.dive2 = getelementptr %struct.v4f32wrapper* %retval, i32 0, i32 0 ; <<4 x float>*> [#uses=1]
%0 = load <4 x float>* %coerce.dive2, align 1 ; <<4 x float>> [#uses=1]
ret <4 x float> %0



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109732 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
0f408f5242522cbede304472e17931357c1b573d 29-Jul-2010 Chris Lattner <sabre@nondot.org> move the 'pretty 16-byte vector' inferring code up to be shared
with return values, improving stuff that returns __m128 etc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109731 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
fe12d1ee8be8b8023c0c60b299ae957ea0df5d21 29-Jul-2010 Chris Lattner <sabre@nondot.org> simplify code by eliminating a premature optimization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109730 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
4711cb065922d46bfe80383b2001ae681f74780a 29-Jul-2010 Chris Lattner <sabre@nondot.org> now that we have CGT around, we can start using preferred types
for return values too. Instead of compiling something like:

struct foo {
int *X;
float *Y;
};

struct foo test(struct foo *P) { return *P; }

to:

%1 = type { i64, i64 }

define %1 @test(%struct.foo* %P) nounwind {
entry:
%retval = alloca %struct.foo, align 8 ; <%struct.foo*> [#uses=2]
%P.addr = alloca %struct.foo*, align 8 ; <%struct.foo**> [#uses=2]
store %struct.foo* %P, %struct.foo** %P.addr
%tmp = load %struct.foo** %P.addr ; <%struct.foo*> [#uses=1]
%tmp1 = bitcast %struct.foo* %retval to i8* ; <i8*> [#uses=1]
%tmp2 = bitcast %struct.foo* %tmp to i8* ; <i8*> [#uses=1]
call void @llvm.memcpy.p0i8.p0i8.i64(i8* %tmp1, i8* %tmp2, i64 16, i32 8, i1 false)
%0 = bitcast %struct.foo* %retval to %1* ; <%1*> [#uses=1]
%1 = load %1* %0, align 1 ; <%1> [#uses=1]
ret %1 %1
}

We now get the result more type safe, with:

define %struct.foo @test(%struct.foo* %P) nounwind {
entry:
%retval = alloca %struct.foo, align 8 ; <%struct.foo*> [#uses=2]
%P.addr = alloca %struct.foo*, align 8 ; <%struct.foo**> [#uses=2]
store %struct.foo* %P, %struct.foo** %P.addr
%tmp = load %struct.foo** %P.addr ; <%struct.foo*> [#uses=1]
%tmp1 = bitcast %struct.foo* %retval to i8* ; <i8*> [#uses=1]
%tmp2 = bitcast %struct.foo* %tmp to i8* ; <i8*> [#uses=1]
call void @llvm.memcpy.p0i8.p0i8.i64(i8* %tmp1, i8* %tmp2, i64 16, i32 8, i1 false)
%0 = load %struct.foo* %retval ; <%struct.foo> [#uses=1]
ret %struct.foo %0
}

That memcpy is completely terrible, but I don't know how to fix it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109729 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
5868ca2eb7f00d815f62e46f5a171eb6e5f91b5b 29-Jul-2010 Chris Lattner <sabre@nondot.org> sink preferred type stuff lower. It's possible that this might
improve codegen for vaarg or something, because its codepath is
getting preferred types now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109728 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
ee5dcd064a811edc90f6c1fb31a837b6c961fed7 29-Jul-2010 Chris Lattner <sabre@nondot.org> dissolve some more complexity: make the x86-64 abi lowering code
compute its own preferred types instead of having CGT compute
them then pass them (circuituously) down into ABIInfo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109726 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
44f0fd2804e9952a8dbf85bb60ee3501aa9f5ee7 29-Jul-2010 Chris Lattner <sabre@nondot.org> simplify Get8ByteTypeAtOffset by making it a member of X86_64ABIInfo


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109724 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
a3c109bbf6e198f463fbe204da4d25b40dab65c4 29-Jul-2010 Chris Lattner <sabre@nondot.org> now that ABIInfo depends on CGT, it has trivial access to such
things as TargetData, ASTContext, LLVMContext etc. Stop passing
them through so many APIs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109723 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
ea0443212e7ec6ff82e2f174e8e948a6eb0e0876 29-Jul-2010 Chris Lattner <sabre@nondot.org> cave in to reality and make ABIInfo depend on CodeGenTypes.

This will simplify a bunch of code, coming up next.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109722 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
ab5722e67794b3954c874a369086fc5f41ac46a5 29-Jul-2010 Chris Lattner <sabre@nondot.org> pass argument vectors in a type that corresponds to the user type if
possible. This improves the example to pass <4 x float> instead of
<2 x double> but we still get awful code, and still don't get the
return value right.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109700 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
0b30c67132f00c667512a65cfe1fe81ae54c2383 29-Jul-2010 Chris Lattner <sabre@nondot.org> fix some break statements to be formatted more consistently,
remove some now-dead code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109690 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
519f68cd26777c755763a644a7f7ed7ac389beb9 29-Jul-2010 Chris Lattner <sabre@nondot.org> use Get8ByteTypeAtOffset for the return value path as well so we
don't get errors similar to PR7714 on the return path.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109689 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
49382de42c2a411bfd772408e987cb399071241d 29-Jul-2010 Chris Lattner <sabre@nondot.org> refactor the autosizing code, eliminating duplication
and making Get8ByteTypeAtOffset always succeed and documented.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109685 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
1daf808a48d26328dd31a3275ce599cee326c957 29-Jul-2010 Chris Lattner <sabre@nondot.org> fix PR7714 by not referencing off the end of a struct when passed by value in
x86-64 abi. This also improves codegen as well. Some refactoring is needed of
this code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109681 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
3852f34eaa50908debfa03b450b3e68376efd852 15-Jul-2010 Daniel Dunbar <daniel@zuster.org> CodeGen: Tweak ABI handling for Minix, patch by Kees van Reeuwijk!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108423 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
38e317d6dce161b249508686cc67eb7176958762 07-Jul-2010 Chris Lattner <sabre@nondot.org> add driver support for minix, patch by Kees van Reeuwijk
from PR7583


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107788 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
bcaedaed309ce453a992fdeef4a4c908cc7d9dfb 30-Jun-2010 Chris Lattner <sabre@nondot.org> Reapply:
r107173, "fix PR7519: after thrashing around and remembering how all this stuff"
r107216, "fix PR7523, which was caused by the ABI code calling ConvertType instead"

This includes a fix to make ConvertTypeForMem handle the "recursive" case, and call
it as such when lowering function types which have an indirect result.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107310 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
7bbe03d8ae0772d89f6539d073dd43e49268a42c 30-Jun-2010 Daniel Dunbar <daniel@zuster.org> Revert r107173, "fix PR7519: after thrashing around and remembering how all this stuff", it broke bootstrap.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107232 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
376fe5e7800dface235c5382b39d77790d39dfa7 29-Jun-2010 Chris Lattner <sabre@nondot.org> fix PR7519: after thrashing around and remembering how all this stuff
works, the fix is quite simple: just make sure to call ConvertTypeRecursive
when the function type being lowered is in the midst of ConvertType.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107173 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
9c254f0415bef9a0bafe5b5026ddb54b727597b1 29-Jun-2010 Chris Lattner <sabre@nondot.org> Change X86_64ABIInfo to have ASTContext and TargetData ivars to
avoid passing ASTContext down through all the methods it has.

When classifying an argument, or argument piece, as INTEGER, check
to see if we have a pointer at exactly the same offset in the
preferred type. If so, use that pointer type instead of i64. This
allows us to compile A function taking a stringref into something
like this:

define i8* @foo(i64 %D.coerce0, i8* %D.coerce1) nounwind ssp {
entry:
%D = alloca %struct.DeclGroup, align 8 ; <%struct.DeclGroup*> [#uses=4]
%0 = getelementptr %struct.DeclGroup* %D, i32 0, i32 0 ; <i64*> [#uses=1]
store i64 %D.coerce0, i64* %0
%1 = getelementptr %struct.DeclGroup* %D, i32 0, i32 1 ; <i8**> [#uses=1]
store i8* %D.coerce1, i8** %1
%tmp = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 0 ; <i64*> [#uses=1]
%tmp1 = load i64* %tmp ; <i64> [#uses=1]
%tmp2 = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 1 ; <i8**> [#uses=1]
%tmp3 = load i8** %tmp2 ; <i8*> [#uses=1]
%add.ptr = getelementptr inbounds i8* %tmp3, i64 %tmp1 ; <i8*> [#uses=1]
ret i8* %add.ptr
}

instead of this:

define i8* @foo(i64 %D.coerce0, i64 %D.coerce1) nounwind ssp {
entry:
%D = alloca %struct.DeclGroup, align 8 ; <%struct.DeclGroup*> [#uses=3]
%0 = insertvalue %0 undef, i64 %D.coerce0, 0 ; <%0> [#uses=1]
%1 = insertvalue %0 %0, i64 %D.coerce1, 1 ; <%0> [#uses=1]
%2 = bitcast %struct.DeclGroup* %D to %0* ; <%0*> [#uses=1]
store %0 %1, %0* %2, align 1
%tmp = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 0 ; <i64*> [#uses=1]
%tmp1 = load i64* %tmp ; <i64> [#uses=1]
%tmp2 = getelementptr inbounds %struct.DeclGroup* %D, i32 0, i32 1 ; <i8**> [#uses=1]
%tmp3 = load i8** %tmp2 ; <i8*> [#uses=1]
%add.ptr = getelementptr inbounds i8* %tmp3, i64 %tmp1 ; <i8*> [#uses=1]
ret i8* %add.ptr
}

This implements rdar://7375902 - [codegen quality] clang x86-64 ABI lowering code punishing StringRef



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107123 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
a159c2e83942b7dae64457d4fff265bb74550cac 29-Jun-2010 Chris Lattner <sabre@nondot.org> plumb preferred types down into X86_64ABIInfo::classifyArgumentType,
no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107115 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
8640cd6bf077e007fdb9bc8c9c5e319f7d70da96 29-Jun-2010 Chris Lattner <sabre@nondot.org> Pass the LLVM IR version of argument types down into computeInfo.
This is somewhat annoying to do this at this level, but it avoids
having ABIInfo know depend on CodeGenTypes for a hint.

Nothing is using this yet, so no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107111 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
8ff296496de0970c8d6d72320a1427a926d7ef14 28-Jun-2010 Chris Lattner <sabre@nondot.org> pass/return structs of char and short as i8/i16 to avoid
aweful through-memory coersion, just like we do for i32 now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107078 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
1090a9ba0902380dbd97d0a500daa4c373712df9 28-Jun-2010 Chris Lattner <sabre@nondot.org> more tidying up.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107076 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
dce5ad0cf70ba74e1ecdbb5e81f1a81d97821636 28-Jun-2010 Chris Lattner <sabre@nondot.org> random acts of tidying.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107050 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
faf23b72f171ef997d48c453a5a4783c5759f8fe 28-Jun-2010 Chris Lattner <sabre@nondot.org> X86-64:
pass/return structs of float/int as float/i32 instead of double/i64
to make the code generated for ABI cleaner. Passing in the low part
of a double is the same as passing in a float.

For example, we now compile:

struct DeclGroup { float NumDecls; };
float foo(DeclGroup D);
void bar(DeclGroup *D) {
foo(*D);
}

into:

%struct.DeclGroup = type { float }

define void @_Z3barP9DeclGroup(%struct.DeclGroup* %D) nounwind {
entry:
%D.addr = alloca %struct.DeclGroup*, align 8 ; <%struct.DeclGroup**> [#uses=2]
%agg.tmp = alloca %struct.DeclGroup, align 4 ; <%struct.DeclGroup*> [#uses=2]
store %struct.DeclGroup* %D, %struct.DeclGroup** %D.addr
%tmp = load %struct.DeclGroup** %D.addr ; <%struct.DeclGroup*> [#uses=1]
%tmp1 = bitcast %struct.DeclGroup* %agg.tmp to i8* ; <i8*> [#uses=1]
%tmp2 = bitcast %struct.DeclGroup* %tmp to i8* ; <i8*> [#uses=1]
call void @llvm.memcpy.p0i8.p0i8.i64(i8* %tmp1, i8* %tmp2, i64 4, i32 4, i1 false)
%coerce.dive = getelementptr %struct.DeclGroup* %agg.tmp, i32 0, i32 0 ; <float*> [#uses=1]
%0 = load float* %coerce.dive, align 1 ; <float> [#uses=1]
%call = call float @_Z3foo9DeclGroup(float %0) ; <float> [#uses=0]
ret void
}

instead of:

%struct.DeclGroup = type { float }

define void @_Z3barP9DeclGroup(%struct.DeclGroup* %D) nounwind {
entry:
%D.addr = alloca %struct.DeclGroup*, align 8 ; <%struct.DeclGroup**> [#uses=2]
%agg.tmp = alloca %struct.DeclGroup, align 4 ; <%struct.DeclGroup*> [#uses=2]
%tmp3 = alloca double ; <double*> [#uses=2]
store %struct.DeclGroup* %D, %struct.DeclGroup** %D.addr
%tmp = load %struct.DeclGroup** %D.addr ; <%struct.DeclGroup*> [#uses=1]
%tmp1 = bitcast %struct.DeclGroup* %agg.tmp to i8* ; <i8*> [#uses=1]
%tmp2 = bitcast %struct.DeclGroup* %tmp to i8* ; <i8*> [#uses=1]
call void @llvm.memcpy.p0i8.p0i8.i64(i8* %tmp1, i8* %tmp2, i64 4, i32 4, i1 false)
%coerce.dive = getelementptr %struct.DeclGroup* %agg.tmp, i32 0, i32 0 ; <float*> [#uses=1]
%0 = bitcast double* %tmp3 to float* ; <float*> [#uses=1]
%1 = load float* %coerce.dive ; <float> [#uses=1]
store float %1, float* %0, align 1
%2 = load double* %tmp3 ; <double> [#uses=1]
%call = call float @_Z3foo9DeclGroup(double %2) ; <float> [#uses=0]
ret void
}

which is this machine code (at -O0):

__Z3barP9DeclGroup:
subq $24, %rsp
movq %rdi, 16(%rsp)
movq 16(%rsp), %rdi
leaq 8(%rsp), %rax
movl (%rdi), %ecx
movl %ecx, (%rax)
movss 8(%rsp), %xmm0
callq __Z3foo9DeclGroup
addq $24, %rsp
ret

vs this:

__Z3barP9DeclGroup:
subq $24, %rsp
movq %rdi, 16(%rsp)
movq 16(%rsp), %rdi
leaq 8(%rsp), %rax
movl (%rdi), %ecx
movl %ecx, (%rax)
movss 8(%rsp), %xmm0
movss %xmm0, (%rsp)
movsd (%rsp), %xmm0
callq __Z3foo9DeclGroup
addq $24, %rsp
ret

At -O3, it is the difference between this now:

__Z3barP9DeclGroup:
movss (%rdi), %xmm0
jmp __Z3foo9DeclGroup # TAILCALL

vs this before:

__Z3barP9DeclGroup:
movl (%rdi), %eax
movd %rax, %xmm0
jmp __Z3foo9DeclGroup # TAILCALL



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107048 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
77b89b87c3b9220fea1bc80f6d6598d2003cc8a8 27-Jun-2010 Chris Lattner <sabre@nondot.org> finally get around to doing a significant cleanup to irgen:
have CGF create and make accessible standard int32,int64 and
intptr types. This fixes a ton of 80 column violations
introduced by LLVMContextification and cleans up stuff a lot.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106977 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
7f215c12af4c3e7f81b24102a676aabfdb4e1566 26-Jun-2010 Chris Lattner <sabre@nondot.org> use more efficient type comparison predicates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106958 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
1ed1a594e9befc91ebf00d81b41a2fdfab862657 16-Jun-2010 Rafael Espindola <rafael.espindola@gmail.com> Change the test for which ABI/CC to use on ARM to be base on the environment
(the last argument of the triple).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106131 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
25117ab35c1a033846073183314c68ef07d1701a 16-Jun-2010 Rafael Espindola <rafael.espindola@gmail.com> Don't set the calling convention for ARM if it is already the default.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106106 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
9d3347a5887d2d25afe8b0bd35783a72ec86cce2 16-Jun-2010 Douglas Gregor <dgregor@apple.com> Give Type::isIntegralType() an ASTContext parameter, so that it
provides C "integer type" semantics in C and C++ "integral type"
semantics in C++.

Note that I still need to update isIntegerType (and possibly other
predicates) using the same approach I've taken for
isIntegralType(). The two should have the same meaning, but currently
don't (!).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106074 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
2ade35e2cfd554e49d35a52047cea98a82787af9 16-Jun-2010 Douglas Gregor <dgregor@apple.com> Introduce Type::isIntegralOrEnumerationType(), to cover those places
in C++ that involve both integral and enumeration types. Convert all
of the callers to Type::isIntegralType() that are meant to work with
both integral and enumeration types over to
Type::isIntegralOrEnumerationType(), to prepare to eliminate
enumeration types as integral types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106071 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
0eb1d9733801764cd8b692c67e117e4feeecf013 08-Jun-2010 Rafael Espindola <rafael.espindola@gmail.com> Fix passing and returning of objects with non trivial copy constructors on
ARM.

Fixes PR7310.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105592 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
aeeb7011a875d3dd439e9fa07dc3ac54d97785b9 27-May-2010 John McCall <rjmccall@apple.com> Implement __builtin_init_dwarf_reg_size_table and __builtin_dwarf_sp_column
for 32-bit MIPS processors. Hat-tip to rdivacky for providing gcc dumps
on this.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104816 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
e32b9b854e5b92b223c553164d3ecfbf657dbbf2 17-May-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Remove dead function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103945 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
5ea68614bfe0e78b5d66339b781529038f86501f 17-May-2010 Daniel Dunbar <daniel@zuster.org> C++/Darwin/i386 ABI: Fix some problems with empty record handling.
- Check bases as part of isEmptyRecord().

- C++ record fields are never empty in the Itanium ABI.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103944 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
67d438d39a1cc37c372a2684dc354f58d0169bb1 15-May-2010 Daniel Dunbar <daniel@zuster.org> C++/ABI/x86_64: Member pointers should be classified as INTEGER.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103843 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
7711523d948bbe635f690f5795ef7ea9a3289eb2 15-May-2010 Daniel Dunbar <daniel@zuster.org> C++/ABI/i386: Member function pointers should be passed by value.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103842 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
a1842d32a1964712e42078e9b389dce9258c6a8c 14-May-2010 Daniel Dunbar <daniel@zuster.org> C++/Darwin/x86: Teach IRgen it can pass reference types in registers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103761 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
9430d5a61598c47d827e1cd05f7cf3f110eeec9e 11-May-2010 Daniel Dunbar <daniel@zuster.org> IRgen/i386/C++: Fix isSingleElementStruct computation for C++ record decls.
- Fixes PR7098.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103514 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
46c54fb8ec45765a475b7b709b9aee7f94c490c2 21-Apr-2010 Daniel Dunbar <daniel@zuster.org> ABI/x86-32 & x86-64: Alignment on 'byval' must be set when when the alignment
exceeds the minimum ABI alignment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102019 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
dc6d574155072bfb35a7a29b94ef3afa0d40fb5a 21-Apr-2010 Daniel Dunbar <daniel@zuster.org> IRgen/x86-32: Factor out getIndirectResult(), to match x86-64 factoring.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102015 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
52d9ae3220c08fcbb80f213a364a88e4e0067242 06-Apr-2010 Chris Lattner <sabre@nondot.org> fit in 80 cols


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100534 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
a14db75641f377ef8b033c67653cd95ac4c36fe3 11-Mar-2010 Chris Lattner <sabre@nondot.org> fix PR6433, crash on va_arg of typedef.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98264 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
ec853ba1087f606e9685cb1e800616565ba35093 11-Mar-2010 John McCall <rjmccall@apple.com> Support PPC-32 DWARF EH intrinisics. Thanks to rdivacky for his assistance.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98206 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
6374c3307e2d73348f7b8cc73eeeb0998ad0ac94 06-Mar-2010 John McCall <rjmccall@apple.com> Implement __builtin_dwarf_sp_column for i386 (Darwin and not), x86-64 (all),
and ARM. Implement __builtin_init_dwarf_reg_size_table for i386 (both) and
x86-64 (all).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97859 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
0b0ef0a70b8010c66fad2603e4423ef1c1dc7015 24-Feb-2010 John McCall <rjmccall@apple.com> Canonicalize parameter and return types before computing ABI info. Eliminates
a common source of oddities and, in theory, removes some redundant ABI
computations. Also fixes a miscompile I introduced yesterday by refactoring
some code and causing a slightly different code path to be taken that
didn't perform *parameter* type canonicalization, just normal type
canonicalization; this in turn caused a bit of ABI code to misfire because
it was looking for 'double' or 'float' but received 'const float'.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97030 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
a446ecd13a9cd2c150baa5d3db4f817db4b1eba8 17-Feb-2010 Sanjiv Gupta <sanjiv.gupta@microchip.com> implement EmitVAArg. pretty much the same way other targets do.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96446 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
f177d9d6c27fbbcee8c00fd90b8306985c03c54a 15-Feb-2010 Duncan Sands <baldrick@free.fr> Uniformize the names of type predicates: rather than having isFloatTy and
isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96224 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
74f7293eb30bf77355c20a3c2cad7b67d8ce7388 13-Feb-2010 Charles Davis <cdavis@mines.edu> Emit the 'alignstack' LLVM function attribute when we encounter a function
marked 'force_align_arg_pointer'. Almost there; now all I need to do is finish
up the backend.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96100 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
aa74a1e49f7c4b89539830290f76fe2c3e97187f 02-Feb-2010 Douglas Gregor <dgregor@apple.com> Implement promotion for enumeration types.

WHAT!?!

It turns out that Type::isPromotableIntegerType() was not considering
enumeration types to be promotable, so we would never do the
promotion despite having properly computed the promotion type when the
enum was defined. Various operations on values of enum type just
"worked" because we could still compute the integer rank of an enum
type; the oddity, however, is that operations such as "add an enum and
an unsigned" would often have an enum result type (!). The bug
actually showed up as a spurious -Wformat diagnostic
(<rdar://problem/7595366>), but in theory it could cause miscompiles.

In this commit:
- Enum types with a promotion type of "int" or "unsigned int" are
promotable.
- Tweaked the computation of promotable types for enums
- For all of the ABIs, treat enum types the same way as their
underlying types (*not* their promotion types) for argument passing
and return values
- Extend the ABI tester with support for enumeration types



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95117 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
4581581881d3f7349bf5a4b39d761bce688f9164 02-Feb-2010 Daniel Dunbar <daniel@zuster.org> ARM/APCS: Fix classification of small complex integer types as "integer like".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95030 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
4cc753f4503931763cfb762a95928b44fcbe64e9 02-Feb-2010 Daniel Dunbar <daniel@zuster.org> ARM/APCS: Pass Complex types following llvm-gcc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95029 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
679855a6e14fbc6c6838c566aa74c32f52f4f946 29-Jan-2010 Daniel Dunbar <daniel@zuster.org> ARM/APCS ABI: Fix some problems with bit-fields in structures. After rereading
the ABI spec, this turns out to simplify the code. We still have some annoying
code which mismatches the spec with regard to empty structures.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94796 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
a887423cf580e19b2d03e3a0499c065730c96b28 27-Jan-2010 Anders Carlsson <andersca@mac.com> Structs and classes with non-trivial destructors or copy constructors should be passed indirectly in the 32-bit ABI. Fixes PR6094.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94656 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
568bb2d3189108b6d510a6233d1e6e003a47cbdc 22-Jan-2010 Douglas Gregor <dgregor@apple.com> Eliminate some Clang warnings

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94177 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
82d0a418c8699fc6f4a9417457ffe93d43bba1c1 10-Jan-2010 Anton Korobeynikov <asl@math.spbu.ru> Generalize target weirdness handling having proper layering in mind:
1. Add helper class for sema checks for target attributes
2. Add helper class for codegen of target attributes

As a proof-of-concept - implement msp430's 'interrupt' attribute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93118 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp
82bac50fc0ab125ff5b4308ee91a731e3761eb63 10-Jan-2010 Anton Korobeynikov <asl@math.spbu.ru> Rename file to generalization in next commits

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93117 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/TargetInfo.cpp