History log of /external/clang/lib/CodeGen/CGBuiltin.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
33337ca4d89605025818daf83390ab4271d598d9 06-May-2015 Pirama Arumuga Nainar <pirama@google.com> Update aosp/master clang for rebase to r235153

Change-Id: Ia94bbcb6da7c75b6e7c2afedd1001094d62a7324
/external/clang/lib/CodeGen/CGBuiltin.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/CGBuiltin.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/CGBuiltin.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/CGBuiltin.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/CGBuiltin.cpp
6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 29-May-2014 Stephen Hines <srhines@google.com> Update Clang for 3.5 rebase (r209713).

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

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/lib/CodeGen/CGBuiltin.cpp
d6f42ac4ce92771d486c8ce459d3e1266567c244 08-Dec-2013 Bill Wendling <isanbard@gmail.com> Merging r196361:
------------------------------------------------------------------------
r196361 | kevinqin | 2013-12-04 00:02:11 -0800 (Wed, 04 Dec 2013) | 1 line

[AArch64 NEON] Add ACLE intrinsic vceqz_f64.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@196682 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
612f5bfeac5c4d923bb448b2f06e3aeab318130f 08-Dec-2013 Bill Wendling <isanbard@gmail.com> Merging r196359:
------------------------------------------------------------------------
r196359 | kevinqin | 2013-12-03 23:53:09 -0800 (Tue, 03 Dec 2013) | 1 line

[AArch64 NEON] Add missing compare intrinsics.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@196680 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
917b328a7f565f9f3f0ae2067a8b97732efaa9f8 08-Dec-2013 Bill Wendling <isanbard@gmail.com> Merging r196211:
------------------------------------------------------------------------
r196211 | haoliu | 2013-12-02 22:07:13 -0800 (Mon, 02 Dec 2013) | 3 lines

[AArch64]Add missing floating point convert, round and misc intrinsics.
E.g. int64x1_t vcvt_s64_f64(float64x1_t a) -> FCVTZS Dd, Dn

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@196679 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
d93bc4320ac3b2035a542fcf2004fce0c91abd11 08-Dec-2013 Bill Wendling <isanbard@gmail.com> Merging r196199:
------------------------------------------------------------------------
r196199 | haoliu | 2013-12-02 19:40:08 -0800 (Mon, 02 Dec 2013) | 3 lines

AArch64: Add missing scalar pair intrinsics.
E.g. "float32_t vaddv_f32(float32x2_t a)" to be matched into "faddp s0, v1.2s".

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@196676 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
08efe365cc491ad289132cb9e286382eb0493753 01-Dec-2013 Bill Wendling <isanbard@gmail.com> Merging r195942:
------------------------------------------------------------------------
r195942 | haoliu | 2013-11-28 18:13:17 -0800 (Thu, 28 Nov 2013) | 3 lines

Fix the problem that the range check for scalar narrow shift is too wide.
E.g. the immediate value of vshrns_n_s16 is [1,16], which should be [1,8].

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@196022 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
38750138231fbf4e9ef18ce93e55ee3bc6ac592d 01-Dec-2013 Bill Wendling <isanbard@gmail.com> Merging r195804:
------------------------------------------------------------------------
r195804 | mcrosier | 2013-11-26 17:46:19 -0800 (Tue, 26 Nov 2013) | 1 line

[AArch64] Add support for NEON scalar floating-point absolute difference.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@195995 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
c02b18c27fa9b586291d016a99970ce78a41f4cd 01-Dec-2013 Bill Wendling <isanbard@gmail.com> Merging r195789:
------------------------------------------------------------------------
r195789 | mcrosier | 2013-11-26 14:17:51 -0800 (Tue, 26 Nov 2013) | 2 lines

[AArch64] Add support for NEON scalar floating-point to integer convert
instructions.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@195992 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
bc5de89da7dbd930c339757b1d01cb926be768fc 25-Nov-2013 Bill Wendling <isanbard@gmail.com> Merging r195329:
------------------------------------------------------------------------
r195329 | apazos | 2013-11-21 00:15:01 -0800 (Thu, 21 Nov 2013) | 5 lines

Implemented Neon scalar vdup_lane intrinsics.

Fixed scalar dup alias and added test case.


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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@195614 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
f27429d06ab3cea0e97ad9878c4440dfb06d2fe7 25-Nov-2013 Bill Wendling <isanbard@gmail.com> Merging r195326:
------------------------------------------------------------------------
r195326 | apazos | 2013-11-20 23:36:33 -0800 (Wed, 20 Nov 2013) | 6 lines

Implemented Neon scalar by element intrinsics.

Intrinsics implemented: vqdmull_lane, vqdmulh_lane, vqrdmulh_lane,
vqdmlal_lane, vqdmlsl_lane scalar Neon intrinsics.


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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@195613 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
11a94f9ccaf29bb7cd073787d5cb6d130a38bf62 19-Nov-2013 Hao Liu <Hao.Liu@arm.com> Implement AArch64 neon instructions class SIMD lsone and SIMD lone-post.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195079 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
dd12780e86575795fa912529a911b01e2abc4677 18-Nov-2013 Hao Liu <Hao.Liu@arm.com> Implement the newly added AArch64 ACLE functions for ld1/st1 with 2/3/4 vectors.
The functions are like: vst1_s8_x2 ...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194991 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
d478c0d8abeafb9d57600e4ca271a63aa8e05386 16-Nov-2013 Benjamin Kramer <benny.kra@googlemail.com> Remove unused but set variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194920 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
51cc0172a173599b769968696e20638754d1dcd6 16-Nov-2013 Ana Pazos <apazos@codeaurora.org> Implemented aarch64 Neon scalar vmulx_lane intrinsics
Implemented aarch64 Neon scalar vfma_lane intrinsics
Implemented aarch64 Neon scalar vfms_lane intrinsics

Implemented legacy vmul_n_f64, vmul_lane_f64, vmul_laneq_f64
intrinsics (v1f64 parameter type) using Neon scalar instructions.

Implemented legacy vfma_lane_f64, vfms_lane_f64,
vfma_laneq_f64, vfms_laneq_f64 intrinsics (v1f64 parameter type)
using Neon scalar instructions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194889 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
f46e56bf99384b742228a9be215f38bf107c1a3b 14-Nov-2013 Chad Rosier <mcrosier@codeaurora.org> [AArch64] Add support for legacy AArch32 NEON scalar shift right by immediate
and accumulate instructions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194732 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
624bb5e59dbcc24efeee7dff12c9b48d2b5077e9 14-Nov-2013 Kevin Qin <Kevin.Qin@arm.com> [AArch64 neon] support poly64 and relevant intrinsic functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194660 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
8137a607eebe799d95fd05226fb91119a5b054b0 14-Nov-2013 Kevin Qin <Kevin.Qin@arm.com> Implement aarch64 neon instruction class misc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194657 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
2e22f29b92768ea65ac5c26d354226ecc7509311 14-Nov-2013 Jiangning Liu <jiangning.liu@arm.com> Implement AArch64 NEON instruction set AdvSIMD (table).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194649 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
6526de425dbfd368407566ff123b5bdc0924859a 13-Nov-2013 Reid Kleckner <reid@kleckner.net> -fms-extensions: Recognize _alloca as an alias for the alloca builtin

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194617 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
a665321a6885ff659ae6d75bb2ee2f083f78ddd7 13-Nov-2013 Chad Rosier <mcrosier@codeaurora.org> [AArch64] Tests for legacy AArch32 NEON scalar shift by immediate instructions.
A number of non-overloaded intrinsics have been replaced by thier overloaded
counterparts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194599 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
9473c1945f9f1dfa143e172622f16e4264e2628b 11-Nov-2013 Chad Rosier <mcrosier@codeaurora.org> [AArch64] Add support for NEON scalar floating-point convert to fixed-point instructions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194395 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
bf3bc5d37eff88b578d5990f507a87db33f30a6e 06-Nov-2013 Jiangning Liu <jiangning.liu@arm.com> Implement AArch64 Neon instruction set Perm.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194124 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
9f2b0f8bb6fa976c5da9a62d8e69f35ccac7a42e 06-Nov-2013 Jiangning Liu <jiangning.liu@arm.com> Implement AArch64 Neon instruction set Bitwise Extract.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194119 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
25009d468a0221f4e2a4d9c789720dde6167d4b7 05-Nov-2013 Jiangning Liu <jiangning.liu@arm.com> Implement AArch64 Neon Crypto instruction classes AES, SHA, and 3 SHA.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194086 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
22229d6822324a42913d25f256045dbf348a53e9 05-Nov-2013 Kevin Qin <Kevin.Qin@arm.com> Implemented aarch64 neon intrinsic vcopy_lane with float type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194042 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
6d61978fa2c07cb1311bb29f45481cf3f4dbb887 31-Oct-2013 Chad Rosier <mcrosier@codeaurora.org> [AArch64] Add support for NEON scalar fixed-point convert to floating-point instructions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193817 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
f42727215f9fa38175d2e84a938c84122cd1e811 31-Oct-2013 Chad Rosier <mcrosier@codeaurora.org> [AArch64] Add support for NEON scalar shift immediate instructions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193791 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.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/CGBuiltin.cpp
564020954e9eb01293d90802c89a02f87301e095 30-Oct-2013 Chad Rosier <mcrosier@codeaurora.org> [AArch64] Add support for NEON scalar floating-point compare instructions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193692 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.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/CGBuiltin.cpp
4553a858e46299955333babfa052a512682869fd 18-Oct-2013 Chad Rosier <mcrosier@codeaurora.org> [AArch64] Add support for NEON scalar extract narrow instructions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192971 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
d867422c86914e055b8772ec1f22b349e15de94b 17-Oct-2013 Chad Rosier <mcrosier@codeaurora.org> [AArch64] Add support for NEON scalar three register different instruction
class. The instruction class includes the signed saturating doubling
multiply-add long, signed saturating doubling multiply-subtract long, and
the signed saturating doubling multiply long instructions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192909 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
cced97c345843a41ff68c9536bf54a0dfb772846 16-Oct-2013 Chad Rosier <mcrosier@codeaurora.org> [AArch64] Add support for NEON scalar negate instruction.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192845 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
567fd23e1e108c8b3441ea01dd3e7453ea04acff 16-Oct-2013 Chad Rosier <mcrosier@codeaurora.org> [AArch64] Add support for NEON scalar absolute value instruction.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192844 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
b563488fb55611a1889762907e1f66cc72eb7b5c 16-Oct-2013 Chad Rosier <mcrosier@codeaurora.org> Update comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192807 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
a48c4a87034a9478b73c25dada9921d1aa16d318 16-Oct-2013 Chad Rosier <mcrosier@codeaurora.org> [AArch64] Add support for NEON scalar signed saturating accumulated of unsigned
value and unsigned saturating accumulate of signed value instructions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192801 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
03c8276825ee44d29475023455a6888b73225ea4 15-Oct-2013 Chad Rosier <mcrosier@codeaurora.org> [AArch64] Add support for NEON scalar signed saturating absolute value and
scalar signed saturating negate instructions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192734 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
ad40008ed9e5f4d23972d09386997da5d1a835ee 14-Oct-2013 Chad Rosier <mcrosier@codeaurora.org> [AArch64] Add support for NEON scalar integer compare instructions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192597 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
2102a1dba460c99f97a0fdf1e5aee8c685e29ff8 11-Oct-2013 Kevin Qin <Kevin.Qin@arm.com> Implemented aarch64 SIMD copy related ACLE intrinsic :
vget_lane, vset_lane, vcopy_lane, vcreate, vdup_n, vdup_lane, vmov_n.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192411 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
5610fbdb9c257b0b0c9589f6d6cedb58ec397a30 10-Oct-2013 Hao Liu <Hao.Liu@arm.com> Implement AArch64 vector load/store multiple N-element structure class SIMD(lselem).
Including following 14 instructions:
4 ld1 insts: load multiple 1-element structure to sequential 1/2/3/4 registers.
ld2/ld3/ld4: load multiple N-element structure to sequential N registers (N=2,3,4).
4 st1 insts: store multiple 1-element structure from sequential 1/2/3/4 registers.
st2/st3/st4: store multiple N-element structure from sequential N registers (N = 2,3,4).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192362 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
db5cb0fa68313a43b12e9ad0285e430706fc8328 10-Oct-2013 Tim Northover <tnorthover@apple.com> Revert "Implement AArch64 vector load/store multiple N-element structure class SIMD(lselem). "

This reverts commit r192351. The LLVM side broke the build and the Clang tests
will inevitably fail without it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192356 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
58b6ccfc8ef7be28bf081c1fd701e60b1f12fe17 10-Oct-2013 Hao Liu <Hao.Liu@arm.com> Implement AArch64 vector load/store multiple N-element structure class SIMD(lselem).
Including following 14 instructions:
4 ld1 insts: load multiple 1-element structure to sequential 1/2/3/4 registers.
ld2/ld3/ld4: load multiple N-element structure to sequential N registers (N=2,3,4).
4 st1 insts: store multiple 1-element structure from sequential 1/2/3/4 registers.
st2/st3/st4: store multiple N-element structure from sequential N registers (N = 2,3,4).

E.g. ld1(3 registers version) will load 32-bit elements {A, B, C, D, E, F} sequentially into the three 64-bit vectors list {BA, DC, FE}.
E.g. ld3 will load 32-bit elements {A, B, C, D, E, F} into the three 64-bit vectors list {DA, EB, FC}.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192351 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
3cb333070d35c9a6843e4211c9a74322f6c126ec 09-Oct-2013 Chad Rosier <mcrosier@codeaurora.org> [AArch64] Add support for NEON scalar floating-point reciprocal estimate,
reciprocal exponent, and reciprocal square root estimate instructions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192243 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
6d048e1a9768b594513e2ec7a6d3579787eb2505 08-Oct-2013 Chad Rosier <mcrosier@codeaurora.org> [AArch64] Add support for NEON scalar signed/unsigned integer to floating-point
convert instructions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192232 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
8dd4baacf584b1fc7b0e2c79a0b8b197a4fb5fab 07-Oct-2013 Matt Arsenault <Matthew.Arsenault@amd.com> Fix objectsize tests after r192117

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192120 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
48f98fe7c1374bf416403bf82b29d4fc11011057 07-Oct-2013 Chad Rosier <mcrosier@codeaurora.org> [AArch64] Add support for NEON scalar arithmetic instructions:
SQDMULH, SQRDMULH, FMULX, FRECPS, and FRSQRTS.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192112 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
0391691f86fd2a75ef2413d0272bfaf920d0e2b5 05-Oct-2013 Jiangning Liu <jiangning.liu@arm.com> Implement aarch64 neon instruction set AdvSIMD (Across).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192029 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
7f0ff70c391afeb7811b7ddcb06bfbbd5c6cf8f9 04-Oct-2013 Amaury de la Vieuville <amaury.dlv@gmail.com> Do not emit undefined lsrh/ashr for NEON shifts

