summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* clang-format: Don't add spaces in foreach macro definition.Daniel Jasper2015-06-112-1/+16
| | | | | | | | | | | | Before clang-format would e.g. add a space into #define Q_FOREACH(x, y) which turns this into a non-function-like macro. Patch by Strager Neds, thank you! llvm-svn: 239513
* Reinstate r239499 and r239503David Majnemer2015-06-113-26/+39
| | | | | | | They were reverted because the FileCheck patterns didn't match on release builds. llvm-svn: 239512
* Revert "[MS ABI] Allow fastcall member function pointers to get CodeGen'd"Manuel Klimek2015-06-113-39/+26
| | | | | | | | | | | | Revert "[MS ABI] Allow memfn pointers with unconvertible types to be formed" This reverts r239499 and r239503; the former breaks tests [1] and the latter is based on the former. [1] http://lab.llvm.org:8080/green/job/clang-stage2-configure-Rlto_check/4473/testReport/Clang/CodeGenCXX/microsoft_abi_virtual_member_pointers_cpp/ llvm-svn: 239511
* [LiveVariables] Improve isLiveOut runtime performances. NFC.Arnaud A. de Grandmaison2015-06-111-31/+8
| | | | | | | | | | | | On large goto table based interpreters, where phi nodes can have (very) large fan-ins, isLiveOut exhibited poor performances: about 40% of the full codegen time was spent in PHIElim, sorting MachineBasicBlock addresses. This patch improve the performances for such cases, and does not show compile time regressions on the LNT, at bootstrap (llvm+clang+lldb) or any other benchmarks we have in-house. llvm-svn: 239510
* [X86][SSE] Vectorized i8 and i16 shift operatorsSimon Pilgrim2015-06-118-1381/+706
| | | | | | | | | | | | | | | | This patch ensures that SHL/SRL/SRA shifts for i8 and i16 vectors avoid scalarization. It builds on the existing i8 SHL vectorized implementation of moving the shift bits up to the sign bit position and separating the 4, 2 & 1 bit shifts with several improvements: 1 - SSE41 targets can use (v)pblendvb directly with the sign bit instead of performing a comparison to feed into a VSELECT node. 2 - pre-SSE41 targets were masking + comparing with an 0x80 constant - we avoid this by using the fact that a set sign bit means a negative integer which can be compared against zero to then feed into VSELECT, avoiding the need for a constant mask (zero generation is much cheaper). 3 - SRA i8 needs to be unpacked to the upper byte of a i16 so that the i16 psraw instruction can be correctly used for sign extension - we have to do more work than for SHL/SRL but perf tests indicate that this is still beneficial. The i16 implementation is similar but simpler than for i8 - we have to do 8, 4, 2 & 1 bit shifts but less shift masking is involved. SSE41 use of (v)pblendvb requires that the i16 shift amount is splatted to both bytes however. Tested on SSE2, SSE41 and AVX machines. Differential Revision: http://reviews.llvm.org/D9474 llvm-svn: 239509
* [PHIElim] Use ranges and const-ify, NFC.Arnaud A. de Grandmaison2015-06-111-12/+11
| | | | llvm-svn: 239508
* Clang support for vector quad bit permute and gather instructions through ↵Nemanja Ivanovic2015-06-113-0/+49
| | | | | | | | | | | | | builtins This patch corresponds to review: http://reviews.llvm.org/D10095 This is for just two instructions and related builtins: vbpermq vgbbd llvm-svn: 239506
* LLVM support for vector quad bit permute and gather instructions through ↵Nemanja Ivanovic2015-06-115-1/+111
| | | | | | | | | | | | | | builtins This patch corresponds to review: http://reviews.llvm.org/D10096 This is the back end portion of the patch related to D10095. The patch adds the instructions and back end intrinsics for: vbpermq vgbbd llvm-svn: 239505
* [modules] Fix a few places where merging wasn't performed if modules was ↵Richard Smith2015-06-116-4/+30
| | | | | | disabled but local module visibilty was enabled. llvm-svn: 239504
* [MS Compatibility] Handle cleanups we create for a ctor closureDavid Majnemer2015-06-112-0/+17
| | | | | | This fixes PR23801. llvm-svn: 239503
* Revert "Move dllimport name mangling to IR mangler."Reid Kleckner2015-06-117-25/+32
| | | | | | | | | This reverts commit r239437. This broke clang-cl self-hosts. We'd end up calling the __imp_ symbol directly instead of using it to do an indirect function call. llvm-svn: 239502
* Remove MachineModuleInfo::UsedFunctions as it has no users.Pete Cooper2015-06-114-35/+0
| | | | | | | | | | It hasn't been used since r130964. This also removes MachineModuleInfo::isUsedFunction and MachineModuleInfo::AnalyzeModule, both of which were only there to support UsedFunctions. llvm-svn: 239501
* [MS ABI] Allow fastcall member function pointers to get CodeGen'dDavid Majnemer2015-06-112-19/+18
| | | | | | | This restriction appears unnecessary and most likely came about during early work for musttail. llvm-svn: 239500
* [MS ABI] Allow memfn pointers with unconvertible types to be formedDavid Majnemer2015-06-112-8/+22
| | | | | | | | Remove the restriction which forbade forming pointers to member functions which had parameter types or return types which were not convertible. llvm-svn: 239499
* [CMake] Cleanup add_compiler_rt_object_library to be platform-agnosticChris Bieneman2015-06-108-130/+131
| | | | | | | | | | | | | | | | | Summary: This change takes darwin-specific goop that was scattered around CMakeLists files and spread between add_compiler_rt_object_library and add_compiler_rt_darwin_object_library and moves it all under add_compiler_rt_object_library. The goal of this is to try to push platform handling as low in the utility functions as possible. Reviewers: rnk, samsonov Reviewed By: rnk, samsonov Subscribers: rnk, rsmith, llvm-commits Differential Revision: http://reviews.llvm.org/D10250 llvm-svn: 239498
* change assert that will never fire to llvm_unreachableSanjay Patel2015-06-101-1/+1
| | | | llvm-svn: 239497
* [bpf] add support for BPF backendAlexei Starovoitov2015-06-103-0/+68
| | | | | | add support for bpfel/bpfeb targets llvm-svn: 239496
* [NFC] added a missing spaceJingyue Wu2015-06-101-1/+1
| | | | llvm-svn: 239495
* Work around MSVC miscompilation.Richard Smith2015-06-101-3/+2
| | | | llvm-svn: 239494
* Stop returning a Use* from allocHungOffUses.Pete Cooper2015-06-104-22/+21
| | | | | | | | | This always just set the User::OperandList which is now set in that method instead of being returned. Reviewed by Duncan Exon Smith. llvm-svn: 239493
* Add User::growHungoffUses and use it to grow the hung off uses. NFC.Pete Cooper2015-06-103-30/+36
| | | | | | | | | | | | | PhiNode, SwitchInst, LandingPad and IndirectBr all had virtually identical logic for growing the hung off uses. Move it to User so that they can all call a single shared implementation. Their destructors were all empty after this change and were deleted. They all have virtual clone_impl methods which can be used as vtable anchors. Reviewed by Duncan Exon Smith. llvm-svn: 239492
* Delete User::dropHungOffUses and move it in to ~User which is the only ↵Pete Cooper2015-06-103-28/+9
| | | | | | | | | | | caller. NFC. Now that the subclasses which care about hung off uses let ~User clean it up, there's no need for a separate method. Just inline it to ~User and delete it. Reviewed by Duncan Exon Smith. llvm-svn: 239491
* Make User track whether a class has 'hung off uses' and delete them in its ↵Pete Cooper2015-06-104-5/+11
| | | | | | | | | | | | | | | | | | | | | destructor. Currently all of the logic for deleting hung off uses, which PHI/switch/etc use, is in their classes. This adds a bit to Value which tracks whether that user had hung off uses, then User can be responsible for clearing them instead of the sub classes. Note, the bit used here was taken from NumOperands which was 30-bits. Given the reduction to 29 bits, and the average User being just over 100 bytes, a single User with 29-bits of num operands would need 50GB of RAM for itself so its reasonable to assume that 29-bits is enough for now. This is a step towards hiding all the hung off uses logic in the User. Reviewed by Duncan Exon Smith. llvm-svn: 239490
* Move the special Phi logic for hung off uses in to User::allocHungOffUses. NFC.Pete Cooper2015-06-104-15/+13
| | | | | | | | | | | | PhiNode's need to allocate space for an array of Use[N] and then BasicBlock*[N]. They had their own allocHungOffUses to handle all of this. This moves the logic in to User::allocHungOffUses and PhiNode passes in a bool to say to allocate the BB* space too. Reviewed by Duncan Exon Smith. llvm-svn: 239489
* ArgumentPromotion: Drop sret attribute on functions that are only called ↵Peter Collingbourne2015-06-103-3/+47
| | | | | | | | | | | | | | | | | | | directly. If the first argument to a function is a 'this' argument and the second has the sret attribute, the ArgumentPromotion pass may promote the 'this' argument to more than one argument, violating the IR constraint that 'sret' may only be applied to the first or second argument. Although this IR constraint is arguably unnecessary, it highlighted the fact that ArgPromotion does not need to preserve this attribute. Dropping the attribute reduces register pressure in the backend by avoiding the register copy required by sret. Because sret implies noalias, we also replace the former with the latter. Differential Revision: http://reviews.llvm.org/D10353 llvm-svn: 239488
* [modules] Don't allow use of non-visible (inherited) default template arguments.Richard Smith2015-06-103-8/+12
| | | | llvm-svn: 239487
* [x86] Add a reassociation optimization to increase ILP via the ↵Sanjay Patel2015-06-104-0/+321
| | | | | | | | | | | | | | | | | | MachineCombiner pass This is a reimplementation of D9780 at the machine instruction level rather than the DAG. Use the MachineCombiner pass to reassociate scalar single-precision AVX additions (just a starting point; see the TODO comments) to increase ILP when it's safe to do so. The code is closely based on the existing MachineCombiner optimization that is implemented for AArch64. This patch should not cause the kind of spilling tragedy that led to the reversion of r236031. Differential Revision: http://reviews.llvm.org/D10321 llvm-svn: 239486
* [modules] Track all default template arguments for a given parameter acrossRichard Smith2015-06-1011-30/+97
| | | | | | | modules, and allow use of a default template argument if any of the parameters providing it is visible. llvm-svn: 239485
* punctuation policing; NFCSanjay Patel2015-06-101-5/+5
| | | | llvm-svn: 239484
* Do not parse members of incomplete class.Serge Pavlov2015-06-102-2/+16
| | | | | | | | | | If definition of a class is unknown and out-of-line definition of its member is encountered, do not parse the member declaration. This change fixes PR18542. Differential Revision: http://reviews.llvm.org/D8010 llvm-svn: 239483
* [WinEH] _except_handlerN uses 0 instead of 1 to indicate catch-allReid Kleckner2015-06-103-9/+7
| | | | | | Our usage of 1 was a holdover from __C_specific_handler. llvm-svn: 239482
* Pass down the -flto option to the -cc1 job, and from there into theTeresa Johnson2015-06-106-1/+20
| | | | | | | | | | | | CodeGenOptions and onto the PassManagerBuilder. This enables gating the new EliminateAvailableExternally module pass on whether we are preparing for LTO. If we are preparing for LTO (e.g. a -flto -c compile), the new pass is not included as we want to preserve available externally functions for possible link time inlining. llvm-svn: 239481
* Add new EliminateAvailableExternally module pass, which is performed inTeresa Johnson2015-06-106-0/+117
| | | | | | | | | | | | | | | | O2 compiles just before GlobalDCE, unless we are preparing for LTO. This pass eliminates available externally globals (turning them into declarations), regardless of whether they are dead/unreferenced, since we are guaranteed to have a copy available elsewhere at link time. This enables additional opportunities for GlobalDCE. If we are preparing for LTO (e.g. a -flto -c compile), the pass is not included as we want to preserve available externally functions for possible link time inlining. The FE indicates whether we are doing an -flto compile via the new PrepareForLTO flag on the PassManagerBuilder. llvm-svn: 239480
* [GVN] Set proper debug locations for some instructions created by GVN.Alexey Samsonov2015-06-103-15/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Determining proper debug locations for instructions created in PHITransAddr is tricky. We use a simple approach here and simply copy debug locations from instructions computing load address to "corresponding" instructions re-creating the address computation in predecessor basic blocks. This may not always be correct, given all the rearrangement and simplification going on, and debug locations may jump around a lot, as the basic blocks we copy locations between may be very far from each other. Still, this would work good in most simple cases (e.g. when chain of address computing instruction is short, or our mapping turns out to be 1-to-1), and we desire to have *some* reasonable debug locations associated with newly inserted instructions. See http://reviews.llvm.org/D10351 review thread for more details. Test Plan: regression test suite Reviewers: spatel, dblaikie Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10351 llvm-svn: 239479
* fix typo in comment; NFCSanjay Patel2015-06-101-1/+1
| | | | llvm-svn: 239478
* [Hexagon] Adding decoders for signed operands and ensuring all signed ↵Colin LeMahieu2015-06-106-332/+461
| | | | | | operand types disassemble correctly. llvm-svn: 239477
* some StmtExprs do not have side-effectsScott Douglass2015-06-103-1/+39
| | | | | | Differential Revision: http://reviews.llvm.org/D10211 llvm-svn: 239476
* [Hexagon] Make global arrays 'static const'. NFC.Benjamin Kramer2015-06-101-33/+33
| | | | llvm-svn: 239475
* add ConstEvaluatedExprVisitorScott Douglass2015-06-106-54/+76
| | | | | | Differential Revision: http://reviews.llvm.org/D10210 llvm-svn: 239474
* [Statepoints] Add test case to check that statepoint is marked with ↵Igor Laevsky2015-06-101-0/+24
| | | | | | | | Throwable attribute. Differential Revision: http://reviews.llvm.org/D10215 llvm-svn: 239473
* [StatepointLowering] Reuse stack slots across basic blocksIgor Laevsky2015-06-102-67/+160
| | | | | | | | | | | During statepoint lowering we can sometimes avoid spilling of the value if we know that it was already spilled for previous statepoint. We were doing this by checking if incoming statepoint value was lowered into load from stack slot. This was working only in boundaries of one basic block. But instead of looking at the lowered node we can look directly at the llvm-ir value and if it was gc.relocate (or some simple modification of it) look up stack slot for it's derived pointer and reuse stack slot from it. This allows us to look across basic block boundaries. Differential Revision: http://reviews.llvm.org/D10251 llvm-svn: 239472
* Replace string GNU Triples with llvm::Triple in MCSubtargetInfo and ↵Daniel Sanders2015-06-1064-165/+153
| | | | | | | | | | | | | | | | | | create*MCSubtargetInfo(). NFC. Summary: This continues the patch series to eliminate StringRef forms of GNU triples from the internals of LLVM that began in r239036. Reviewers: rafael Reviewed By: rafael Subscribers: rafael, ted, jfb, llvm-commits, rengolin, jholewinski Differential Revision: http://reviews.llvm.org/D10311 llvm-svn: 239467
* PR5172: Fix for a bug in pragma redefine_extname implementation:Alexander Musman2015-06-102-9/+33
| | | | | | | | | | | it doesn't work correctly when a structure is declared before pragma and then a function with the same name declared after pragma. Patch by Andrey Bokhanko Differential Revision: http://reviews.llvm.org/D10187 llvm-svn: 239466
* Replace string GNU Triples with llvm::Triple in create*MCRelocationInfo(). NFC.Daniel Sanders2015-06-104-10/+9
| | | | | | | | | | | | | | | | Summary: This continues the patch series to eliminate StringRef forms of GNU triples from the internals of LLVM that began in r239036. Reviewers: rafael Reviewed By: rafael Subscribers: rafael, llvm-commits, rengolin Differential Revision: http://reviews.llvm.org/D10307 llvm-svn: 239465
* Replace string GNU Triples with llvm::Triple in MCAsmBackend subclasses and ↵Daniel Sanders2015-06-1025-104/+101
| | | | | | | | | | | | | | | | | | create*AsmBackend(). NFC. Summary: This continues the patch series to eliminate StringRef forms of GNU triples from the internals of LLVM that began in r239036. Reviewers: echristo, rafael Reviewed By: rafael Subscribers: rafael, llvm-commits, rengolin Differential Revision: http://reviews.llvm.org/D10243 llvm-svn: 239464
* [LLDB][MIPS] Getting correct signals for MIPS HostMohit K. Bhakkad2015-06-101-3/+16
| | | | | | | | | | Patch by Nitesh Jain Reviewers: clayborg, ovyalov. Subscribers: jaydeep, bhushan, dsanders, mohit.bhakkad, sagar, labath, lldb-commits. Differential Revision: http://reviews.llvm.org/D10180 llvm-svn: 239463
* clang-format: [JS] Only special case top level object literalDaniel Jasper2015-06-102-3/+8
| | | | | | | | | | | | | | | | | | | | | | assignments as enums. Top level object literals are treated as enums, and their k/v pairs are put on separate lines: X.Y = { A: 1, B: 2 }; However assignments within blocks should not be affected: function x() { y = {a:1, b:2}; } This change fixes the second case. Patch by Martin Probst. llvm-svn: 239462
* [ASan] Quick-fix tests for new string interceptors.Yury Gribov2015-06-108-17/+17
| | | | | | | | Patch by Maria Guseva. Differential Revision: http://reviews.llvm.org/D10336 llvm-svn: 239461
* AVX-512: Fixed a bug in comparison of i1 vectors.Elena Demikhovsky2015-06-103-9/+9
| | | | | | | | | cmp eq should give kxnor instruction cmp neq should give kxor https://llvm.org/bugs/show_bug.cgi?id=23631 llvm-svn: 239460
* Replace magic number 19 with the constant GlobalValueSubClassDataBits.Yaron Keren2015-06-101-3/+3
| | | | llvm-svn: 239459
OpenPOWER on IntegriCloud