summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
...
* [ARM] Add support for armv7ve triple in llvm (PR31358).George Burgess IV2017-02-099-30/+69
| | | | | | | | | | | | | | | Gcc supports target armv7ve which is armv7-a with virtualization extensions. This change adds support for this in llvm for gcc compatibility. Also remove redundant FeatureHWDiv, FeatureHWDivARM for a few models as this is specified automatically by FeatureVirtualization. Patch by Manoj Gupta. Differential Revision: https://reviews.llvm.org/D29472 llvm-svn: 294661
* [PM/LCG] Teach the LazyCallGraph how to replace a function withoutChandler Carruth2017-02-095-479/+622
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | disturbing the graph or having to update edges. This is motivated by porting argument promotion to the new pass manager. Because of how LLVM IR Function objects work, in order to change their signature a new object needs to be created. This is efficient and straight forward in the IR but previously was very hard to implement in LCG. We could easily replace the function a node in the graph represents. The challenging part is how to handle updating the edges in the graph. LCG previously used an edge to a raw function to represent a node that had not yet been scanned for calls and references. This was the core of its laziness. However, that model causes this kind of update to be very hard: 1) The keys to lookup an edge need to be `Function*`s that would all need to be updated when we update the node. 2) There will be some unknown number of edges that haven't transitioned from `Function*` edges to `Node*` edges. All of this complexity isn't necessary. Instead, we can always build a node around any function, always pointing edges at it and always using it as the key to lookup an edge. To maintain the laziness, we need to sink the *edges* of a node into a secondary object and explicitly model transitioning a node from empty to populated by scanning the function. This design seems much cleaner in a number of ways, but importantly there is now exactly *one* place where the `Function*` has to be updated! Some other cleanups that fall out of this include having something to model the *entry* edges more accurately. Rather than hand rolling parts of the node in the graph itself, we have an explicit `EdgeSequence` object that gives us exactly the functionality needed. We also have a consistent place to define the edge iterators and can use them for both the entry edges and the internal edges of the graph. The API used to model the separation between a node and its edges is intentionally very thin as most clients are expected to deal with nodes that have populated edges. We model this exactly as an optional does with an additional method to populate the edges when that is a reasonable thing for a client to do. This is based on API design suggestions from Richard Smith and David Blaikie, credit goes to them for helping pick how to model this without it being either too explicit or too implicit. The patch is somewhat noisy due to shifting around iterator types and new syntax for walking the edges of a node, but most of the functionality change is in the `Edge`, `EdgeSequence`, and `Node` types. Differential Revision: https://reviews.llvm.org/D29577 llvm-svn: 294653
* [WebAssembly] Refactor void return peephole using MaybeRewriteToFallthrough. ↵Dan Gohman2017-02-091-13/+15
| | | | | | NFC. llvm-svn: 294652
* [InstCombine] allow (X * C2) << C1 --> X * (C2 << C1) for vectorsSanjay Patel2017-02-092-13/+26
| | | | | | | | | | This fold already existed for vectors but only when 'C1' was a splat constant (but 'C2' could be any constant). There were no tests for any vector constants, so I'm adding a test that shows non-splat constants for both operands. llvm-svn: 294650
* De-duplicate some code for creating an AARGetter suitable for the legacy PM.Peter Collingbourne2017-02-094-35/+22
| | | | | | | | I'm about to use this in a couple more places. Differential Revision: https://reviews.llvm.org/D29793 llvm-svn: 294648
* Don't try to link to the 4.0 release notesHans Wennborg2017-02-091-3/+3
| | | | llvm-svn: 294647
* lit.rst: Fix sphinx complaint about multiple option definitionsMatthias Braun2017-02-091-1/+1
| | | | llvm-svn: 294646
* [docs] Fix typoJonathan Roelofs2017-02-091-2/+2
| | | | llvm-svn: 294645
* Fix build break from r294633.Adrian McCarthy2017-02-092-6/+3
| | | | llvm-svn: 294642
* [X86] Remove duplicate call to getValueType. NFCI.Simon Pilgrim2017-02-091-4/+3
| | | | llvm-svn: 294640
* X86: Introduce relocImm-based patterns for cmp.Peter Collingbourne2017-02-094-0/+86
| | | | | | Differential Revision: https://reviews.llvm.org/D28690 llvm-svn: 294636
* AMDGPU: Add pass to expand memcpy/memmove/memsetMatt Arsenault2017-02-096-4/+253
| | | | llvm-svn: 294635
* X86: Teach X86InstrInfo::analyzeCompare to recognize compares of symbols.Peter Collingbourne2017-02-092-18/+23
| | | | | | | | | | | | | | | This requires that we communicate to X86InstrInfo::optimizeCompareInstr that the second operand is neither a register nor an immediate. The way we do that is by setting CmpMask to zero. Note that there were already instructions where the second operand was not a register nor an immediate, namely X86::SUB*rm, so also set CmpMask to zero for those instructions. This seems like a latent bug, but I was unable to trigger it. Differential Revision: https://reviews.llvm.org/D28621 llvm-svn: 294634
* Introduce NativeRawSymbol for PDB reading.Adrian McCarthy2017-02-093-0/+908
| | | | | | | | | | This is a stub for a new concrete implementation of IPDBRawSymbol. Nothing uses this uses this implementation yet. My plan is to locally switch lldb-pdbdump from the DIA reader to the Native one and flesh out the implementations of these method stubs in the order they're needed. llvm-svn: 294633
* [LoadCombine] Fix combining of loads which span an aliasing store.Michael J. Spencer2017-02-092-1/+26
| | | | | | | | Fixes PR31517 Differential Revision: https://reviews.llvm.org/D28922 llvm-svn: 294632
* Rename LowerTypeTestsSummaryAction to PassSummaryAction. NFCI.Peter Collingbourne2017-02-094-29/+26
| | | | | | | | | I intend to use the same type with the same semantics in the WholeProgramDevirt pass. Differential Revision: https://reviews.llvm.org/D29746 llvm-svn: 294629
* [InstCombine] use m_APInt to allow demanded bits analysis on splat constantsSanjay Patel2017-02-093-14/+16
| | | | llvm-svn: 294628
* [AMDGPU] Calculate number of min/max SGPRs/VGPRs for WavesPerEU instead of ↵Konstantin Zhuravlyov2017-02-093-71/+34
| | | | | | | | using switch statement Differential Revision: https://reviews.llvm.org/D29741 llvm-svn: 294627
* [InstCombine] add test for demanded bits with splat vector constants; NFCSanjay Patel2017-02-091-0/+13
| | | | llvm-svn: 294625
* CODE_OWNERS: Update email addressTom Stellard2017-02-091-3/+2
| | | | | | Also clean up description. llvm-svn: 294624
* Drop graph_ prefixDaniel Berlin2017-02-099-16/+16
| | | | llvm-svn: 294621
* GraphTraits: Add range versions of graph traits functions (graph_nodes, ↵Daniel Berlin2017-02-099-60/+57
| | | | | | | | | | | | | | | | | | | | | | | | | graph_children, inverse_graph_nodes, inverse_graph_children). Summary: Convert all obvious node_begin/node_end and child_begin/child_end pairs to range based for. Sending for review in case someone has a good idea how to make graph_children able to be inferred. It looks like it would require changing GraphTraits to be two argument or something. I presume inference does not happen because it would have to check every GraphTraits in the world to see if the noderef types matched. Note: This change was 3-staged with clang as well, which uses Dominators/etc from LLVM. Reviewers: chandlerc, tstellarAMD, dblaikie, rsmith Subscribers: arsenm, llvm-commits, nhaehnle Differential Revision: https://reviews.llvm.org/D29767 llvm-svn: 294620
* test: adjust the test for the BSD formatSaleem Abdulrasool2017-02-091-3/+8
| | | | | | | The padding for ld64 changes the header to include the padding. Adjust the test to account for this. llvm-svn: 294619
* [dsymutil] Fix handling of empty CUs in LTO links.Frederic Riss2017-02-092-14/+53
| | | | | | | | | r288399 introduced the DIEUnit class, and in the process broke the corner case where dsymutil generates an empty CU during an LTO link. This restores the logic and adds a test for the corner case. llvm-svn: 294618
* [JumpThreading] Thread through guardsSanjoy Das2017-02-096-15/+383
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch allows JumpThreading also thread through guards. Virtually, guard(cond) is equivalent to the following construction: if (cond) { do something } else {deoptimize} Yet it is not explicitly converted into IFs before lowering. This patch enables early threading through guards in simple cases. Currently it covers the following situation: if (cond1) { // code A } else { // code B } // code C guard(cond2) // code D If there is implication cond1 => cond2 or !cond1 => cond2, we can transform this construction into the following: if (cond1) { // code A // code C } else { // code B // code C guard(cond2) } // code D Thus, removing the guard from one of execution branches. Patch by Max Kazantsev! Reviewers: reames, apilipenko, igor-laevsky, anna, sanjoy Reviewed By: sanjoy Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D29620 llvm-svn: 294617
* [utils] coverage: Add help text about the --restrict flag (NFC)Vedant Kumar2017-02-091-1/+5
| | | | | | | | | | Passing the --restrict flag to the coverage prep script before other positional arguments is wrong, because it prevents the argparse module from telling apart arguments to --restrict versus positional arguments. Pointed out by Sean Callanan! llvm-svn: 294616
* Object: pad out BSD archive members to 8-bytesSaleem Abdulrasool2017-02-092-5/+17
| | | | | | | | | | | | | ld64 requires its archive members to be 8-byte aligned for 64-bit content and 4-byte aligned for 32-bit content. Opt for the larger alignment requirement. This ensures that ld64 can consume archives generated by llvm-ar. Thanks to Kevin Enderby for the hint about the ld64/cctools behaviours! Resolves PR28361! llvm-svn: 294615
* Convert to for-range loop. NFCI.Simon Pilgrim2017-02-091-3/+3
| | | | llvm-svn: 294610
* [SelectionDAG] Fix bugs in inverted condition splitting code.Geoff Berry2017-02-092-8/+72
| | | | | | | | | | | | | | | | | | Summary: Fix two bugs in SelectionDAGBuilder::FindMergedConditions reported by Mikael Holmen. Handle non-canonicalized xor not operation correctly (was assuming operand 0 was always the non-constant operand) and check that the negated condition is also in the same block as the original and/or instruction (as is done for and/or operands already) before proceeding with optimization. Reviewers: bogner, MatzeB, qcolombet Subscribers: mcrosier, uabelho, llvm-commits Differential Revision: https://reviews.llvm.org/D29680 llvm-svn: 294605
* [CMake] Fix standalone project builds broken in r294514Chris Bieneman2017-02-091-0/+1
| | | | | | This patch sets the global property indicating that target registration is complete for standalone sub-project builds. llvm-svn: 294602
* [InstCombine] add tests for icmp with add nsw; NFCSanjay Patel2017-02-091-0/+123
| | | | llvm-svn: 294601
* Tweak the implementation of llvm-objdump’s -objc-meta-data option soKevin Enderby2017-02-093-63/+153
| | | | | | | | | that it works when the ObjC metadata sections end up in the __DATA_CONST or __DATA_DIRTY segments. rdar://26315238 llvm-svn: 294599
* [X86][BMI2] Regenerate mulx testsSimon Pilgrim2017-02-092-14/+27
| | | | llvm-svn: 294598
* [X86][MMX] Remove the (long time) unused MMX_PINSRW ISD opcode.Simon Pilgrim2017-02-092-2/+1
| | | | llvm-svn: 294596
* [docs] Documentation update for ScudoKostya Kortchinsky2017-02-091-41/+44
| | | | | | | | | | | | | | | | Summary: Documentation update to reflect the changes that occured in the allocator: - additional architectures support; - modification of the header; - options default values for 32 & 64-bit. Reviewers: kcc, alekseyshl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D29592 llvm-svn: 294595
* Object: add a comment explaining a divergenceSaleem Abdulrasool2017-02-091-0/+2
| | | | | | | Add a note about the reason for the divergence from the specification for ld64. Addresses post-commit review comments from Davide. NFC. llvm-svn: 294594
* Revert: "[Stack Protection] Add diagnostic information for why stack ↵David Bozier2017-02-094-160/+1
| | | | | | | | protection was applied to a function" this reverts revision r294590 as it broke some buildbots. llvm-svn: 294593
* Add DAGCombiner load combine tests for partially available valuesArtur Pilipenko2017-02-095-2/+817
| | | | | | If some of the trailing or leading bytes of a load combine pattern are zeroes we can combine the pattern to a load + zext and shift. Currently we don't support it, so the tests check the current codegen without load combine. This change will make the patch to support this kind of combine a bit more clear. llvm-svn: 294591
* [Stack Protection] Add diagnostic information for why stack protection was ↵David Bozier2017-02-094-1/+160
| | | | | | | | | | | | | | applied to a function Stack Smash Protection is not completely free, so in hot code, the overhead it causes can cause performance issues. By adding diagnostic information for which function have SSP and why, a user can quickly determine what they can do to stop SSP being applied to a specific hot function. This change adds an SSP-specific DiagnosticInfo class and uses of it to the Stack Protection code. A subsequent change to clang will cause the remarks to be emitted when enabled. Patch by: James Henderson Differential Revision: https://reviews.llvm.org/D29023 llvm-svn: 294590
* Make it possible to set SHF_LINK_ORDER explicitly.Rafael Espindola2017-02-0910-7/+144
| | | | | | | This will make it possible to add support for gcing user metadata (asan for example). llvm-svn: 294589
* [X86][btver2] PR31902: Fix a crash in combineOrCmpEqZeroToCtlzSrl under fast ↵Pierre Gousseau2017-02-092-1/+32
| | | | | | | | | | math. In combineOrCmpEqZeroToCtlzSrl, replace "getConstantOperand == 0" by "isNullConstant" to account for floating point constants. Differential Revision: https://reviews.llvm.org/D29756 llvm-svn: 294588
* [X86][SSE] Added extra FMA/NO-FMA reciprocal test cases for D26855Simon Pilgrim2017-02-092-12/+338
| | | | | | Test for expected codegen for nr reciprocal cases with/without FMA llvm-svn: 294587
* [docs] cleanup documentation on lit substitutionsDavid Bozier2017-02-092-9/+24
| | | | | | | | | | | 1. Added missing substitutions to the documentation in docs/TestingGuide.rst 2. Modified docs/CommandGuide/lit.rst to only document the "base" set of substitutions and to refer the reader to docs/TestingGuide.rst for more detailed info on substitutions. Patch by bd1976llvm Differential Revision: https://reviews.llvm.org/D29281 llvm-svn: 294586
* [ARM] GlobalISel: Lower single precision FP argsDiana Picus2017-02-093-4/+79
| | | | | | | Both for aapcscc and aapcs_vfpcc. We currently filter out soft float targets because we don't support libcalls yet. llvm-svn: 294584
* [DAGCombiner] Support non-zero offset in load combineArtur Pilipenko2017-02-096-312/+104
| | | | | | | | | | | | | | | Enable folding patterns which load the value from non-zero offset: i8 *a = ... i32 val = a[4] | (a[5] << 8) | (a[6] << 16) | (a[7] << 24) => i32 val = *((i32*)(a+4)) Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D29394 llvm-svn: 294582
* [X86][SSE] Attempt to break register dependencies during lowerBuildVectorSimon Pilgrim2017-02-0912-81/+110
| | | | | | | | | | | | LowerBuildVectorv16i8/LowerBuildVectorv8i16 insert values into a UNDEF vector if the build vector doesn't contain any zero elements, resulting in register dependencies with a previous use of the register. This patch attempts to break the register dependency by either always zeroing the vector before hand or (if we're inserting to the 0'th element) by using VZEXT_MOVL(SCALAR_TO_VECTOR(i32 AEXT(Elt))) which lowers to (V)MOVD and performs a similar function. Additionally (V)MOVD is a shorter instruction than PINSRB/PINSRW. We already do something similar for SSE41 PINSRD. On pre-SSE41 LowerBuildVectorv16i8 we go a little further and use VZEXT_MOVL(SCALAR_TO_VECTOR(i32 ZEXT(Elt))) if the build vector contains zeros to avoid the vector zeroing at the cost of a scalar zero extension, which can probably be brought over to the other cases in a future patch in some cases (load folding etc.) Differential Revision: https://reviews.llvm.org/D29720 llvm-svn: 294581
* LVI: Fix use-of-uninitialized-value after r294463Vitaly Buka2017-02-091-1/+1
| | | | | | BlockValueStack can be reallocated making reference e invalid. llvm-svn: 294572
* Add new tests for EXTRACT_VECTOR_ELT (vector of packed i8/16/i32/i64/ps/pd data)Igor Breger2017-02-091-1/+427
| | | | llvm-svn: 294565
* [X86] Remove the HLE feature flag.Craig Topper2017-02-096-16/+5
| | | | | | We only implemented it for one of the 3 HLE instructions and that instruction is also under the RTM flag. Clang only implements the RTM flag from its command line. llvm-svn: 294562
* [X86] Remove INVPCID and SMAP feature flags. They aren't currently used by ↵Craig Topper2017-02-093-16/+1
| | | | | | | | any instructions and not tested. If we implement intrinsics for their instructions in the future, the feature flags can be added back with proper testing. llvm-svn: 294561
OpenPOWER on IntegriCloud