These IR instructions are undefined when the amount is equal to operand
size, but NEON right shifts support such shifts. Work around that by
emitting a different IR in these cases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191953 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
0aa1a88e19235574481e46e9e6e9ce66a9e6624f 04-Oct-2013 Jiangning Liu <jiangning.liu@arm.com> Implement aarch64 neon instruction set AdvSIMD (3V elem).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191945 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
594e193073fe36b9ecbce9a105c269e20f82b3c9 02-Oct-2013 Joey Gouly <joey.gouly@arm.com> [ARM] Add a builtin to allow you to use the 'sevl' instruction.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191816 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
0cd6bd62f3f7ee42f08ad130395ac65564768990 26-Sep-2013 Benjamin Kramer <benny.kra@googlemail.com> Mark an impossible path as unreachable to pacify GCC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191436 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
146feb007d95d49d49da3490f29d434d9b504089 26-Sep-2013 Benjamin Kramer <benny.kra@googlemail.com> Remove tabs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191427 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
f7b9a5a37fc9d1f6356afa14865129fb4a617932 24-Sep-2013 NAKAMURA Takumi <geek4civic@gmail.com> CGBuiltin.cpp: Prune a stray default: label. [-Wcovered-switch-default]

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191277 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
aee8e168112a3cbb6282ab4c6b5ae63933053ebf 24-Sep-2013 Jiangning Liu <jiangning.liu@arm.com> Initial support for Neon scalar instructions.

Patch by Ana Pazos.

1.Added support for v1ix and v1fx types.
2.Added Scalar Pairwise Reduce instructions.
3.Added initial implementation of Scalar Arithmetic instructions.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191264 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
440a5f49133307745de7cc92a44d53088cf47c26 24-Sep-2013 Eli Friedman <eli.friedman@gmail.com> Add _mm_stream_si64 intrinsic.

While I'm here, also fix the alignment computation for the whole family of
intrinsics.

PR17298.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191243 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
520ec1e553ffa955276462e4230c1b128fa433af 18-Sep-2013 Joey Gouly <joey.gouly@arm.com> [ARMv8] Add builtins for CRC instructions.

Patch by Bradley Smith!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190931 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
ce4ad40100573008d013d2b9d3104c218ea34c2a 13-Sep-2013 Hal Finkel <hfinkel@anl.gov> Restore the sqrt -> llvm.sqrt mapping in fast-math mode

This restores the sqrt -> llvm.sqrt mapping, but only in fast-math mode
(specifically, when the UnsafeFPMath or NoNaNsFPMath CodeGen options are
enabled). The @llvm.sqrt* intrinsics have slightly different semantics from the
libm call, specifically, they are undefined when given a non-zero negative
number (the libm calls will always return NaN for any negative number).

This mapping was removed in r100613, and replaced with a TODO, but at that time
the fast-math flags were not yet implemented. Now that we have these, restoring
this mapping is important because it will enable autovectorization of sqrt
calls in loops (at least in fast-math mode).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190646 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
097a4b487897ca29f0f371c81b6a8b6c1ca599e4 09-Sep-2013 Jiangning Liu <jiangning.liu@arm.com> Implement aarch64 neon instruction set AdvSIMD (3V Diff), covering the following 26 instructions,

SADDL, UADDL, SADDW, UADDW, SSUBL, USUBL, SSUBW, USUBW, ADDHN, RADDHN, SABAL, UABAL, SUBHN, RSUBHN, SABDL, UABDL, SMLAL, UMLAL, SMLSL, UMLSL, SQDMLAL, SQDMLSL, SMULL, UMULL, SQDMULL, PMULL



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190289 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
912502b4996b14db31b498cb1eef2b17d7d66d57 04-Sep-2013 Hao Liu <Hao.Liu@arm.com> Inplement aarch64 neon instructions in AdvSIMD(shift). About 24 shift instructions:
sshr,ushr,ssra,usra,srshr,urshr,srsra,ursra,sri,shl,sli,sqshlu,sqshl,uqshl,shrn,sqrshr$
and 4 convert instructions:
scvtf,ucvtf,fcvtzs,fcvtzu


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189926 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
3b6b5dad09d314cb8055ed7500a03c3cf3daad0f 28-Aug-2013 Tim Northover <tnorthover@apple.com> ARM: comment on why vmull intrinsic has to exist for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189464 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
6bf1e8eadd36f077cf5403d23c664129d98eaf79 28-Aug-2013 Tim Northover <tnorthover@apple.com> ARM: Emit normal IR for vaddhn/vsubhn NEON intrinsics

These operations "vector add high-half narrow" actually correspond to the
sequence:

%sum = add <4 x i32> %lhs, %rhs
%high = lshr <4 x i32> %sum, <i32 16, i32 16, i32 16, i32 16>
%res = trunc <4 x i32> %high to <4 x i16>

Now that LLVM can spot this, Clang should emit the corresponding LLVM IR.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189463 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
b1c09b913e331824da29f8017452b6171f7eccbc 28-Aug-2013 Tim Northover <tnorthover@apple.com> ARM: use vqdmull and vqadds/vqsubs to implement vqdmlal/vqdmlsl

The NEON intrinsics vqdmlal and vqdmlsl are really just combinations of a
saturating-doubling-multiply (vqdmull) and a saturating add/sub, so now that
LLVM can spot those patterns Clang should emit them instead of specialised
intrinsics.

Feature already tested by existing ARM NEON intrinsics tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189462 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
fe0af454943374758309a1066e3304b3a56af04e 20-Aug-2013 Juergen Ributzka <juergen@apple.com> Fix last commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188724 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
3fc779191ce87cddf603e0c5bdbd225611201ff4 20-Aug-2013 Juergen Ributzka <juergen@apple.com> Simplify code by using CreateMemTemp. No functional change intended.

Reviewer: Eli

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188722 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
2766deb114cc5d3420027764438cf683dda8a9f0 17-Aug-2013 Juergen Ributzka <juergen@apple.com> Fix the name and the type of the argument for intrinisc
_mm256_broadcastsi128_si256 to align with the Intel documentation.

This fixes bug PR 16581 and rdar:14747994.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188609 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
79690a0c488bab19dc778e43a6845b2652fe4f79 15-Aug-2013 Hao Liu <Hao.Liu@arm.com> Fix the build failure of Realease version

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188456 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
12cd6a83f280bcab0e80230e8c7b1f989f3b4889 15-Aug-2013 Hao Liu <Hao.Liu@arm.com> Clang and AArch64 backend patches to support shll/shl and vmovl instructions and ACLE functions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188452 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
b793f0d3448a15277cd6b6cc4ba558ded39a8084 01-Aug-2013 Tim Northover <tnorthover@apple.com> AArch64: initial NEON support

Patch by Ana Pazos

- Completed implementation of instruction formats:
AdvSIMD three same
AdvSIMD modified immediate
AdvSIMD scalar pairwise

- Completed implementation of instruction classes
(some of the instructions in these classes
belong to yet unfinished instruction formats):
Vector Arithmetic
Vector Immediate
Vector Pairwise Arithmetic

- Initial implementation of instruction formats:
AdvSIMD scalar two-reg misc
AdvSIMD scalar three same

- Intial implementation of instruction class:
Scalar Arithmetic

- Initial clang changes to support arm v8 intrinsics.
Note: no clang changes for scalar intrinsics function name mangling yet.

- Comprehensive test cases for added instructions
To verify auto codegen, encoding, decoding, diagnosis, intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187568 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
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/CGBuiltin.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/CGBuiltin.cpp
09df2b066221d869f17f4b5762405f111a65f983 16-Jul-2013 Tim Northover <tnorthover@apple.com> ARM: implement low-level intrinsics for the atomic exclusive operations.

This adds three overloaded intrinsics to Clang:
T __builtin_arm_ldrex(const volatile T *addr)
int __builtin_arm_strex(T val, volatile T *addr)
void __builtin_arm_clrex()

The intent is that these do what users would expect when given most sensible
types. Currently, "sensible" translates to ints, floats and pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186394 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
5154dce6388e3aaa445467030df7a45ed1211abe 11-Jul-2013 Richard Smith <richard-llvm@metafoo.co.uk> Add a __builtin_addressof that performs the same functionality as the built-in
& operator (ignoring any overloaded operator& for the type). The purpose of
this builtin is for use in std::addressof, to allow it to be made constexpr;
the existing implementation technique (reinterpret_cast to some reference type,
take address, reinterpert_cast back) does not permit this because
reinterpret_cast between reference types is not permitted in a constant
expression in C++11 onwards.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186053 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.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/CGBuiltin.cpp
a7732c74995acb12ac334367a620c25508f9f667 25-Jun-2013 Eli Bendersky <eliben@google.com> Remove misplaced comment


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184862 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
98d1ec1e99625176626b0bcd44cef7df6e89b289 21-Jun-2013 Michael Gottesman <mgottesman@apple.com> [checked-arithmetic builtins] Added builtins to enable users to perform checked-arithmetic in c.

This will enable users in security critical applications to perform
checked-arithmetic in a fast safe manner that is amenable to c.

Tests/an update to Language Extensions is included as well.

rdar://13421498.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184497 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
ee76e7215d27c25bb053b71ae0a59119c08ccef9 18-Jun-2013 Michael Gottesman <mgottesman@apple.com> [multiprecision-builtins] Added missing builtin __builtin_{add,sub}cb for {add,sub} with carry for bytes.

I have had several people ask me about why this builtin was not available in
clang (since it seems like a logical conclusion). This patch implements said
builtins.

Relevant tests are included as well. I also updated the Clang language extension reference.

rdar://14192664.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184227 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
4537d6e0f9baf2e011a4260e0d7872789b01c3f2 14-May-2013 Rafael Espindola <rafael.espindola@gmail.com> Fix __clear_cache on ARM.

Current gcc's produce an error if __clear_cache is anything but

__clear_cache(char *a, char *b);

It looks like we had just implemented a gcc bug that is now fixed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181784 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
b71757b2e02b83c18b736729a747016f0b1e1353 14-May-2013 Benjamin Kramer <benny.kra@googlemail.com> Revert accidental commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181782 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
9d126fb59cf4aacc8e5058c830f23ba7be1db0fe 14-May-2013 Benjamin Kramer <benny.kra@googlemail.com> Take a stab at trying to unbreak the makefile build.

There is no clangRewrite.a.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181781 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
ff920eec4d449bee560d8d99636ad0eb50cd9d8d 04-May-2013 Tim Northover <Tim.Northover@arm.com> AArch64: teach Clang about __clear_cache intrinsic

libgcc provides a __clear_cache intrinsic on AArch64, much like it
does on 32-bit ARM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181111 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.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/CGBuiltin.cpp
1bfc28c48c1b86a05d2e07b403107ef3da5a0f8e 29-Mar-2013 Michael Liao <michael.liao@intel.com> Add RDSEED intrinsic support defined in AVX2 extension



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178331 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.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/CGBuiltin.cpp
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/CGBuiltin.cpp
4f45bc099f2665bc6e4bcbb169aa452390dbf3fe 18-Jan-2013 Will Dietz <wdietz2@illinois.edu> [ubsan] Add support for -fsanitize-blacklist

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172808 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
c4a04010f676ce9ff0049b0fc5d1f96a2dbe81be 16-Jan-2013 Tim Northover <Tim.Northover@arm.com> Correct order of operands forwarding NEON vfma to LLVM fma

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172650 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
7c9dbb76f6847fb30527c8e74ef9a25a3d4eb731 14-Jan-2013 Michael Gottesman <mgottesman@apple.com> Multiprecision subtraction builtins.

We lower these into 2x chained usub.with.overflow intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172476 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
563fb903fab15972e2d9c66b0ae046a94be86a71 13-Jan-2013 NAKAMURA Takumi <geek4civic@gmail.com> CGBuiltin.cpp: Fix abuse of ArrayRef in EmitOverflowIntrinsic().

In ArrayRef<T>(X), X should not be temporary value. It could be rewritten more redundantly;

llvm::Type *XTy = X->getType();
ArrayRef<llvm::Type *> Ty(XTy);
llvm::Value *Callee = CGF.CGM.getIntrinsic(IntrinsicID, Ty);

Since it is safe if both XTy and Ty are temporary value in one statement, it could be shorten;

llvm::Value *Callee = CGF.CGM.getIntrinsic(IntrinsicID, ArrayRef<llvm::Type*>(X->getType()));

ArrayRef<T> has an implicit constructor to create uni-entry of T;

llvm::Value *Callee = CGF.CGM.getIntrinsic(IntrinsicID, X->getType());

MSVC-generated clang.exe crashed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172352 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
0cf07bcc6c53f1df421d4c40ce52d43e8d8adcd3 13-Jan-2013 Michael Gottesman <mgottesman@apple.com> Added builtins for multiprecision adds.

We lower all of these intrinsics into a 2x chained usage of
uadd.with.overflow.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172341 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
cfa88f893915ceb8ae4ce2f17c46c24a4d67502f 12-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> Remove useless 'llvm::' qualifier from names like StringRef and others that are
brought into 'clang' namespace by clang/Basic/LLVM.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172323 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.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/CGBuiltin.cpp
08cc03fcd97c3886b004d861aadbc28de70092c5 18-Dec-2012 Meador Inge <meadori@codesourcery.com> CodeGen: Expand creal and cimag into complex field loads

PR 14529 was opened because neither Clang or LLVM was expanding
calls to creal* or cimag* into instructions that just load the
respective complex field. After some discussion, it was not
considered realistic to do this in LLVM because of the platform
specific way complex types are expanded. Thus a way to solve
this in Clang was pursued. GCC does a similar expansion.

This patch adds the feature to Clang by making the creal* and
cimag* functions library builtins and modifying the builtin code
generator to look for the new builtin types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170455 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.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/CGBuiltin.cpp
ad95481b2769ad61f23afc5e2c31f11c66090657 02-Dec-2012 Will Dietz <wdietz2@illinois.edu> [ubsan] Add flag to enable recovery from checks when possible.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169114 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
d6396a681c9acbe56bc41bbc2bed2db45755bcd7 05-Nov-2012 Richard Smith <richard-llvm@metafoo.co.uk> Use the individual -fsanitize=<...> arguments to control which of the UBSan
checks to enable. Remove frontend support for -fcatch-undefined-behavior,
-faddress-sanitizer and -fthread-sanitizer now that they don't do anything.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167413 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
956a5a17713deb1b5b27893303c4f308a1bd2a62 25-Oct-2012 Micah Villmow <villmow@gmail.com> Cleanup some clang code to use new type functions instead of using cast<>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166684 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
27844533aad5c165523a5926424097699610d3f0 14-Oct-2012 Nico Weber <nicolasweber@gmx.de> "Implement" codegen support for __noop().

