summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* [ms-cxxabi] bitcast to i8* to deref a data member pointerReid Kleckner2013-12-051-0/+5
| | | | | | | | This was causing us to miscompile llvm::SymbolTableListTraits::getListOwner(), which uses data member pointers. llvm-svn: 196545
* Fix a tranche of comment, test and doc typosAlp Toker2013-12-057-10/+10
| | | | llvm-svn: 196510
* Correct hyphenations in comments and assert messagesAlp Toker2013-12-056-8/+8
| | | | | | | This patch tries to avoid unrelated changes other than fixing a few hyphen-related ambiguities in nearby lines. llvm-svn: 196466
* Add an AdjustedType sugar node for adjusting calling conventionsReid Kleckner2013-12-052-2/+7
| | | | | | | | | | | | | | | | Summary: In general, this type node can be used to represent any type adjustment that occurs implicitly without losing type sugar. The immediate use of this is to adjust the calling conventions of member function pointer types without breaking template instantiation. Fixes PR17996. Reviewers: rsmith Differential Revision: http://llvm-reviews.chandlerc.com/D2332 llvm-svn: 196451
* Simplify the constructor to CodeGenABITypes.Mark Lacey2013-12-051-4/+5
| | | | | | | | | | | | The CodeGenOptions are not used for ABI type selection, so we will just create one with the default constructor (there is a FloatABI option in CodeGenOptions that is passed on to LLVM, but not used in Clang for LLVM IR type generation). We can use the DiagnosticsEngine on the ASTContext rather than making a client pass one in explicitly. llvm-svn: 196450
* [ms-cxxabi] Construct and destroy call arguments in the correct orderReid Kleckner2013-12-045-100/+120
| | | | | | | | | | | | | | | | | | | Summary: MSVC destroys arguments in the callee from left to right. Because C++ objects have to be destroyed in the reverse order of construction, Clang has to construct arguments from right to left and destroy arguments from left to right. This patch fixes the ordering by reversing the order of evaluation of all call arguments under the MS C++ ABI. Fixes PR18035. Reviewers: rsmith Differential Revision: http://llvm-reviews.chandlerc.com/D2275 llvm-svn: 196402
* [SystemZ] Fix handling of pass-by-pointer argumentsRichard Sandiford2013-12-041-3/+3
| | | | | | | | | | | | | | | | I'd misunderstood getIndirect() to mean that the argument should be passed as a pointer at the ABI level, with the ByVal argument choosing caller-copy semantics over no-caller-copy (callee-copy-on-write) semantics. But getIndirect(x) actually means that x is passed by pointer at the IR level but (at least on all other targets I looked at) directly at the ABI level. getIndirect(x, false) selects a pointer to a caller-made copy, which is what SystemZ was aiming for. This fixes a miscompilation of c-index-test. Structure arguments were being passed by pointer, but no copy was being made, so a write in the callee stomped over a caller's local variable. llvm-svn: 196370
* [AArch64 NEON] Add ACLE intrinsic vceqz_f64.Kevin Qin2013-12-041-5/+13
| | | | llvm-svn: 196361
* [AArch64 NEON] Add missing compare intrinsics.Kevin Qin2013-12-041-3/+31
| | | | llvm-svn: 196359
* [AArch64]Add missing floating point convert, round and misc intrinsics.Hao Liu2013-12-031-7/+22
| | | | | | E.g. int64x1_t vcvt_s64_f64(float64x1_t a) -> FCVTZS Dd, Dn llvm-svn: 196211
* revert r196152. Hao Liu2013-12-031-13/+0
| | | | | | | | | | | | | | This is a duplicate implementation. E.g. this patch defines: float64_t vabd_f64(float64_t a, float64_t b) But there is already a similar intrinsic "vabdd_f64" with the same types. Also, this intrinsic will be conflicted to the vector type intrinsic as following(Which is implemented by me and will be committed to trunk): float64x1_t vabd_f64(float64x1_t a, float64x1_t b). Two functions shouldn't have a same name in arm_neon.h. According to ARM ACLE document, such vabd_f64 with float64_t is not existing. So I revert this commit. llvm-svn: 196205
* AArch64: Add missing scalar pair intrinsics.Hao Liu2013-12-031-0/+14
| | | | | | E.g. "float32_t vaddv_f32(float32x2_t a)" to be matched into "faddp s0, v1.2s". llvm-svn: 196199
* [AArch64] Add missing NEON scalar floating-point to integer convert ACLEs.Chad Rosier2013-12-021-0/+13
| | | | llvm-svn: 196152
* Debug Info: Move the constant for Debug Info Version from Dwarf.h to Metadata.h.Manman Ren2013-12-021-1/+1
| | | | | | | Suggested by Eric. Paired commit with r196144. llvm-svn: 196145
* Expand comments for Debug Info Version.Manman Ren2013-12-021-1/+4
| | | | llvm-svn: 196143
* Fix the problem that the range check for scalar narrow shift is too wide.Hao Liu2013-11-291-1/+0
| | | | | | E.g. the immediate value of vshrns_n_s16 is [1,16], which should be [1,8]. llvm-svn: 195942
* Remove a whole lot of unused variablesAlp Toker2013-11-271-1/+0
| | | | | | | There are about 30 removed in this patch, generated by a new FixIt I haven't got round to submitting yet. llvm-svn: 195814
* [AArch64] Add support for NEON scalar floating-point absolute difference.Chad Rosier2013-11-271-0/+5
| | | | llvm-svn: 195804
* [AArch64] Add support for NEON scalar floating-point to integer convertChad Rosier2013-11-261-0/+57
| | | | | | instructions. llvm-svn: 195789
* Remove some unused localsAlp Toker2013-11-261-1/+0
| | | | llvm-svn: 195714
* Add heading and remove leftover personal email addressesAlp Toker2013-11-251-2/+1
| | | | | | | | | | | | | | clang's attribute support is mature by now so replace Sean's warning and email address with a standard LLVM copyright heading. Also remove a personal email address and credit docstring from CGObjCGNU that shouldn't have been there. This is in line with the LLVM developer policy introduced in r45410. Contributors can add themselves to CREDITS.txt while active module owners are listed in CODE_OWNERS.TXT. llvm-svn: 195587
* [CodeGen] If there is a function definition with duplicate mangled name, ↵Argyrios Kyrtzidis2013-11-231-0/+4
| | | | | | | | emit an error instead of asserting. rdar://15522601 & http://llvm.org/PR18031 llvm-svn: 195556
* Adjust r194296 to not apply the alias replacement for externallyJoerg Sonnenberger2013-11-221-1/+8
| | | | | | | | available always-inline functions. This breaks libc++'s locale implementation. Code generation for this case should be fixed, but this is a stop gap fix for clang 3.4. llvm-svn: 195501
* Debug Info: add a "Debug Info Version" module flag to output the current debugManman Ren2013-11-221-0/+5
| | | | | | | | info version number. Will error out when modules have different version numbers. llvm-svn: 195495
* Revert r193994 and part of r193995Justin Bogner2013-11-221-2/+4
| | | | | | | | | | | | | Not long ago I made the CodeGen of for loops simplify the condition at -O0 in the same way we do for if and conditionals. Unfortunately this ties how loops and simple conditions work together too tightly, which makes features such as instrumentation based PGO awkward. Ultimately, we should find a more general way to simplify the logic in a given condition, but for now we'll just avoid using EmitBranchOnBool for loops, like we already do for while and do loops. llvm-svn: 195438
* CodeGen: WhitespaceJustin Bogner2013-11-223-9/+9
| | | | llvm-svn: 195437
* Fix a crash in EmitStoreThroughExtVectorComponentLValue for vectors of odd ↵Joey Gouly2013-11-211-0/+6
| | | | | | | | | | | | | | | | | | | sizes. In OpenCL a vector of 3 elements, acts like a vector of four elements. So for a vector of size 3 the '.hi' and '.odd' accessors, would access the elements {2, 3} and {1, 3} respectively. However, in EmitStoreThroughExtVectorComponentLValue we are still operating on a vector of size 3, so we should only access {2} and {1}. We do this by checking the last element to be accessed, and ignore it if it is out-of-bounds. EmitLoadOfExtVectorElementLValue doesn't have a similar problem, because it does a direct shufflevector with undef, so an out-of-bounds access just gives an undef value. Patch by Anastasia Stulova! llvm-svn: 195367
* Implemented Neon scalar vdup_lane intrinsics.Ana Pazos2013-11-211-0/+25
| | | | | | Fixed scalar dup alias and added test case. llvm-svn: 195329
* Implemented Neon scalar by element intrinsics.Ana Pazos2013-11-211-6/+45
| | | | | | | Intrinsics implemented: vqdmull_lane, vqdmulh_lane, vqrdmulh_lane, vqdmlal_lane, vqdmlsl_lane scalar Neon intrinsics. llvm-svn: 195326
* [-cxx-abi microsoft] Emit linkonce_odr definitions for declarations of ↵Hans Wennborg2013-11-213-0/+21
| | | | | | | | | | | | | | | static data members with inline initializers (PR17689) This makes Clang emit a linkonce_odr definition for 'val' in the code below, to be compatible with MSVC-compiled code: struct Foo { static const int val = 1; }; Differential Revision: http://llvm-reviews.chandlerc.com/D2233 llvm-svn: 195283
* [NVPTX] Update ABI handlingJustin Holewinski2013-11-201-6/+16
| | | | | | For PTX, we want the target to handle struct returns directly. llvm-svn: 195268
* Add a mangler entry point for TBAA rather than using RTTI directlyReid Kleckner2013-11-191-7/+3
| | | | | | | | | | | | | | | | | | | | Summary: RTTI is not yet implemented for the Microsoft C++ ABI and isn't expected soon. We could easily add the mangling, but the error is what prevents us from silently miscompiling code that expects RTTI. Instead, add a new mangleTypeName entry point that simply forwards to mangleName or mangleType to produce a string that isn't part of the ABI. Itanium can continue to use RTTI names to avoid unecessary test breakage. This also seems like the right design. The fact that TBAA names happen to be RTTI names is now an implementation detail of the mangler, rather than part of TBAA. Differential Revision: http://llvm-reviews.chandlerc.com/D2153 llvm-svn: 195168
* Implement AArch64 neon instructions class SIMD lsone and SIMD lone-post.Hao Liu2013-11-191-0/+127
| | | | llvm-svn: 195079
* DebugInfo: Update caller based on DIType's MDNode* ctor becoming explicit in ↵David Blaikie2013-11-181-1/+2
| | | | | | r195055. llvm-svn: 195056
* Implement the newly added AArch64 ACLE functions for ld1/st1 with 2/3/4 vectors.Hao Liu2013-11-181-0/+86
| | | | | | The functions are like: vst1_s8_x2 ... llvm-svn: 194991
* Add -freroll-loops to enable loop rerollingHal Finkel2013-11-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This adds -freroll-loops (and -fno-reroll-loops in the usual way) to enable loop rerolling as part of the optimization pass manager. This transformation can enable vectorization, reduce code size (or both). Briefly, loop rerolling can transform a loop like this: for (int i = 0; i < 3200; i += 5) { a[i] += alpha * b[i]; a[i + 1] += alpha * b[i + 1]; a[i + 2] += alpha * b[i + 2]; a[i + 3] += alpha * b[i + 3]; a[i + 4] += alpha * b[i + 4]; } into this: for (int i = 0; i < 3200; ++i) { a[i] += alpha * b[i]; } Loop rerolling is currently disabled by default at all optimization levels. llvm-svn: 194967
* Remove unused but set variable.Benjamin Kramer2013-11-161-4/+0
| | | | llvm-svn: 194920
* Implemented aarch64 Neon scalar vmulx_lane intrinsicsAna Pazos2013-11-151-7/+80
| | | | | | | | | | | | | | 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. llvm-svn: 194889
* Fix typo in CGRecordLayoutBuilder.cpp: s/Field/Fields/ in commentHans Wennborg2013-11-151-1/+1
| | | | llvm-svn: 194863
* Remove an unused local from r194827Alp Toker2013-11-151-1/+0
| | | | llvm-svn: 194835
* [-cxx-abi microsoft] Emit thunks for pointers to virtual member functionsHans Wennborg2013-11-153-47/+136
| | | | | | | | | | | | | | | | Instead of storing the vtable offset directly in the function pointer and doing a branch to check for virtualness at each call site, the MS ABI generates a thunk for calling the function at a specific vtable offset, and puts that in the function pointer. This patch adds support for emitting such thunks. However, it doesn't support pointers to virtual member functions that are variadic, have an incomplete aggregate return type or parameter, or are overriding a function in a virtual base class. Differential Revision: http://llvm-reviews.chandlerc.com/D2104 llvm-svn: 194827
* Fix test failures after addrspacecast added.Matt Arsenault2013-11-151-4/+8
| | | | | | Bitcasts between address spaces are no longer allowed. llvm-svn: 194765
* [AArch64] Add support for legacy AArch32 NEON scalar shift right by immediateChad Rosier2013-11-141-0/+11
| | | | | | and accumulate instructions. llvm-svn: 194732
* [OpenCL] Make sure we put string literals in the constant address space.Joey Gouly2013-11-141-4/+9
| | | | llvm-svn: 194717
* [AArch64 neon] support poly64 and relevant intrinsic functions.Kevin Qin2013-11-141-0/+1
| | | | llvm-svn: 194660
* Implement aarch64 neon instruction class misc.Kevin Qin2013-11-142-0/+283
| | | | llvm-svn: 194657
* Implement AArch64 NEON instruction set AdvSIMD (table).Jiangning Liu2013-11-141-2/+229
| | | | llvm-svn: 194649
* Don't use alias from derived dtor to base dtor at -O0.Rafael Espindola2013-11-131-0/+5
| | | | | | | | | | This patch disables aliasing (and rauw) of derived dtors to base dtors at -O0. This optimization can have a negative impact on the debug quality. This was a latent bug for some time with local classes, but got noticed when it was generalized and broke gdb's destrprint.exp. llvm-svn: 194618
* -fms-extensions: Recognize _alloca as an alias for the alloca builtinReid Kleckner2013-11-131-0/+1
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D1989 llvm-svn: 194617
* [AArch64] Tests for legacy AArch32 NEON scalar shift by immediate instructions.Chad Rosier2013-11-131-9/+9
| | | | | | | A number of non-overloaded intrinsics have been replaced by thier overloaded counterparts. llvm-svn: 194599
OpenPOWER on IntegriCloud