Eli discovered that __noop's sema behavior also needs some love. I filed
PR14081 for that and intend to improve it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165886 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
4def70d3040e73707c738f7c366737a986135edf 09-Oct-2012 Richard Smith <richard-llvm@metafoo.co.uk> -fcatch-undefined-behavior: emit calls to the runtime library whenever one of the checks fails.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.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/CGBuiltin.cpp
d190057934331390ff67ebf51d66186dd5e392f0 06-Oct-2012 Benjamin Kramer <benny.kra@googlemail.com> Expose __builtin_bswap16.

GCC has always supported this on PowerPC and 4.8 supports it on all platforms,
so it's a good idea to expose it in clang too. LLVM supports this on all targets.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165362 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
02262662b4550d0227038470f2d7b3db7ada2b87 30-Sep-2012 Bob Wilson <bob.wilson@apple.com> Add an FMA intrinsic for ARM Neon.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164904 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.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/CGBuiltin.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/CGBuiltin.cpp
385cc5f01b59af0183a825351d93695ca7185091 26-Sep-2012 Nico Weber <nicolasweber@gmx.de> Add codegen support for the __debugbreak intrinsic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164660 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
4c919eb0c022be30d6130446cb8d50a7e8da9f46 21-Sep-2012 Jim Grosbach <grosbach@apple.com> ARM: Use a dedicated intrinsic for vector bitwise select.

The expression based expansion too often results in IR level optimizations
splitting the intermediate values into separate basic blocks, preventing
the formation of the VBSL instruction as the code author intended. In
particular, LICM would often hoist part of the computation out of a loop.

rdar://11011471

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164342 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
258f930227c1a102c9c22eee88df65f748863425 21-Sep-2012 Jim Grosbach <grosbach@apple.com> Tidy up. Trailing whitespace and 80 columns.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164341 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
7ac9ef1c82c779a5348ed11b3d10e01c58803b35 08-Sep-2012 Richard Smith <richard-llvm@metafoo.co.uk> -fcatch-undefined-behavior: Factor emission of the creation of, and branch to,
the trap BB out of the individual checks and into a common function, to prepare
for making this code call into a runtime library. Rename the existing EmitCheck
to EmitTypeCheck to clarify it and to move it out of the way of the new
EmitCheck.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163451 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
a484fc73ec6331bcaad092270b4ab9c8d1df23c3 29-Aug-2012 Eli Friedman <eli.friedman@gmail.com> Make alignment computation for pointer values for builtins handle
non-pointer types with a pointer representation correctly. PR13660.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162862 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
8e4c189e6502cffb760b33f092e65effb1d10092 23-Aug-2012 Eli Friedman <eli.friedman@gmail.com> Attempt to fix clang bootstrap (broken by r162425).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162440 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
ea93e40785ffeadfac66b948c95f9490ec26207a 23-Aug-2012 Eli Friedman <eli.friedman@gmail.com> Use the alignment from lvalue emission to more accurately compute the alignment
of a pointer for builtin emission, instead of just depending on the type of the
pointee. <rdar://problem/11314941>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162425 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
ce23bb7cdc51db26411d75da3b20818ac2cc1db6 14-Aug-2012 Fariborz Jahanian <fjahanian@apple.com> irgen: inline code for several of complex builtin
calls. // rdar://8315199


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161891 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
550a9d823a939366a9f776b58f18883acd905a93 14-Aug-2012 Bob Wilson <bob.wilson@apple.com> Avoid using i64 types for vld1q_lane/vst1q_lane intrinsics.

The backend has to legalize i64 types by splitting them into two 32-bit pieces,
which leads to poor quality code. If we produce code for these intrinsics that
uses one-element vector types, which can live in Neon vector registers without
getting split up, then the generated code is much better. Radar 11998303.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161879 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
a841c19f7860393d6319bf40e9d662284462771d 06-Aug-2012 Hal Finkel <hfinkel@anl.gov> Add __builtin_readcyclecounter() to produce the @llvm.readcyclecounter() intrinsic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161310 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
1638f2e8263df93b9fa055a12cc3f0968b9682d8 18-Jul-2012 Joel Jones <joel_k_jones@apple.com> More replacing of target-dependent intrinsics with target-indepdent
intrinsics. The second instruction(s) to be handled are the vector versions
of count set bits (ctpop).

The changes here are to clang so that it generates a target independent
vector ctpop when it sees an ARM dependent vector bits set count. The changes
in llvm are to match the target independent vector ctpop and in
VMCore/AutoUpgrade.cpp to update any existing bc files containing ARM
dependent vector pop counts with target-independent ctpops. There are also
changes to an existing test case in llvm for ARM vector count instructions and
to a test for the bitcode upgrade.

<rdar://problem/11892519>

There is deliberately no test for the change to clang, as so far as I know, no
consensus has been reached regarding how to test neon instructions in clang;
q.v. <rdar://problem/8762292>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160409 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
e87f3f62bcbe8bc562c1623c9e8bb49cf31c0460 17-Jul-2012 Simon Atanasyan <satanasyan@mips.com> Revert commit r160308. We decide to move builtins selection to the backend.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160353 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
d7bad053b048494db5f83b512a5169d01be96f81 16-Jul-2012 Simon Atanasyan <satanasyan@mips.com> MIPS: Implement __builtin_mips_shll_qb builtin function overloading.
This function has two versions. The first one is used for a register operand.
The second one is used for an immediate number.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160308 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
71bcc68ba44a87a516d84461bc68475e43134338 14-Jul-2012 Eric Christopher <echristo@apple.com> Capitalize comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160220 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
87d747b1fbf89aa0ba08cfc0e26655aa7739c77d 14-Jul-2012 Joel Jones <joel_k_jones@apple.com> This is one of the first steps at moving to replace target-dependent
intrinsics with target-indepdent intrinsics. The first instruction(s) to be
handled are the vector versions of count leading zeros (ctlz).

The changes here are to clang so that it generates a target independent
vector ctlz when it sees an ARM dependent vector ctlz. The changes in llvm
are to match the target independent vector ctlz and in VMCore/AutoUpgrade.cpp
to update any existing bc files containing ARM dependent vector ctlzs with
target-independent ctlzs. There are also changes to an existing test case in
llvm for ARM vector count instructions and a new test for the bitcode upgrade.

<rdar://problem/11831778>

There is deliberately no test for the change to clang, as so far as I know, no
consensus has been reached regarding how to test neon instructions in clang;
q.v. <rdar://problem/8762292>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160201 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
9a50249cd35f3d9d4d2b194a3edd6815ccf746d7 12-Jul-2012 Benjamin Kramer <benny.kra@googlemail.com> Add _rdrand{16,32,64}_step intrinsics to immintrin.h

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160118 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
0f3d0970dcdf6cf17550b86838dff12813968dbc 07-Jul-2012 John McCall <rjmccall@apple.com> Distinguish more carefully between free functions and C++ instance methods
in the ABI arrangement, and leave a hook behind so that we can easily
tweak CCs on platforms that use different CCs by default for C++
instance methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159894 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
1d2b2ca97686b1ed16b1614e4700f9d2a0938a71 28-Jun-2012 Benjamin Kramer <benny.kra@googlemail.com> Dead code eliminate the massive hexagon builtin intrinsic supporting code.

The tablegen'd code does the same thing without this egregious duplication.
In my limited testing everything seems to work, however there can be
differences if the clang and llvm builtin definitions don't match.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159371 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
e327aa81e38d9d17702f95ad4df56f8e3e9b7e91 28-Jun-2012 Benjamin Kramer <benny.kra@googlemail.com> Now that we use the GCC builtin <-> llvm intrinsic, dead code eliminate the handwritten emitter.

The generated code uncovered an invalid prototype for __builtin_mips_shilo, fix it along the way.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159368 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
fbf7005138d199bad238f0dd1ff509931a24ab10 28-Jun-2012 Simon Atanasyan <satanasyan@mips.com> Support MIPS DSP Rev1 intrinsics.
This patch was reviewed in the llvm-commits list by Jim Grosbach.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159366 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
c6794850a570a91c5f224b6f0293db9f560f4213 23-May-2012 Richard Smith <richard-llvm@metafoo.co.uk> If the first argument of __builtin_object_size can be folded to a constant
pointer, but such folding encounters side-effects, ignore the side-effects
rather than performing them at runtime: CodeGen generates wrong code for
__builtin_object_size in that case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157310 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
3e86a0433db4c664d29f2b19eb977138e071a68a 22-May-2012 Nuno Lopes <nunoplopes@sapo.pt> revert the usage of the objectsize intrinsic with 3 parameters (to match LLVM r157255)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157256 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
6ea175b086638cc813d7cd577ece517b0dc48547 11-May-2012 Sirish Pande <spande@codeaurora.org> Hexagon V5 intrinsics support in clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156630 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
08a9ae95ba7e0a87e667f97ccc5bac646df9a705 09-May-2012 Nuno Lopes <nunoplopes@sapo.pt> update calls to objectsize intrinsic to match LLVM r156473
add a test for -fbounds-checking code generation

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156474 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
4a7376d00df98cbfcad29ee709637707a2f3d46c 07-May-2012 Craig Topper <craig.topper@gmail.com> Convert AVX non-temporal store builtins to LLVM-native IR. This was previously done for SSE builtins.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156296 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
6603ff85d415c2aa72579f1a247012b75bfc2a19 23-Apr-2012 Chandler Carruth <chandlerc@gmail.com> Revert r155363, due to the underlying patches in LLVM causing regression
test suite failures.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155371 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
ac28eca18a9f0a343c78ba90b02dfe52302c1f19 23-Apr-2012 Sirish Pande <spande@codeaurora.org> Hexagon V5 (floating point) support in cfe.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155363 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
103f41d0e72a9e52a07e19cbde58c3afc8735098 18-Apr-2012 Chandler Carruth <chandlerc@gmail.com> Revert some Hexagon builtin commits to match reverts done to LLVM in
r155047. See the LLVM log for the primary motivation:
http://llvm.org/viewvc/llvm-project?rev=155047&view=rev

Primary commit r154828:
- Several issues were raised in review, and fixed in subsequent
commits.
- Follow-up commits also reverted, and which should be folded into the
original before reposting:
- r154837: Re-add the 'undef BUILTIN' thing to fix the build.
- r154928: Fix build warnings, re-add (and correct) header and
license
- r154937: Typo fix.

Please resubmit this patch with the relevant LLVM resubmission.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155048 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
7ac715fd3118362f14574c312b044d22e3afeee9 16-Apr-2012 Sirish Pande <spande@codeaurora.org> Hexagon V5(Floating Point) support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154828 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
2c39d71bb7cefdfe6116fa52454f3b3dc5abd517 13-Apr-2012 Richard Smith <richard-llvm@metafoo.co.uk> Implement the missing pieces needed to support libstdc++4.7's <atomic>:
__atomic_test_and_set, __atomic_clear, plus a pile of undocumented __GCC_*
predefined macros.

Implement library fallback for __atomic_is_lock_free and
__c11_atomic_is_lock_free, and implement __atomic_always_lock_free.

Contrary to their documentation, GCC's __atomic_fetch_add family don't
multiply the operand by sizeof(T) when operating on a pointer type.
libstdc++ relies on this quirk. Remove this handling for all but the
__c11_atomic_fetch_add and __c11_atomic_fetch_sub builtins.

Contrary to their documentation, __atomic_test_and_set and __atomic_clear
take a first argument of type 'volatile void *', not 'void *' or 'bool *',
and __atomic_is_lock_free and __atomic_always_lock_free have an argument
of type 'const volatile void *', not 'void *'.

With this change, libstdc++4.7's <atomic> passes libc++'s atomic test suite,
except for a couple of libstdc++ bugs and some cases where libc++'s test
suite tests for properties which implementations have latitude to vary.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154640 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
fafbf06732746f3ceca21d452d77b144ba8652ae 11-Apr-2012 Richard Smith <richard-llvm@metafoo.co.uk> Provide, and document, a set of __c11_atomic_* intrinsics to implement C11's
<stdatomic.h> header.

In passing, fix LanguageExtensions to note that C11 and C++11 are no longer
"upcoming standards" but are now actually standardized.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154513 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
ff993202abf6f5dc41c584c7103f5d39f248b3dd 16-Mar-2012 Eli Friedman <eli.friedman@gmail.com> Don't try to create "store atomic" instructions of non-integer types; they aren't supported at the moment. PR12040.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152891 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
bd86ad5c1a4ce7cd05f0370921b31a2eabf19f8f 15-Mar-2012 James Molloy <james.molloy@arm.com> Fix codegen for vld{3,4}_dup intrinsics.

Patch by Silviu Baranga!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152788 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
d6e73569ccf09369f9bd2021d53c88e7bded06e3 04-Mar-2012 Chris Lattner <sabre@nondot.org> add a testcase for PR12094 and fix a crash on pointer to incomplete type,
reported by Richard Smith.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151993 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
f4c3db175101cbf94dad59419c3ed7aed51bf606 02-Mar-2012 Jay Foad <jay.foad@gmail.com> PR12094: Set the alignment of memory intrinsic instructions based on the
types of the pointer arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151927 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
795b10062c2eaffae9e04241fb1a73cdbcb24a37 22-Feb-2012 Bill Wendling <isanbard@gmail.com> Use an ArrayRef when we can instead of passing in a SmallVectorImpl reference.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151150 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
345032a7211a6f983d59c30c0b3fa2b96819532a 20-Feb-2012 Chandler Carruth <chandlerc@gmail.com> Add 3dNOW intrinsic header to x86intrin.h, conditioned on __3dNOW__ to
match the behavior of GCC. Also add a test for these intrinsics, which
apparently have *zero* tests. =[ Not surprisingly, Clang crashed when
compiling these.

Fix the bug in CodeGen where we failed to bitcast the argument type to
x86mmx prior to calling the LLVM intrinsic. This fixes an assert on the
new 3dnow-builtins.c test.

This is one issue impacting the efforts to get Clang to emulate the
Microsoft intrinsics headers -- 3dnow intrinsics are implictitly made
available there.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150948 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.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/CGBuiltin.cpp
eac1f6746a2915fea3ed42284b07e274c0095a95 05-Feb-2012 Bob Wilson <bob.wilson@apple.com> Preserve alignment for Neon vld1_lane/dup and vst1_lane intrinsics.

We had been generating load/store instructions with the default alignment
for the vector element type, even when the pointer argument had less alignment.
<rdar://problem/10538555>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149794 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
30c5f1444d0c46c32dbb50820469d12fa89d7b53 30-Jan-2012 Craig Topper <craig.topper@gmail.com> Remove long dead code for handling vector shift by immediate builtins.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149237 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
79a64c7f8c501e3df4330db8f50a2dbc9877953b 30-Jan-2012 Craig Topper <craig.topper@gmail.com> Remove custom handling for cmpsd/cmpss/cmppd/cmpps builtins. The builtins are now in IntrinsicsX86.td.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149235 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
f8495d67ca4dd2ea15a4dc59e9a2fa32a9bfa475 30-Jan-2012 Craig Topper <craig.topper@gmail.com> Cleanup 3dnow builtin handling. Most of them were already handled by LLVM connecting intrinsics and builtins in IntrinsicsX86.td.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149233 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
a49a2839266f0bac2b6286e9f49fdc0c292938fe 28-Jan-2012 Benjamin Kramer <benny.kra@googlemail.com> Make the __builtin_c[lt]zs builtins target independent.

There is really no reason to have these only available on x86. It's
just __builtin_c[tl]z for shorts.

Modernize the test while at it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149183 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
8b30a9379f730875ba8fb2d0fe2d43611e0c20ff 26-Jan-2012 Bob Wilson <bob.wilson@apple.com> Make clz/ctz builtins defined for zero on ARM targets. rdar://10732455

ARM supports clz and ctz directly and both operations have well-defined
results for zero. There is no disadvantage in performance to using the
defined-at-zero versions of llvm.ctlz/cttz intrinsics. We're running into
ARM-specific code written with the assumption that __builtin_clz(0) == 32,
even though that value is technically undefined. The code is failing now
because of llvm optimizations that are taking advantage of the undef
behavior (specifically svn r147255). There's nothing wrong with that
optimization on x86 where any incorrect assumptions about __builtin_clz(0)
will quickly be exposed. For ARM, though, optimizations based on that undef
behavior are likely to cause subtle bugs. Other targets with defined-at-zero
clz/ctz support may want to override the default behavior as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149086 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
2ce8842641cc312628c4be836d34eb250e7c3f78 25-Jan-2012 Chris Lattner <sabre@nondot.org> reapply r148902:

"use the new ConstantVector::getSplat method where it makes sense."

Also simplify a bunch of code to use the Builder->getInt32 instead
of doing it the hard and ugly way. Much more progress could be made
here, but I don't plan to do it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148926 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
af521dae8ee15ebf4ecceae3d25f66a475104a07 25-Jan-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Revert 148902 which was part of 148901 which was reverted in r148906.

Original log:
use the new ConstantVector::getSplat method where it makes sense.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148907 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
9ddc6246b5f3dbb1a1e05d012361dc2c6d403381 25-Jan-2012 Chris Lattner <sabre@nondot.org> use the new ConstantVector::getSplat method where it makes sense.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148902 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.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/CGBuiltin.cpp
f7b2d8b3b1971e73e2d2f0662520dc7693235a7f 17-Jan-2012 Eli Friedman <eli.friedman@gmail.com> Add __builtin_labs and __builtin_llabs, to complete the set of __builtin_*abs. Patch by Ruben Van Boxem.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148340 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
561d3abc881033776ece385a01a510e1cbc1fa92 17-Jan-2012 David Blaikie <dblaikie@gmail.com> Remove unnecessary default cases in switches over enums.

This allows -Wswitch-enum to find switches that need updating when these enums are modified.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148281 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
52a27f5be98d99fd5339949d8a3d0b2aec655e0b 06-Jan-2012 Eli Friedman <eli.friedman@gmail.com> Revert r147655; it's breaking the compiler_rt build on OSX.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147677 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
843cc5aaed8c1b2e750aeef3ba13959f0ee117cc 06-Jan-2012 David Chisnall <csdavec@swan.ac.uk> If we are compiling with -fno-builtin then don't do constant folding of
builtins.

This fixes PR11711.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147655 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
80d4b55db94db2172a04617d1a80feca6bbcea5c 28-Dec-2011 Richard Smith <richard-llvm@metafoo.co.uk> Small refactoring and simplification of constant evaluation and some of its
clients. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147318 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
5c75208a5b88c835bce0a1671015c7e22c72f35f 25-Dec-2011 Craig Topper <craig.topper@gmail.com> Add intrinsics for lzcnt and tzcnt instructions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147263 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
9c2ffd803af03f1728423d0d73ff87d988642633 19-Dec-2011 Craig Topper <craig.topper@gmail.com> More AVX2 intrinsic support including saturating add/sub and palignr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146857 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.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/CGBuiltin.cpp
50058ec63f38eabeb94391a61d2e7fb18a062173 12-Dec-2011 Chandler Carruth <chandlerc@gmail.com> Update Clang to emit the new form of llvm.cttz and llvm.ctlz intrinsics,
setting the is_zero_undef flag appropriately to true as that matches the
semantics of these GCC builtins.

This is the Clang side of r146357 in LLVM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146358 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
83084c863572b48579767a4dd5dc686e1a8d669d 08-Nov-2011 NAKAMURA Takumi <geek4civic@gmail.com> lib/CodeGen/CGBuiltin.cpp: Tweak the identifier "Type" to appease msvc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144065 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
da95f73b59f9af964e33725c515139d34c90c863 08-Nov-2011 Bob Wilson <bob.wilson@apple.com> Clean up type flags for overloaded Neon builtins. No functional change.

This patch just adds a simple NeonTypeFlags class to replace the various
hardcoded constants that had been used until now. Unfortunately I couldn't
figure out a good way to avoid duplicating that class between clang and
TableGen, but since it's small and rarely changes, that's not so bad.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144054 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
51f4708c00110940ca3f337961915f2ca1668375 29-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> Rename Expr::Evaluate to Expr::EvaluateAsRValue to make it clear that it will
implicitly perform an lvalue-to-rvalue conversion if used on an lvalue
expression. Also improve the documentation of Expr::Evaluate* to indicate which
of them will accept expressions with side-effects.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143263 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
276b061970939293f1abaf694bd3ef05b2cbda79 11-Oct-2011 Eli Friedman <eli.friedman@gmail.com> Initial implementation of __atomic_* (everything except __atomic_is_lock_free).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141632 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.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/CGBuiltin.cpp
51c3b79caa493a53d324190c0d7e3cd1fe93d4f3 07-Oct-2011 Eli Friedman <eli.friedman@gmail.com> llvm.memory.barrier is going away; remove the wrapper intrinsic __builtin_llvm_memory_barrier.

__atomic_thread_fence will be landing soon as a replacement, wrapping around the new fence instruction.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141332 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
578faa837b552403e2002b97fdfbfde14f2448e5 27-Sep-2011 Benjamin Kramer <benny.kra@googlemail.com> de-tmpify clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140637 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.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/CGBuiltin.cpp
5c22ad2ef6bf39da22d5190025e0ddfd4b568b2a 14-Sep-2011 Eli Friedman <eli.friedman@gmail.com> Fix comment.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139678 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
a45680b7e7c49ea9893c6cff585984f3e4120366 14-Sep-2011 John McCall <rjmccall@apple.com> Correctly generate IR for casted "builtin" functions, where
the builtin is really just a predefined declaration. These are
totally valid to cast.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139657 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
eb43f4a8f133c2bc510ae136a556e92b68a6ff44 14-Sep-2011 Eli Friedman <eli.friedman@gmail.com> Re-commit r139643.

Make clang use Acquire loads and Release stores where necessary.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139650 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
a179b531f4728b91291bfbf639ddf71ed7db810a 14-Sep-2011 Eli Friedman <eli.friedman@gmail.com> Revert r139643 while I look into it; it's breaking selfhost.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139648 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
93013b235680b184be3cda150bcd6456944415f4 13-Sep-2011 Eli Friedman <eli.friedman@gmail.com> Make clang use Acquire loads and Release stores where necessary.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139643 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
ef004ec5adb0e11815cef3435fa5ac7366d783a9 10-Sep-2011 Julien Lerouge <jlerouge@apple.com> Remove trailing } in comment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139424 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
77f68bb90af93b95045fb994e7cd68137adcc132 10-Sep-2011 Julien Lerouge <jlerouge@apple.com> Bring llvm.annotation* intrinsics support back to where it was in llvm-gcc: can
annotate global, local variables, struct fields, or arbitrary statements (using
the __builtin_annotation), rdar://8037476.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139423 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
c83b975f1fb9d11e10b5aa25029ae9bb5fa80e07 07-Sep-2011 Eli Friedman <eli.friedman@gmail.com> Switch clang over to using fence/atomicrmw/cmpxchg instead of the intrinsics (which will go away). LLVM CodeGen does almost exactly the same thing with these and the old intrinsics, so I'm reasonably confident this will not break anything.

There are still a few issues which need to be resolved with code generation for atomic load and store, so I'm not converting the places which need those for now.

I'm not entirely sure what to do about __builtin_llvm_memory_barrier: the fence instruction doesn't expose all the possibilities which can be expressed by __builtin_llvm_memory_barrier. I would appreciate hearing from anyone who is using this intrinsic.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139216 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
012614ecf78442368ec82ee30efb3bc047b413e6 17-Aug-2011 Ted Kremenek <kremenek@apple.com> Fix a handful of dead stores found by Clang's static analyzer. There's a bunch of others I haven't touched.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137867 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
83bbba1fc98dd3b2a351013a40808e995e648f40 13-Aug-2011 Bob Wilson <bob.wilson@apple.com> Move handling of vget_lane/vset_lane before the code that checks the type.

Unlike most of the other Neon intrinsics, these are not overloaded and do not
have the extra argument that specifies the vector type. This has not been
fatal because the lane number operand is supposed to be an ICE and so that
value has harmlessly been used as the type identifier. Radar 9901281.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137550 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
da549e8995c447542d5631b8b67fcc3a9582797a 29-Jul-2011 Jay Foad <jay.foad@gmail.com> Remove some unnecessary single element array temporaries.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136461 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
1cbac8ac446cf513dbc7486dd50abd55bcfc62c6 25-Jul-2011 Frits van Bommel <fvbommel@gmail.com> Shorten some expressions by using ArrayRef::slice().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135910 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.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/CGBuiltin.cpp
e9c0265d6e6b5bf865f4a0c2c00d00ac251e6437 18-Jul-2011 Frits van Bommel <fvbommel@gmail.com> Migrate LLVM and Clang to use the new makeArrayRef(...) functions where previously explicit non-default constructors were used.
Mostly mechanical with some manual reformatting.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135390 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.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/CGBuiltin.cpp
4c7d9f1507d0f102bd4133bba63348636facd469 15-Jul-2011 Jay Foad <jay.foad@gmail.com> Convert CallInst and InvokeInst APIs to use ArrayRef.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135265 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
8dd55a3c3b28d195717c87bbc60e765951d408fe 14-Jul-2011 Benjamin Kramer <benny.kra@googlemail.com> Change intrinsic getter to take an ArrayRef, now that the underlying function in LLVM does.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135155 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.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/CGBuiltin.cpp
558229f267d2cdee69639df04382082e7c7ad54c 09-Jul-2011 Jakub Staszak <jstaszak@apple.com> Introduce __builtin_expect() intrinsic support.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134761 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
094240ab184c3ca4b94e9d7eac80fcd34d8dd30c 08-Jul-2011 Cameron Zwarich <zwarich@apple.com> Add codegen support for the fma/fmal/fmaf builtins.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134743 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
537c3461166ce074d05fb7c96ffa98ed54c9aaa0 25-Jun-2011 Bob Wilson <bob.wilson@apple.com> Revert "Shorten some ARM builtin names by removing unnecessary "neon" prefix."
Sorry, this was a bad idea. Within clang these builtins are in a separate
"ARM" namespace, but the actual builtin names should clearly distinguish tha
they are target specific.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133833 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
89f19e43730a2895cd81159d375c71c91872b8c2 24-Jun-2011 Bob Wilson <bob.wilson@apple.com> Shorten some ARM builtin names by removing unnecessary "neon" prefix.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133826 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.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/CGBuiltin.cpp
2eccb672799d19fb535ce349566fea6729cbb891 14-Jun-2011 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> Update the prefetch intrinsic usage. Now the last argument tells codegen
whether it's a data or instruction cache access.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132977 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
95d318c4c10437db40ca6e15fdf32e04012da58e 28-May-2011 Benjamin Kramer <benny.kra@googlemail.com> Eliminate temporary argument vectors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132260 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
26c1b8df8d1af0d8ef7f6c726fe1a8a9ddc60267 28-May-2011 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> Add support for ARM ldrexd/strexd builtins

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132249 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
600d57ff204fb8167134aa4a4b9a3f74d5113a50 13-May-2011 Bill Wendling <isanbard@gmail.com> Remove the 'unaligned load' builtins now that they're no longer used in the *mmintrin.h files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131300 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
0c9643008e5a35cac76cf3419b3308dcad97e53e 12-May-2011 Bill Wendling <isanbard@gmail.com> LLVM doesn't always optimize away the four loads from this:

(__m128){ p[0], p[1], p[2], p[3] }

which produces really bad code. This could be done in instcombine, but it's
probably better to do it in the front-end instead.
<rdar://problem/9424836>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131237 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
b107dd02f5e365f60b036b8a27c784f2d0d0a855 04-May-2011 Bill Wendling <isanbard@gmail.com> Simplification noticed by Chris.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130864 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
b51bddab211ba7daa8832c017d82281e0d8348d1 04-May-2011 Bill Wendling <isanbard@gmail.com> Convert the non-temporal store builtins to LLVM-native IR.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130830 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
dd697bc8629f0fa6777245610d52ca7ceb3b67f4 26-Apr-2011 Fariborz Jahanian <fjahanian@apple.com> Generalize case for built-in expressions having
side-effect to generate their ir. Not just for
__builtin_expect. // rdar://9330105


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130172 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
ec9919549095390b5737c561544f8bd49fc894de 26-Apr-2011 Fariborz Jahanian <fjahanian@apple.com> Ir-gen the side-effect(s) when __builtin_expect is
constant-folded. // rdar://9330105


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130163 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
42f681b83378de1541919c7f72e7555e35158867 21-Apr-2011 Chris Lattner <sabre@nondot.org> fix a crash on code that uses the result value of __builtin___memcpy_chk.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129892 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
a5e5e0f41e1dcee4603244ccea3d3956c55c23ac 17-Apr-2011 Chris Lattner <sabre@nondot.org> fold memcpy/set/move_chk to llvm.memcpy/set/move when the sizes
are trivial. This exposes opportunities earlier, and allows fastisel
to do good things with these at -O0.

This addresses rdar://9289468 - clang doesn't fold memset_chk at -O0


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129651 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
8b36a9ee7fe7204b30a85b95b11850aeb4b63ee3 15-Apr-2011 Michael J. Spencer <bigcheesegs@gmail.com> Add 3DNow! Intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129570 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
9b064d8bf94fc70aee7773feb04e5e96134f52f2 13-Apr-2011 Bill Wendling <isanbard@gmail.com> Removing the unaligned load tests from builtins-x86.c since they're generated by a regular 'load' now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129464 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
9c08b39781f0b4268f32aba65128c8700e3131f8 13-Apr-2011 Bill Wendling <isanbard@gmail.com> It looks like the FreeBSD buildbot needs this for the builtins-x86.c test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129433 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
60cb5e9d39ec1ec8f476eb700c423bfe574fbac8 13-Apr-2011 Bill Wendling <isanbard@gmail.com> Just use a native "load" instead of translating the builtin later. Clang can
take it!

I wasn't able to get __builtin_ia32_loaddqu to transform into an unaligned
load...I'll have to look into it further.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129427 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
aa48244cc043b1bcf166635745481d0d7f4f6838 13-Apr-2011 Bill Wendling <isanbard@gmail.com> Convert the unaligned load builtins to the first-class versions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129420 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
23aa9c8ca0bc441aab2a38a4c9fc7a1c9e9ac16a 09-Apr-2011 Chris Lattner <sabre@nondot.org> add a __sync_swap builtin to fill out the rest of the __sync builtins.
Patch by Dave Zarzycki!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129189 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
8c079ac8f8b36804b5586985449956e0481e2e02 31-Mar-2011 Matt Beaumont-Gay <matthewbg@google.com> Oops, prefer C-style cast here

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128607 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
c362e741cb5664905af8c95ecefd098fb86fb048 31-Mar-2011 Matt Beaumont-Gay <matthewbg@google.com> Silence GCC warning about differing types on the branches of a conditional expression

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128605 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
2d33e423d5091b7d2cb8618952752abd55bba965 31-Mar-2011 Bob Wilson <bob.wilson@apple.com> Use intrinsics for Neon vmull operations. Radar 9208957.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128590 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.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/CGBuiltin.cpp
6be56729a8a2a97e2a62e4567bc6a21efb8ba53d 30-Mar-2011 Jay Foad <jay.foad@gmail.com> (Almost) always call reserveOperandSpace() on newly created PHINodes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128534 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
c285372e69f42d95ca638d74abd1f46bd7b77a96 24-Mar-2011 Eli Friedman <eli.friedman@gmail.com> Make sure we aggressively attach nounwind (etc.) to calls to library
functions of the form __builtin_XXX.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128198 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
8a37c79f03e62aecfa2c58b9179f90dd1fcdb253 14-Mar-2011 Eric Christopher <echristo@apple.com> __clear_cache() is varargs and people will occasionally write it without
arguments. Process only the arguments that people write, but process
all of them.

Fixes rdar://8900346


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127616 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
fb018d153cbf12fd2a4a278cbf7614b9a2e2835e 15-Feb-2011 Chris Lattner <sabre@nondot.org> update for ConstantVector API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125538 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
e69b09955acbde87470eea8bc99b580195569dc0 14-Feb-2011 Chris Lattner <sabre@nondot.org> revert my ConstantVector patch, it seems to have made the llvm-gcc
builders unhappy.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125505 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
1970d5fe94889a1c5ded3d821564363eb5c21020 14-Feb-2011 Chris Lattner <sabre@nondot.org> update for ConstantVector::get API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125488 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
d16c2cf1cafa413709aa487cbbd5dc392f1ba1ff 08-Feb-2011 John McCall <rjmccall@apple.com> Reorganize CodeGen{Function,Module} to eliminate the unfortunate
Block{Function,Module} base class. Minor other refactorings.

Fixed a few address-space bugs while I was there.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125085 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
9577abc63f2c7afe5adf6e4e101ae91d29c3b8a6 23-Jan-2011 Ted Kremenek <kremenek@apple.com> Null initialize a few variables flagged by
clang's -Wuninitialized-experimental warning.
While these don't look like real bugs, clang's
-Wuninitialized-experimental analysis is stricter
than GCC's, and these fixes have the benefit
of being general nice cleanups.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124072 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
cd5b22e12b6513163dd131589746c194090f14e6 12-Jan-2011 John McCall <rjmccall@apple.com> Fix a latent bug where, after emitting an expression statement, we would
delete the block we began emitting into if it had no predecessors. We never
want to do this, because there are several valid cases during statement
emission where an existing block has no known predecessors but will acquire
some later. The case in my test case doesn't inherently fall into this
category, because we could safely emit the case-range code before the statement
body, but there are examples with labels that can't be fallen into
that would also demonstrate this bug.

rdar://problem/8837067



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123303 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
12bbc5c92209e0a7db2f71cfe03b84cb32df6adb 09-Jan-2011 Benjamin Kramer <benny.kra@googlemail.com> Make a helper function static.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123118 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
9f0c7cc36d29cf591c33962931f5862847145f3e 30-Dec-2010 Benjamin Kramer <benny.kra@googlemail.com> Simplify mem{cpy, move, set} creation with IRBuilder.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122634 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
46e392ae6d09979b087d7b1aca3b816ba4199b89 16-Dec-2010 Bob Wilson <bob.wilson@apple.com> Implement builtins for Neon half-precision float conversions.
Also tweak the VCVT_F32_F16 entry in arm_neon.td to be more consistent with
the other floating-point conversion builtins. Radar 8068427.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121916 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
141e489973d1c3f90bfee607e288c56b8dbb5721 11-Dec-2010 Bob Wilson <bob.wilson@apple.com> Add missing switch case for the quad-register version of the Neon vmul builtin.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121595 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
a0eb23b79aba48a8141daa4eb1aba66266b41abe 10-Dec-2010 Bob Wilson <bob.wilson@apple.com> Fix clang crashes on Neon vld[234]_dup intrinsics with 64-bit element types.
The 64-bit element vectors need to be handled as a special case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121592 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
30daefc5b559d4f32683503e36c14eba3c58ea62 10-Dec-2010 Bob Wilson <bob.wilson@apple.com> Add missing switch case to handle builtin for Neon vqnegq.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121468 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
c1fa01b69d9377a69087a6006a65a8fcc526d565 10-Dec-2010 Bob Wilson <bob.wilson@apple.com> LLVM's intrinsics for vpaddl and vpadal have 2 overloaded types.
Clang was only specifying the overloaded result type. PR8483.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121464 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
d185035263b98cdde75a869b26b5e5e2e6b13fdf 10-Dec-2010 Bob Wilson <bob.wilson@apple.com> Neon compare absolute LLVM intrinsics are not overloaded. PR8484.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121447 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
db3d4d036037f379f12643e067b229862d61e932 08-Dec-2010 Bob Wilson <bob.wilson@apple.com> Stop using builtins for the "_lane" variants of saturating multiply intrinsics.
Remove the "splat" parameter from the EmitNeonCall function, since it is no
longer needed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121300 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
a4cc79994b2f12663143dc31ceaf198e703fb914 08-Dec-2010 Bob Wilson <bob.wilson@apple.com> Stop using clang builtins for Neon vabdl and vabal intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121288 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
a8b988f6ec8e2355c7081b31578843be33027033 08-Dec-2010 Bob Wilson <bob.wilson@apple.com> Stop using clang builtins for Neon vaba intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121277 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
9d8231afec576559a73b352678b30452e1e83232 08-Dec-2010 Chandler Carruth <chandlerc@gmail.com> Silence an unused variable warning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121221 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
f203344728f604b7b95cbc093854d97da411dc6f 08-Dec-2010 Bob Wilson <bob.wilson@apple.com> Stop using clang builtins for Neon vadd[lw] and vsub[lw] intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121214 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
4064127e722070967289d02f27ee6a6d42cdba63 08-Dec-2010 Bob Wilson <bob.wilson@apple.com> Stop using clang builtins for Neon vmlal{_n,_lane} and vmlsl{_n,_lane}.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121210 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
cf55652cf668c1402eee0b12edd2e5a1bc34d7a1 07-Dec-2010 Bob Wilson <bob.wilson@apple.com> Stop using a clang builtin for Neon vdup_lane intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121191 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
c92b7721603484ddf337034c6f291d1b419a0528 07-Dec-2010 Bob Wilson <bob.wilson@apple.com> Stop using a clang builtin for Neon vmull_lane intrinsic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121189 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
ad698dd9bde1cedf559ede34a2f8acad5d8f9391 07-Dec-2010 Bob Wilson <bob.wilson@apple.com> Add a missing parameter, without which clang crashes for vqshlu_n intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121188 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
953d513c7ee79b3d9e37597e64317e75c0fbf7f6 03-Dec-2010 Bob Wilson <bob.wilson@apple.com> Add support for vmul_p8 Neon intrinsic. Radar 8446141.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120812 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
7965396d8d6ac23ec4c4f9d01d216f2e73d7fc72 03-Dec-2010 Bob Wilson <bob.wilson@apple.com> Add a separate rightShift flag instead of reusing the existing "poly" variable
to distinguish vsri/vsli.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120806 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
26815d97c5743481e317f17a8d53a6819d061862 27-Oct-2010 John McCall <rjmccall@apple.com> Restore r117403 (fixing IR gen for bool atomics), this time being less
aggressive about the form we expect bools to be in. I don't really have
time to fix all the sources right now.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117486 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
11893327d056a7ebd820da8f00a3286e7430a91c 27-Oct-2010 Rafael Espindola <rafael.espindola@gmail.com> Revert r117403 as it caused PR8480.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117456 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
789a1597250e57d7f35f253467165913c68979ad 27-Oct-2010 John McCall <rjmccall@apple.com> Extract procedures to do scalar-to-memory and memory-to-scalar conversions
in IR gen, and use those to fix a correctness issue with bool atomic
intrinsics. rdar://problem/8461234



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117403 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
1944ec188408aff1931c62c79a069e30f2549ec2 10-Oct-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Implement __builtin_ia32_vec_ext_v2si function (required by Qt).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116162 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
aa51e513850688b7963efc62abf1eface7037602 09-Oct-2010 Bill Wendling <isanbard@gmail.com> Add target implementations for the X86 builtins:

__builtin_ia32_vec_init_v8qi
__builtin_ia32_vec_init_v4hi
__builtin_ia32_vec_init_v2si

They are lowered to bitcasts. (These are all ready tested by the gcc testsuite.)
<rdar://problem/8529957>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116147 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
46c5591f0fa2e35367e44234e59bb041d15b778e 02-Oct-2010 Chris Lattner <sabre@nondot.org> when expanding a builtin, if the argument is required to be a constant,
force it to be a constant instead of emitting with EmitScalarExpr. In
-ftrapv mode, they are not the same.

This fixes rdar://8478728 + PR8221


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115388 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
a1aa9e36e6e21f74c56cf9e72cb5bd9aa2a92fd4 02-Oct-2010 Chris Lattner <sabre@nondot.org> tidy


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115383 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
28cab383fd9e7647d2186340eca769303cc4fbdb 28-Sep-2010 Bill Wendling <isanbard@gmail.com> Accidentally committed some temporary changes on my branch when reverting patches.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114936 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
2a674e8e443b7a3e77957078248fb52b3b1ec321 28-Sep-2010 Bill Wendling <isanbard@gmail.com> Temporarily revert 114929 114925 114924 114921. It looked like they (or at least
one of them) was causing a series of failures:

http://google1.osuosl.org:8011/builders/clang-x86_64-darwin10-selfhost/builds/4518

svn merge -c -114929 https://llvm.org/svn/llvm-project/cfe/trunk
--- Reverse-merging r114929 into '.':
U include/clang/Sema/Sema.h
U include/clang/AST/DeclCXX.h
U lib/Sema/SemaDeclCXX.cpp
U lib/Sema/SemaTemplateInstantiateDecl.cpp
U lib/Sema/SemaDecl.cpp
U lib/Sema/SemaTemplateInstantiate.cpp
U lib/AST/DeclCXX.cpp
svn merge -c -114925 https://llvm.org/svn/llvm-project/cfe/trunk
--- Reverse-merging r114925 into '.':
G include/clang/AST/DeclCXX.h
G lib/Sema/SemaDeclCXX.cpp
G lib/AST/DeclCXX.cpp
svn merge -c -114924 https://llvm.org/svn/llvm-project/cfe/trunk
--- Reverse-merging r114924 into '.':
G include/clang/AST/DeclCXX.h
G lib/Sema/SemaDeclCXX.cpp
G lib/Sema/SemaDecl.cpp
G lib/AST/DeclCXX.cpp
U lib/AST/ASTContext.cpp
svn merge -c -114921 https://llvm.org/svn/llvm-project/cfe/trunk
--- Reverse-merging r114921 into '.':
G include/clang/AST/DeclCXX.h
G lib/Sema/SemaDeclCXX.cpp
G lib/Sema/SemaDecl.cpp
G lib/AST/DeclCXX.cpp



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114933 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
df4d4825050f8b0eedcfc70c461a21160e48d993 27-Sep-2010 Bill Wendling <isanbard@gmail.com> Revert my patch changing the MMX "shift" intrinsics that take immediates into
"shift with non-immediate" intrinsics. It gets here because we they aren't
immediates anymore.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114890 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
4f209445c06a43283c6f72dda7c925538b1578e9 22-Sep-2010 Chris Lattner <sabre@nondot.org> fix the rest of rdar://8461279 - clang miscompiles address-space qualified atomics


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114503 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
780a2eb227c3f395a390a143f61bba1724913817 22-Sep-2010 Chris Lattner <sabre@nondot.org> same bug as before, this time with __sync_val_compare_and_swap.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114502 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
f2b95277be59f7d2a82cef8ea9f4cf6a36074593 22-Sep-2010 Chris Lattner <sabre@nondot.org> fix __sync_bool_compare_and_swap to work with address-space qualified types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114498 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
c6c8b3355da96bd0519632196b28fe57c5159d39 18-Sep-2010 Bill Wendling <isanbard@gmail.com> The MMX shift-with-immediate builtins require the equivalent
shift-with-immediate LLVM intrinsics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114239 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
47a88fa2efdaf40449b7e7e28252c7c6f410b37f 03-Sep-2010 Bob Wilson <bob.wilson@apple.com> Translate NEON vabdl, vaba, and vabal builtins to be implemented using the
vabd intrinsic combined with zext and add operations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112937 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
2235941293353325835d182da4470f61828fe789 03-Sep-2010 Bob Wilson <bob.wilson@apple.com> Add a bunch of missing bitcasts for clang NEON builtin expansions.
Radar 8388233


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112890 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
bf346e95f1d60f37fb37d89c288e1daa7839fc01 02-Sep-2010 Bob Wilson <bob.wilson@apple.com> Translate NEON vmull, vmlal, and vmlsl builtins to llvm multiply-add/sub
with zext/sext operations, instead of to llvm intrinsics. I have a plan to
avoid the clang builtins for these, but it is going to take a little longer
and I want to get the NEON intrinsics updated before the 2.8 release.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112764 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
3b6081bf49b7506cb96131247f209d1e03610df8 30-Aug-2010 Bob Wilson <bob.wilson@apple.com> Translate NEON vmovn builtin to a vector truncation instead of using an llvm
intrinsic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112504 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
54160c6d95f475035545206d13f967da87ab5243 29-Aug-2010 Bob Wilson <bob.wilson@apple.com> Translate NEON vaddl, vaddw, vsubl, and vsubw builtins to llvm add/sub
with zext/sext operations, instead of to llvm intrinsics. (We can also
get rid of the clang builtins and handle these entirely in the arm_neon.h
header if there is a way to express vector sext/zext in C.)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112413 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
06b6c589a5fff8e5476fe2b4cd6a660af71bfddd 27-Aug-2010 Bob Wilson <bob.wilson@apple.com> Add the new alignment arguments for NEON load/store intrinsics, based on the
types of the pointer address expressions used with those intrinsics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112272 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
e361cc3daa6c22e4413d48bd8b8934ea9fd5a55f 26-Aug-2010 Daniel Dunbar <daniel@zuster.org> IRgen/NEON: Fix codegen of vzip and vzipq.
- Will be adding an executable test case to test-suite repo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112126 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
7cea322bf019b0d38867a27e20e3771d84dbb1af 20-Aug-2010 Bob Wilson <bob.wilson@apple.com> Translate NEON vmovl intrinsics to zero/sign-extend operations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111612 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
cd480ad90ff4c144084805761d2dfa52ee9e1c92 06-Aug-2010 Nate Begeman <natebegeman@mac.com> vdup_lane was missing
<rdar://problem/8278732>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110420 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
99c40bb13b523d58d7aeb6446e4f486d6918ca58 03-Aug-2010 Nate Begeman <natebegeman@mac.com> Add support for VFP status & control operations for ARM.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110153 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
bb37f50c2d0d72e1fa5b349d5f6a11fdc5acb86e 30-Jul-2010 Nate Begeman <natebegeman@mac.com> Wire up sema checking for __builtin_arm_usat and __builtin_arm_ssat immediates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109814 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
e42b8a596886fc98e367c73e54d761446700029e 27-Jul-2010 Fariborz Jahanian <fjahanian@apple.com> 2nd argument of __builtin_expect must be evaluated
if it hs side-effect to matchgcc's behaviour.
Addresses radar 8172109.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109467 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
db4325b098eff5e9e660db19f0148423fb21f27f 18-Jul-2010 Chandler Carruth <chandlerc@gmail.com> Improve the representation of the atomic builtins in a few ways. First, we make
their call expressions synthetically have the "deduced" types based on their
first argument. We only insert conversions in the AST for arguments whose
values require conversion to match the value type expected. This keeps PR7600
closed by maintaining the return type, but avoids assertions due to unexpected
implicit casts making the type unsigned (test case added from Daniel).

The magic is moved into the codegen for the atomic builtin which inserts the
casts as needed at the IR level to raise the type to an integer suitable for
the LLVM intrinsic. This shouldn't cause any real change in functionality, but
now we can make the builtin be more truly polymorphic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108638 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.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/CGBuiltin.cpp
4be54302da40d3e7cba3d93115f312d2fcca1879 21-Jun-2010 Nate Begeman <natebegeman@mac.com> Implement remaining codegen for NEON, all operations should now work.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106407 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
4d3a7b0a0608febe3cdac68f6121546672ca875e 19-Jun-2010 Anton Korobeynikov <asl@math.spbu.ru> More AltiVec support.
Patch by Anton Yartsev!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106387 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
d69ec16b1b03b4a97c571ff14f15769fe13c1e5a 17-Jun-2010 Nate Begeman <natebegeman@mac.com> Remove last of the bool shifts for MS VC++, patch by dimitry andric


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106206 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
8e2eab27056a78bf1db50ee09929438ed5ea9d93 16-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Fixed conflict between objc_memmove_collectable builtin
decl. and one ddefined in darwin header file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106107 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
55bcace250e1ff366e4482714b344b8cbc8be5f3 16-Jun-2010 Fariborz Jahanian <fjahanian@apple.com> Patch adds support for copying of those
objective-c++ class objects which have GC'able objc object
pointers and need to use ObjC's objc_memmove_collectable
API (radar 8070772).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106061 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
7867f1a62b8b42cc2a55cc571608a75db2d516e0 14-Jun-2010 Benjamin Kramer <benny.kra@googlemail.com> An implementation of __builtin__fpclassify the way Chris Lattner described by Jörg Blank.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105936 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
61eecf5aea018ea65c9ab0bccacd2996b15c632d 14-Jun-2010 Nate Begeman <natebegeman@mac.com> Add some missing shifts
Fix multiplies by scalar
Add SemaChecking code for all immediates
Add SemaChecking-gen support to arm_neon.td


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105930 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
0d15c5321a11a5fee53b17ca8e9e0d72d6192b23 13-Jun-2010 Nate Begeman <natebegeman@mac.com> Most of NEON sema checking & fix to polynomial type detection


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105908 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
5af93efc01f4acd247aa6d3124db6c92c3679198 12-Jun-2010 Nate Begeman <natebegeman@mac.com> Shifts complete. Only vld & sema checking of constants remain.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105879 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
cba9421f5c9f784bd32fcddf55b6af4b6e024904 12-Jun-2010 Nate Begeman <natebegeman@mac.com> vbsl, vrev* is implemented via arm_neon.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105875 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
464ccb68f22a7e1c0a2844551c16f721540c91c3 12-Jun-2010 Nate Begeman <natebegeman@mac.com> Most of remaining builtins, 2 generics, vld, and rounding shfits remain.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105848 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
548f7daa59012df2e20420e86c2722d19367ef17 10-Jun-2010 Nate Begeman <natebegeman@mac.com> Multiplies, some shifts, set_lane


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105793 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
d075c01c359b9cc120c3accc7166990f9f4ac423 10-Jun-2010 Nate Begeman <natebegeman@mac.com> support _lane ops, and multiplies by scalar.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105770 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
df98e1d1da5ab1ca7c325378fc1c2eaa90a6476d 09-Jun-2010 Nate Begeman <natebegeman@mac.com> Implement codegen for hadd, hsub, max, min, mlal, movl, movn, padal, mov_n
Make note about how to handle the dozen or so multiply by scalar ops.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105734 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
95450f6ffc89ee218faa550433265f80930469c4 09-Jun-2010 Nate Begeman <natebegeman@mac.com> More accurate BuiltinsARM.def
vget_lane support


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105684 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
e140af3e27016f902146023fba7680b43043ec07 09-Jun-2010 Rafael Espindola <rafael.espindola@gmail.com> Simplify the code a bit and avoid a gcc waring about uninitialized variables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105676 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
1c2a88cfaeb11227d3a6bf7204207e0c8cf6de6f 09-Jun-2010 Nate Begeman <natebegeman@mac.com> Implement transpose/zip/unzip & table lookup.
Test out some basic constant-checking.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105667 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
30d91718a676177f0d0d0210ce4fdb4f616df6e5 08-Jun-2010 Nate Begeman <natebegeman@mac.com> Fix NEON intrinsic argument passing, support vext. Most now successfully make it through codegen to the .s file


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105599 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
7afacd5dc4614aff70ba9856b53541637309e282 08-Jun-2010 Rafael Espindola <rafael.espindola@gmail.com> Fix what looks like a merge problem that broke __clear_cache.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105595 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
9eb65a56e18bee1e5392bf2dff01cbd7b895f685 08-Jun-2010 Nate Begeman <natebegeman@mac.com> Implement ARM NEON up through vcvt, alphabetically.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105590 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
79ba509b0106fd0a1ff832baeb1fdb5430527efe 07-Jun-2010 Rafael Espindola <rafael.espindola@gmail.com> Implement __clear_cache on ARM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105537 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
998622c10198a25ba06c93d7e908f88ba0acc920 07-Jun-2010 Nate Begeman <natebegeman@mac.com> weekend checkpoint of arm neon builtins codegen.
TODO: add remainder of builtins to CGBuiltin, add code to SemaChecking to validate constants.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105532 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
0140d92977b70b6cd12164b725758aa5f5aa5c60 28-May-2010 Dan Gohman <gohman@apple.com> This cast is no longer needed; the FIXME is fixed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104919 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
6d172e2985346e55095c75f456901ea5d40fddaa 28-May-2010 Jim Grosbach <grosbach@apple.com> Update __builtin_setjmp codegen to match llvmCore changes in r104900.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104902 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
78673d9f910e8dfe13248c2426c51d8f9fb28572 27-May-2010 John McCall <rjmccall@apple.com> Enable the implementation of __builtin_setjmp and __builtin_longjmp. Not all
LLVM backends support these yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104867 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
6349ce94d1b4fa560bf060c5ca5ad5728ce4fad9 19-May-2010 Benjamin Kramer <benny.kra@googlemail.com> Implement codegen for __builtin_isnormal.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104118 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
58ae5b4b1e2fc02b95d6650af5755a59639aa153 06-May-2010 Chris Lattner <sabre@nondot.org> add todos for isinf_sign and isnormal, which I don't intend to implement
in the near future.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103169 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
ed074150c9a775c5e2e1c4ececeba18ba880ce7d 06-May-2010 Chris Lattner <sabre@nondot.org> implement codegen support for __builtin_isfinite, part of PR6083


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103168 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
420b11850d3f4557421f43f519b59d528329c668 06-May-2010 Chris Lattner <sabre@nondot.org> implement part of PR6083: codegen support for isinf. Like isnan,
this is generating correct but suboptimal (extra extend to double)
code for the float case. Will investigate next.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103166 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
e57aa9e367af227214140e1a174cc561aabaa0b9 15-Apr-2010 Eric Christopher <echristo@apple.com> Rewrite handling of 64-bit palignr intrinsics to be vector shuffles.
Stop multiplying constant by 8 accordingly in the header and change
intrinsic definition for what types we expect.

Add to existing palignr test to check that we're emitting the correct things.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101332 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
dd17394d225b06376e9ae1d23f36cec463fdef01 14-Apr-2010 Chris Lattner <sabre@nondot.org> implement altivec.h and a bunch of support code, patch by Anton Yartsev!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101215 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
beb41281f8355caa05700d0a77539defbdf428f8 07-Apr-2010 John McCall <rjmccall@apple.com> @llvm.sqrt isn't really close enough to C's sqrt to justify emitting calls
to the intrinsic, even when math-errno is off.

Fixes rdar://problem/7828230 by falling back on the library function.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100613 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
3ecd785aff34381f3704d9cb28fe3ef85af759de 04-Apr-2010 Mon P Wang <wangmp@apple.com> Reapply patch for adding support for address spaces and added a isVolatile field to memcpy, memmove, and memset.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100305 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
c90f56d9f144b2dce88d1c141ddf0e0940e62e63 02-Apr-2010 Mon P Wang <wangmp@apple.com> Revert r100193 since it causes failures in objc in clang


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100200 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
8facca6cafa8d471768fe14074b1301e24e08fec 02-Apr-2010 Mon P Wang <wangmp@apple.com> Reapply patch for adding support for address spaces and added a isVolatile field to memcpy, memmove, and memset.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100193 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
b5896c37922e09529e61db4b3dd946cf2ecb211e 31-Mar-2010 Bob Wilson <bob.wilson@apple.com> Revert Mon Ping's 99930 due to broken llvm-gcc buildbots.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99949 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
3b5caa20652c43d00229bac972b78bee44a0ee9f 30-Mar-2010 Mon P Wang <wangmp@apple.com> Added support for address spaces and added a isVolatile field to memcpy, memmove, and memset


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99930 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
7eff7c4153faf45b19b5919ef409ee5f6794eb25 25-Mar-2010 Daniel Dunbar <daniel@zuster.org> Remove support for nand atomic builtins. They are inconsistently implemented in
gcc, and the common expectation seems to be that they are unused. If and when
someone cares we can add them back with well documented demantics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99522 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
cb61a7bbe635cfa941b1aeaaa1fbda1bf900ee51 20-Mar-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Wrap atomic intrinsics with memory barriers, to ensure we honor the semantics.
- This should be conservatively correct, we eventually should have target hooks for platforms that are less strict.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99050 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
ba68b08a05587490ed4c2e3d26f3a742c995c660 06-Mar-2010 Eli Friedman <eli.friedman@gmail.com> PR6515: Implement __builtin_signbit and friends.

I'm reasonably sure my implementation is correct, but it would be nice if
someone could double-check.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97864 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.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/CGBuiltin.cpp
468ec6c0266e48fccb26ce50d5b915c645bb3c7b 04-Mar-2010 John McCall <rjmccall@apple.com> Revert changes r97693, r97700, and r97718.

Our testing framework can't deal with disabled targets yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97719 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
06a3066ea137b79e87a2f5d67e3012334bf4896b 04-Mar-2010 John McCall <rjmccall@apple.com> Implement __builtin_dwarf_sp_column().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97700 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
2752c0137d95aa2f4ee1cdff4b564bac842e041b 03-Mar-2010 Chris Lattner <sabre@nondot.org> add framework for ARM builtins, Patch by Edmund Grimley Evans!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97656 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
fb17a562135dd7597121da9245d0c1bdcda4146f 03-Mar-2010 John McCall <rjmccall@apple.com> Sketch out an implementation for __builtin_dwarf_cfa. I have no idea
why the front-end is calculating the argument to llvm.eh.dwarf.cfa().



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97653 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
7ada111fd5e81aff355e67bad0e4083f552b34bd 03-Mar-2010 John McCall <rjmccall@apple.com> Implement __builtin_eh_return.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97643 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
492c4f998d848673d3d6c9e6416115df4036a71d 03-Mar-2010 John McCall <rjmccall@apple.com> Add proper target hooks for __builtin_extract_return_address and
__builtin_frob_return_address. The implementations for both are
still trivial in the default case.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97638 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
d0b76ca10feefcfda5cb16698e50197e87a7d876 02-Mar-2010 John McCall <rjmccall@apple.com> Inspired by seeing "MIPS" go by in the commits, I've gone ahead and
implemented a (codegen) target hook for __builtin_extend_pointer.
I'm also making it return a uint64_t instead of an unsigned word; this
comports with typical usage (i.e. the one use I know of).

I don't know if any of the existing targets requires this hook to be
set (other than x86 and x86_64, which I know do not).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97547 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
5e11085830d4d4c53ff75575ab75889ee5126854 02-Mar-2010 John McCall <rjmccall@apple.com> After much consultation aimed at figuring out what this builtin actually
does, document the results and then implement __builtin_extend_pointer for
platforms where it's a no-op.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97540 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
195337d2e5d4625ae9dc1328c7cdbc7115b0261b 09-Feb-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Add CreateMemTemp, for creating an temporary memory object for a particular type, and flood fill. - CreateMemTemp sets the alignment on the alloca correctly, which fixes a great many places in IRgen where we were doing the wrong thing.

- This fixes many many more places than the test case, but my feeling is we need to audit alignment systematically so I'm not inclined to try hard to test the individual fixes in this patch. If this bothers you, patches welcome!

PR6240.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95648 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
ea48522e979957889fdaaa550beb4385601f66d3 05-Feb-2010 Daniel Dunbar <daniel@zuster.org> IRgen: Fix some CreateTempAlloca calls to use ConvertTypeForMem when that is
conceptually correct. Review appreciated (Chris, Eli, Anders).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95401 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
e6dddfd907f6ea58daed5e26eeaacd893d98db9b 23-Jan-2010 Eli Friedman <eli.friedman@gmail.com> Add bzero builtin; this should help codegen quality for code using this
function.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94320 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
0d13f6fdbdd6f06e2449b8834dda53334abd399a 23-Jan-2010 David Chisnall <csdavec@swan.ac.uk> Created __builtin___NSStringMakeConstantString() builtin, which generates constant Objective-C strings.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94274 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
0b5716469b4be89adeb15a9819ac82a86ef19ca8 16-Jan-2010 Tanya Lattner <tonic@nondot.org> Add codgen for BI__builtin_llvm_memory_barrier.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93611 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
83c2a98012a65b51be66fd76c3a1b13ed782c558 27-Dec-2009 Anton Korobeynikov <asl@math.spbu.ru> Promote arguments of frameaddr / returnaddr builtins to i32 type, when needed.
This is needed for the platforms, where bitwidth of "int" is not 32 bits
(e.g. 16 on msp430).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92176 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
d2490a91341b57df7a7e54f8a707e7ecde2eeb4e 24-Dec-2009 Anders Carlsson <andersca@mac.com> Fill in the return value slot in CGExprAgg::VisitCallExpr. This takes us halfway towards fixing PR5824.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92142 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
31777a2540879051a3c643b90e02c3fd3d315243 24-Dec-2009 Anders Carlsson <andersca@mac.com> Add a ReturnValueSlot class. Change the argument order in EmitCall to match the other overload better.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92136 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
fee667f35e64751baa7fefe70b4e7bab06c8cd86 23-Dec-2009 Eric Christopher <echristo@apple.com> Update for the intrinsic changes in llvm: the object size intrinsic
only takes a boolean second argument now. Update tests accordingly.
Currently the builtin still accepts the full range for compatibility.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91983 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
b0b84385f0cb0ea4036579f5f384f1c19b917c7e 18-Dec-2009 Daniel Dunbar <daniel@zuster.org> Fix a few MSVC warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91714 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
e6ec205d6d0f4aec27bf49ca1e8fbb139acc2f2b 17-Dec-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR5801: codegen memcpy, memmove, memset directly to LLVM intrinsics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91573 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
fba565d044a8979cfd916ce52655a6847bfaa601 16-Dec-2009 Mike Stump <mrs@apple.com> Add an addition check for undefined behavior for when we hit a
__builtin_unreachable. WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91499 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
c3420ffb282c6ffc0192013bf8045b6c21eddece 14-Dec-2009 Nate Begeman <natebegeman@mac.com> Revert mmx palignr to use an intrinsic, since mmx shuffle patterns are missing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91269 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
ce5818a19a8f77d1540d0352649d6687eca4af6b 14-Dec-2009 Nate Begeman <natebegeman@mac.com> Support x86's PALIGNR instruction without the use of a palignr intrinsic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91264 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
4bda1e448757ddf076622caf011eeb050ca893f1 07-Dec-2009 Mike Stump <mrs@apple.com> Remove obsolete fallback code for objectsize.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90780 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
91b59274439f776cdd545bd7bf5849fdb1842160 01-Dec-2009 Eric Christopher <echristo@apple.com> Update for llvm intrinsics change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90208 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
007b56738b00426688ee85baa75174358bd849f9 29-Nov-2009 Daniel Dunbar <daniel@zuster.org> Explicitly use setVolatile instead of extra IRBuilder argument.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90095 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
eac73e5b3eb3862945bcaa2770c71a727a3ee542 16-Nov-2009 Duncan Sands <baldrick@free.fr> Pass a value for the isSigned parameter of CreateIntCast, rather than
passing the name (an exotic way of specifying that the result is signed!).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88909 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
3ada2df42673b41ac173c0c9a3a2cb482837a424 09-Nov-2009 Mike Stump <mrs@apple.com> Enable the use of the new llvm objectsize intrinsic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86607 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
c4c9045dabfc0f0d37dea1b3eb2992654d5b2db1 27-Oct-2009 Mike Stump <mrs@apple.com> __builtin_object_size refinements. Ensure we handle expressions with
side-effects up front, as when we switch to the llvm intrinsic call
for __builtin_object_size later, it will have two evaluations.

We also finish off the intrinsic version of the code so we can just
turn it on once llvm has the intrinsic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85324 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
b16d32f74ffc467a5604934a1f844906be20cf7d 27-Oct-2009 Mike Stump <mrs@apple.com> Prep for future __builtin_object_size refinements. The theory is that
someone will add an llvm intrinsic for us to use, so the optimizer can
figure out the hard cases. WIP.

For those that want to help, double check with Eric before starting.
He has a bit of code this will plug into.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85175 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
3c0ef8cc0dc246bd3083e8cdd63005e8873d36d2 13-Oct-2009 Benjamin Kramer <benny.kra@googlemail.com> Simplify pointer creation with the new Type::getInt*Ptr methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83964 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
21190d54634d6e244e85d28ad915ce2fe86ecbff 21-Sep-2009 Chris Lattner <sabre@nondot.org> Implement __builtin_unreachable(), a GCC 4.5 extension.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82433 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
34771b594ca8cdf8cd2e40b27170efa4ed2833c5 14-Sep-2009 Daniel Dunbar <daniel@zuster.org> Fix subtle bug in generating LLVM function declarations for builtin functions.

The decl wasn't being passed down, which meant that function attributes were not
being set correctly. This is particularly important for ARM, since it wants to
override the calling convention. Instead we would emit the builtin with the
wrong calling convention, and instcombine would come along and merrily shred all
the calls to it. :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81756 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
1eb4433ac451dc16f4133a88af2d002ac26c58ef 09-Sep-2009 Mike Stump <mrs@apple.com> Remove tabs, and whitespace cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
d6139895f43d161a972d134ffda4229d2f548eb6 01-Sep-2009 Eli Friedman <eli.friedman@gmail.com> PR4836, part 2: CodeGen for __builtin_isnan.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80655 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
55cc2ed722e041228670d26d548e5590e355aced 24-Aug-2009 Daniel Dunbar <daniel@zuster.org> Remove TargetInfo::getTargetPrefix().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79907 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
0032b2781b4deb131f8c9b7968f2030bf2489cdd 13-Aug-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78946 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
c9c88b4159791c48e486ca94e3743b5979e2b7a6 31-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77722 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
03e205031b08669f05c41eed5b896fc94c4a12bb 31-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API changes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77638 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
96e0fc726c6fe7538522c60743705d5e696b40af 30-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77514 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
bc0a2226c7fcd18b29b6846049e2cfcb872d3593 27-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77249 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
b27ffbef8e8aa1e87b63cbc0d9cd630aba30dae5 26-Jul-2009 Daniel Dunbar <daniel@zuster.org> Switch to getName()


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77151 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
4a28d5deeba33722aa009eab488591fb9055cc7e 25-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77012 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
a1cf15f4680e5cf39e72e28c5ea854fcba792e84 15-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change, and contextify a bunch of related stuff.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75705 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
69243825cb5c91ec7207256aa57ae327cfaf8cb2 13-Jul-2009 Owen Anderson <resistor@mac.com> Update for LLVM API change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75446 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
40b598eea1310ec9ed554d56ce3e25b34c585458 30-Jun-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Remove the ASTContext parameter from the attribute-related methods of Decl.
The implementations of these methods can Use Decl::getASTContext() to get the ASTContext.

This commit touches a lot of files since call sites for these methods are everywhere.
I used pre-tokenized "carbon.h" and "cocoa.h" headers to do some timings, and there was no real time difference between before the commit and after it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74501 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
68584ed35ad819a1668e3f527ba7f5dd4ae6a333 18-Jun-2009 Douglas Gregor <dgregor@apple.com> Move the static DeclAttrs map into ASTContext. Fixes <rdar://problem/6983177>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73702 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
6b15cdc1312f8fc45c86ee75e2a85106700e97f6 14-Jun-2009 Chris Lattner <sabre@nondot.org> move the various builtins stuff from libast to libbasic. This
fixes a layering violation in lib/Basic/Targets.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73318 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
8fff25719eb9363ac197ac4b375699a9afe9d36d 07-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Remove a few more vector builtins.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73022 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
e0ae8bdadc4fef56db7f0e3336d0379a89eb462f 07-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Now that LLVM CodeGen can handle the generic variations a bit better,
get rid of a few more clang vector builtins.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73015 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
a311be7ddb3f6d732fce2ea09c8ffbeabaa94984 06-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Get rid of a bunch of dead builtins.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72996 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
a6d75c0324ac690107bbaa7193b526ef21466212 02-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Add support for __builtin_unwind_init.

Also, committing an #if 0'ed __builtin_setjmp and __builtin_longjmp
implementation I've had sitting in my tree for a while. I haven't
enabled it because the LLVM backend support isn't complete yet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72727 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
b52fe9ce99970955a5f581f5c66fcd89be9a268b 02-Jun-2009 Eli Friedman <eli.friedman@gmail.com> If we recognize alloca, treat it as a builtin. This fixes uses of
alloca without declaring it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72719 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
eb4f81e174b11633f7b85f555ea5d2834d6dae8a 28-May-2009 Daniel Dunbar <daniel@zuster.org> Fix a use-of-undefined, IRgen expects the RValue for "void" to be a scalar RValue.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72504 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
986477149db76e6d9f8d3c9859c9880c11b680ae 27-May-2009 Anders Carlsson <andersca@mac.com> Rename an EmitCallExpr function to EmitCall to make it clear that it doesn't emit an expr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72446 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
beaaccd8e2a8748f77b66e2b330fb9136937e14c 21-May-2009 Jay Foad <jay.foad@gmail.com> Use v.data() instead of &v[0] when SmallVector v might be empty.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72210 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
409bf46742e2f38b2f4cec53c86b109bed42840d 18-May-2009 Anders Carlsson <andersca@mac.com> Remove an unused builtin.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72033 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
79dcf5f96ad75259867d19bbf69512f320032fce 18-May-2009 Anders Carlsson <andersca@mac.com> Add 'cmp' SSE builtins and get rid of a bunch of other builtins.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72032 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
f58cd9bca9c2e7373300fc8bb7c57cff7e4eda4f 13-May-2009 Chris Lattner <sabre@nondot.org> implement __sync_synchronize and __sync_lock_release,
rdar://6880573


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71637 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
eebd9d2165a705ce6a8a6b6a7327864189d02785 13-May-2009 Chris Lattner <sabre@nondot.org> add support for __sync_nand_and_fetch and __sync_fetch_and_nand,
rdar://6880573


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71636 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
5caa370ea6f70bd3e7e4a9cc3b69ac1a849c8534 08-May-2009 Chris Lattner <sabre@nondot.org> reimplement __sync_* builtins to be variadic and to follow the same
semantic rules that gcc and icc use. This implements the variadic
and concrete versions as builtins and has sema do the
disambiguation. There are probably a bunch of details to finish up
but this seems like a large monotonic step forward :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71212 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
3b660efb9f9fa3e87096f4a96a2093cd17c43c2e 03-May-2009 Eli Friedman <eli.friedman@gmail.com> PR4134: Implement __builtin_extract_return_addr.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70794 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
9a901bb63990574ff0bcc12ff851d7a71cff8ddb 26-Apr-2009 Eli Friedman <eli.friedman@gmail.com> Remove getIntegerConstantExprValue in favor of using EvaluateAsInt.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70145 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
f29c8ad917e5fdc8fdd3d43707073be217bad625 18-Apr-2009 Chris Lattner <sabre@nondot.org> fix incorrect lowering of __builtin_ia32_shufpd, rdar://6803924


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69428 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
b11fa0d25d86169f0e0a29d5398116c0212bb787 13-Apr-2009 Daniel Dunbar <daniel@zuster.org> Update to use hasAttr() instead of getAttr().
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68987 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
e9352cc9818ba59e7cf88500ef048991c90f3821 08-Apr-2009 Anders Carlsson <andersca@mac.com> Add a destination type argument to EmitConstantExpr. This will be used for when the destination has a reference type. (No functionality change yet)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68593 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
0002d23aaf10f307273dab5facda01c137283d22 07-Apr-2009 Daniel Dunbar <daniel@zuster.org> Implement __sync_{add,sub,and,or,xor}_and_fetch and
__sync_bool_compare_and_swap.
- <rdar://problem/6762223> [sema/irgen] support
__sync_bool_compare_and_swap and __sync_add_and_fetch


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68482 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
ef2abfee3ea16ec74942dc09e9e425f46aeb2582 16-Feb-2009 Daniel Dunbar <daniel@zuster.org> Support IRgen of sqrt -> llvm.sqrt, pow -> llvm.pow.

- Define pow[lf]?, sqrt[lf]? as builtins.

- Add -fmath-errno option which binds to LangOptions.MathErrno

- Add new builtin flag Builtin::Context::isConstWithoutErrno for
functions which can be marked as const if errno isn't respected for
math functions. Sema automatically marks these functions as const
when they are defined, if MathErrno=0.

- IRgen uses const attribute on sqrt and pow library functions to
decide if it can use the llvm intrinsic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64689 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
62c29c667f5bcb854e99ccb3aec1280c84115951 16-Feb-2009 Daniel Dunbar <daniel@zuster.org> Fix IRgen of __builtin_memset.
- Fix test case to not only have negative tests.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64674 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
3e41d60eb627dc227c770f1c1c87d06909cf05fd 14-Feb-2009 Douglas Gregor <dgregor@apple.com> Implicitly declare certain C library functions (malloc, strcpy, memmove,
etc.) when we perform name lookup on them. This ensures that we
produce the correct signature for these functions, which has two
practical impacts:

1) When we're supporting the "implicit function declaration" feature
of C99, these functions will be implicitly declared with the right
signature rather than as a function returning "int" with no
prototype. See PR3541 for the reason why this is important (hint:
GCC always predeclares these functions).

2) If users attempt to redeclare one of these library functions with
an incompatible signature, we produce a hard error.

This patch does a little bit of work to give reasonable error
messages. For example, when we hit case #1 we complain that we're
implicitly declaring this function with a specific signature, and then
we give a note that asks the user to include the appropriate header
(e.g., "please include <stdlib.h> or explicitly declare 'malloc'"). In
case #2, we show the type of the implicit builtin that was incorrectly
declared, so the user can see the problem. We could do better here:
for example, when displaying this latter error message we say
something like:

'strcpy' was implicitly declared here with type 'char *(char *, char
const *)'

but we should really print out a fake code line showing the
declaration, like this:

'strcpy' was implicitly declared here as:

char *strcpy(char *, char const *)

This would also be good for printing built-in candidates with C++
operator overloading.

The set of C library functions supported by this patch includes all
functions from the C99 specification's <stdlib.h> and <string.h> that
(a) are predefined by GCC and (b) have signatures that could cause
codegen issues if they are treated as functions with no prototype
returning and int. Future work could extend this set of functions to
other C library functions that we know about.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64504 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
0785570af3ef5f8c5a0377129e41efe6f3f8d770 11-Feb-2009 Daniel Dunbar <daniel@zuster.org> Use EmitVAListRef instead of EmitLValue directly to handle array decay
case on x86_64.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64333 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
a6f80ef997f0363386749087b325607eaa5adcfc 05-Feb-2009 Dale Johannesen <dalej@apple.com> Reapply Daniel's patch to match up with llvm 63765.
Untested, Daniel or Nate please review.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63814 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
a9b66347bec984d1fd0378f85f092e2330344747 05-Feb-2009 Daniel Dunbar <daniel@zuster.org> Chase LLVM TOT in circles (i.e., revert r63773 to match revert of
r63765).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63795 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
42c9ffd02ef3691f04c63c4869d1f0530d7e88ff 04-Feb-2009 Daniel Dunbar <daniel@zuster.org> (llvm up) Update for intrinsic lookup changes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63773 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
3941b18b8e441c8c466efecd557de60b9a32d10b 25-Jan-2009 Eli Friedman <eli.friedman@gmail.com> Make the constant folder aware of
__builtin___CFStringMakeConstantString. (We get into trouble in
GenerateStaticBlockVarDecl if the constant folder isn't accurate.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62949 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
4fd0aa5803357d8c72eeac2cae15e12649ea08fe 20-Jan-2009 Eli Friedman <eli.friedman@gmail.com> Slight cleanup, and fix for va_arg on architectures where va_list is a
struct.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62585 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
c96c0511501190b631664ca556c0bf85537095d3 20-Jan-2009 Eli Friedman <eli.friedman@gmail.com> Do codegen correctly for va_start/end/copy on architectures where
va_list is a struct, like x86-64.

If anyone has a better idea for how to do the check in the if
statements, suggestions are welcome.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62582 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
6597f985156b3a24c0a9db1e01eeec85714c4a8d 20-Jan-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR3350: add special-casing for "references" to va_lists in
builtins.

Also, a minor tweak to va_copy for consistency.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62574 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
6fe7c8aa8c7546743ecd0ac0138c2cf5d8155386 18-Jan-2009 Nate Begeman <natebegeman@mac.com> Vector codegen improvements


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62458 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
4ee51b464fb0d452fb2a996dd2e86203eb70b0d7 22-Dec-2008 Anders Carlsson <andersca@mac.com> Generate code for __builtin_ia32_pshufw

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61324 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
f35d35a2316dcb65d078844696c2032b71a7f103 01-Dec-2008 Anders Carlsson <andersca@mac.com> Use the new Expr::Evaluate

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60321 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
6ee7aa154e8bbb21a21254293410b944f78b0bfe 16-Nov-2008 Chris Lattner <sabre@nondot.org> rename Expr::tryEvaluate to Expr::Evaluate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59426 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
d9641f8dad2eb11ad5f035a41f88c4259b80cd90 04-Nov-2008 Anders Carlsson <andersca@mac.com> Fix bug in va_copy

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58680 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
6a0b9846e60e321b1e295072e3d2d01d8411cc60 29-Oct-2008 Eli Friedman <eli.friedman@gmail.com> Fix for PR2966: va_start/va_end use the *address* of the
va_list, not the value. Patch fixes an assert on
x86-64 and a wrong-code bug on x86. I'm not completely sure,
but I think it's a regression from r58306.

Does anyone run regression tests regularly on x86-64? The crash should
have been picked up there.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58366 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
bc4f4030e245e36642f894d848f6a8bf94426cc2 15-Oct-2008 Mon P Wang <wangmp@apple.com> Added pinsrd, pinsrq, and some other vector intrinsics


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57563 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
f02e9ddf5efc75917af712b3c7f909581205f0a5 10-Oct-2008 Daniel Dunbar <daniel@zuster.org> Lift EmitTargetBuiltinExpr out of EmitBuiltinExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57335 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
506ff88f44562df267b6a06608ab841b76df2a2b 06-Oct-2008 Chris Lattner <sabre@nondot.org> Make sema and codegen allow __builtin___CFStringMakeConstantString as a valid
constant lvalue. Implement this in codegen by moving the code out of CGBuiltin
into EmitConstantExpr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57163 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
564ea2a99b3afeac9ded332730a56db1f6358a58 06-Oct-2008 Chris Lattner <sabre@nondot.org> always try to fold a builtin before emitting it. In the future
it is possible that a builtin could sometimes be folded (e.g. __builtin_clz)
if it's operand is a constant.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57161 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
9e62171a25e3a08fb5c49fb370f83faf5ae786f5 06-Oct-2008 Chris Lattner <sabre@nondot.org> Move handling of __builtin_nan("") out of CGBuiltin.cpp into ExprConstant.cpp



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57157 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
1f32999ec79a980576e100d64d5f3267eb19ea49 06-Oct-2008 Chris Lattner <sabre@nondot.org> remove some code where CGBuiltin folds constants, and use tryEvaluate to
do it instead. We should still handle __builtin_nan etc, but don't yet.
This fixes incorrect evaluation of __builtin_constant_p, a FIXME.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57156 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
7f57b000f232bc596dca627c976ace250c8171e3 30-Sep-2008 Mon P Wang <wangmp@apple.com> Added support for sse intrinsics loadlpd, loadhpd, muldq128, and mulld128


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56830 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
d5f8a4fd4d6dfb0415b93bb7ab721bba5cab1332 03-Sep-2008 Daniel Dunbar <daniel@zuster.org> Add __builtin_object_size support.
- Currently CodeGen always returns a conservative value for this (-1
or 0 depending on the context).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55735 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
958444659c5287a81a43188bfaa2a4902752b947 30-Aug-2008 Anders Carlsson <andersca@mac.com> Simplify some calls to Builder.CreateCall

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55567 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
488e993a135ce700b982bf099c3d6b856301d642 16-Aug-2008 Daniel Dunbar <daniel@zuster.org> Change WarnUnsupported to ErrorUnsupported (in name and in practice).
- We are beyond the point where this shows up often and when it does
generating miscompiled files is bad.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54836 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
acc5f3e42334525bf28c86471551f83dfce222d5 11-Aug-2008 Daniel Dunbar <daniel@zuster.org> More #include cleaning
- Kill unnecessary #includes in .cpp files. This is an automatic
sweep so some things removed are actually used, but happen to be
included by a previous header. I tried to get rid of the obvious
examples and this was the easiest way to trim the #includes in one
fell swoop.
- We now return to regularly scheduled development.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54632 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
c4a1dea2dc56bd1357ec91b829a0b9e68229a13e 11-Aug-2008 Daniel Dunbar <daniel@zuster.org> More #include cleaning
- Drop {Decl.h,DeclObjC.h,IdentifierTable.h} from Expr.h
- Moved Sema::getCurMethodDecl() out of line (dependent on
ObjCMethodDecl via dyn_cast).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54629 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
c5004516489c931cf839bdbdde5a76e4074cc888 31-Jul-2008 Mon P Wang <wangmp@apple.com> Updated to match new atomic names (to enable overloading for pointers to
different address spaces) for llvm r54195.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54241 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
abfaf9984eee3d076ded8770bf9fce156f10c185 25-Jul-2008 Nate Begeman <natebegeman@mac.com> X86 builtin fixes


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54049 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
9a847f598c4907a72b8593b364b9e6b94b086e75 23-Jul-2008 Chris Lattner <sabre@nondot.org> don't depend on the result of CreateNeg to be a binop


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53948 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
1caae959017b355e9bb61250d5a0d04edbf468b0 22-Jul-2008 Daniel Dunbar <daniel@zuster.org> Implement bzero, memset, memmove builtins.

This subsumes Nico Weber's patch and implements bzero in terms
of llvm.memset to match llvm-gcc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53888 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
4493f79fce48cd9cbd9f55fa9d452cde736747a0 22-Jul-2008 Daniel Dunbar <daniel@zuster.org> Implement nans, prefetch, and trap builtins.

This closes <rdar://problem/6080720>, support for __builtin_constant_p
has been filed separately.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53885 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
14ecaefc289b9ddc00e16232ba5348260250fd5f 21-Jul-2008 Daniel Dunbar <daniel@zuster.org> Kill an unused variable warning


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53878 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
a933c3c052bbd87b01cc6fc7a7745e1c4b1757fb 21-Jul-2008 Daniel Dunbar <daniel@zuster.org> Add __builtin_powi[fl] support


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53866 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
04b290030eee33295600728450f348989d1a627e 21-Jul-2008 Daniel Dunbar <daniel@zuster.org> Implement ffs, parity, and popcount builtins.
+ test case


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53851 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
6c5df7f54f40090df6032a74e650b8e4d1c96207 18-Jul-2008 Mon P Wang <wangmp@apple.com> Add support shufpd


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53747 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
6a705f0443f8398ece14d80e71d8e8c9e71aa84a 09-Jul-2008 Chris Lattner <sabre@nondot.org> Codegen support for __builtin_stdarg_start


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@53329 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
b7cfe88e88cb4f46308de89cf3f0c81bfe624128 30-Jun-2008 Chris Lattner <sabre@nondot.org> Make a few related changes:

1) add a new ASTContext::getFloatTypeSemantics method.
2) Use it from SemaExpr.cpp, CodeGenTypes.cpp and other places.
3) Change the TargetInfo.h get*Format methods to return their
fltSemantics byref instead of by pointer.
4) Change CodeGenFunction::EmitBuiltinExpr to allow builtins which
sometimes expand specially and othertimes fall back to libm.
5) Add support for __builtin_nan("") to codegen, cases that don't pass
in an empty string are currently lowered to libm calls.
6) Fix codegen of __builtin_infl.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52914 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
09b6bf5bfa2ba9cbbd353cbd7846af8f49b020e7 25-Jun-2008 Mon P Wang <wangmp@apple.com> Updated atomic intrinsic name from llvm r52706. Fixed dropped bit in shufps.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52707 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
5549976193e34417d4474a5f4a514268ef6666c7 17-Jun-2008 Ted Kremenek <kremenek@apple.com> This patch is motivated by numerous strict-aliasing warnings when compiling
clang as a Release build.

The big change is that all AST nodes (subclasses of Stmt) whose children are
Expr* store their children as Stmt* or arrays of Stmt*. This is to remove
strict-aliasing warnings when using StmtIterator. None of the interfaces of any
of the classes have changed (except those with arg_iterators, see below), as the
accessor methods introduce the needed casts (via cast<>). While this extra
casting may seem cumbersome, it actually adds some important sanity checks
throughout the codebase, as clients using StmtIterator can potentially overwrite
children that are expected to be Expr* with Stmt* (that aren't Expr*). The casts
provide extra sanity checks that are operational in debug builds to catch
invariant violations such as these.

For classes that have arg_iterators (e.g., CallExpr), the definition of
arg_iterator has been replaced. Instead of it being Expr**, it is an actual
class (called ExprIterator) that wraps a Stmt**, and provides the necessary
operators for iteration. The nice thing about this class is that it also uses
cast<> to type-checking, which introduces extra sanity checks throughout the
codebase that are useful for debugging.

A few of the CodeGen functions that use arg_iterator (especially from
OverloadExpr) have been modified to take begin and end iterators instead of a
base Expr** and the number of arguments. This matches more with the abstraction
of iteration. This still needs to be cleaned up a little bit, as clients expect
that ExprIterator is a RandomAccessIterator (which we may or may not wish to
allow for efficiency of representation).

This is a fairly large patch. It passes the tests (except CodeGen/bitfield.c,
which was already broken) on both a Debug and Release build, but it should
obviously be reviewed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52378 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
9e800e3dd80d77f6c47054738177bf824089f55a 16-Jun-2008 Chris Lattner <sabre@nondot.org> force size of alloca to i32, which is currently required by LLVM IR.
This fixes use of alloca on 64-bit systems.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52334 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
1e692ace08959399794363e77499b73da5494af9 14-Jun-2008 Eli Friedman <eli.friedman@gmail.com> Basic support for volatile loads and stores. Stores the volatile
qualifier in the lvalue, and changes lvalue loads/stores to honor
the volatile flag. Places which need some further attention are marked
with FIXMEs.

Patch by Cédric Venet.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52264 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
f4e853340590d5c32e58379e8c379ea1777d3101 27-May-2008 Eli Friedman <eli.friedman@gmail.com> Implementation of __builtin_ctlz.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51595 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
256f77e431bc6b920ec94cf0bb4ad339ca21b8c9 20-May-2008 Eli Friedman <eli.friedman@gmail.com> Add codegen support for stack address intrinsics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51309 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
d4b32e46517358f34e8cfbea35010adfcc3786e0 20-May-2008 Eli Friedman <eli.friedman@gmail.com> Implement CodeGen for __builtin_memcpy.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51282 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
24512501319aa6d7f70b1bd79470df0197b832c8 16-May-2008 Nate Begeman <natebegeman@mac.com> Fix some prototypes, and implement some builtins until we have our header files completed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51199 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
7ea2e3f6aae9b7511686d3d26dee690fee81c3aa 15-May-2008 Nate Begeman <natebegeman@mac.com> Handle a couple missing builtins that will go away eventually when the various
intrin.h files are finished


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51137 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
1ffe281890f3cd7728316b45a1f3dd4d3120af7b 10-May-2008 Mon P Wang <wangmp@apple.com> Added support to generate some atomic operators (add, sub, and, or etc..)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50919 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
3eae03e7d165f20a863a9a4d7122ba2a691ab16d 06-May-2008 Chris Lattner <sabre@nondot.org> simplify some builder calls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50694 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
2c62a1aa398d5582db00d2bad6b2d999ee50ec14 04-May-2008 Chris Lattner <sabre@nondot.org> use simplified API for making fp constants.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50623 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
e7722103abc4583366c914374d6aa8560e145fa1 14-Apr-2008 Nate Begeman <natebegeman@mac.com> Enable clang to codegen emmintrin.h until we have our own emmintrin.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49633 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
730f2c13e8ff0a2a3cc54fce9913add68107cb51 04-Apr-2008 Torok Edwin <edwintorok@gmail.com> fix build error: add missing braces.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49209 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
dbebb73b86d9fe56c2227bf75c13ea3a49248261 03-Apr-2008 Nate Begeman <natebegeman@mac.com> Teach clang how to codegen punpcklbw and punpcklwd


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49186 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/CodeGen/CGBuiltin.cpp
bda0b626e74513950405c27525af87e214e605e2 16-Mar-2008 Chris Lattner <sabre@nondot.org> Make a major restructuring of the clang tree: introduce a top-level
lib dir and move all the libraries into it. This follows the main
llvm tree, and allows the libraries to be built in parallel. The
top level now enforces that all the libs are built before Driver,
but we don't care what order the libs are built in. This speeds
up parallel builds, particularly incremental ones.


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