summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* GlobalISel: rework getOrCreateVReg to avoid double lookup. NFC.Tim Northover2017-01-251-20/+20
| | | | | | Thanks to Quentin for suggesting the refactoring. llvm-svn: 293087
* DebugInfo: remove unused parameter from function. NFC.Tim Northover2017-01-252-4/+2
| | | | | | | I think it's a hold-over from some previous iteration, but it's never set to true in LLVM as it exists now. llvm-svn: 293086
* MemorySSA: Link all defs together into an intrusive defslist, to make ↵Daniel Berlin2017-01-253-44/+212
| | | | | | | | | | | | | | | | | | | | | | | updater easier Summary: This is the first in a series of patches to add a simple, generalized updater to MemorySSA. For MemorySSA, every def is may-def, instead of the normal must-def. (the best way to think of memoryssa is "everything is really one variable, with different versions of that variable at different points in the program). This means when updating, we end up having to do a bunch of work to touch defs below and above us. In order to support this quickly, i have ilist'd all the defs for each block. ilist supports tags, so this is quite easy. the only slightly messy part is that you can't have two iplists for the same type that differ only whether they have the ownership part enabled or not, because the traits are for the value type. The verifiers have been updated to test that the def order is correct. Reviewers: george.burgess.iv Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D29046 llvm-svn: 293085
* Make this test more strict.Rafael Espindola2017-01-251-6/+27
| | | | | | While at it, also remove unused command line options. llvm-svn: 293084
* [AMDGPU] Bump up n_type for metadata v2Konstantin Zhuravlyov2017-01-252-2/+5
| | | | | | Differential Revision: https://reviews.llvm.org/D29115 llvm-svn: 293083
* [XRay][AArch64] More staging for tail call support in XRay AArch64 - in ↵Serge Rogatch2017-01-252-3/+52
| | | | | | | | | | | | | | | | | | compiler-rt Summary: This patch provides a trampoline for function tail exit tracing. Still, it's staging because code `1` is passed to the handler function (indicating a normal exit) instead of `2`, which would indicate tail exit. This is so until the logging part of XRay supports tail exits too. Related: https://reviews.llvm.org/D28947 (LLVM) Reviewers: dberris, rengolin Reviewed By: rengolin Subscribers: aemerson, llvm-commits, iid_iunknown Differential Revision: https://reviews.llvm.org/D28948 llvm-svn: 293082
* AMDGPU: Set call_convention bit in kernel_code_tMatt Arsenault2017-01-254-2/+9
| | | | | | | According to the documentation this is supposed to be -1 if indirect calls are not supported. llvm-svn: 293081
* [XRay][AArch64] More staging for tail call support in XRay on AArch64 - in LLVMSerge Rogatch2017-01-253-0/+82
| | | | | | | | | | | | | | | | Summary: This patch prepares more for tail call support in XRay. Until the logging part supports tail calls, this is just staging, so it seems LLVM part is mostly ready with this patch. Related: https://reviews.llvm.org/D28948 (compiler-rt) Reviewers: dberris, rengolin Reviewed By: dberris Subscribers: llvm-commits, iid_iunknown, aemerson Differential Revision: https://reviews.llvm.org/D28947 llvm-svn: 293080
* Fixed a typo in the synopsis (noecept -> noexcept). Thanks to Kim for the catchMarshall Clow2017-01-251-1/+1
| | | | llvm-svn: 293079
* [cmake] Fix -rpath-link in stand-alone buildMichal Gorny2017-01-251-0/+1
| | | | | | | | | | | Set LLVM_LIBRARY_OUTPUT_INTDIR as expected by llvm_setup_rpath() macro when doing stand-alone builds. This is required to pass correct -rpath-link when linking shared libraries, and therefore ensure that the linker can find dependency libraries correctly during the build. Differential Revision: https://reviews.llvm.org/D29099 llvm-svn: 293078
* Add iterator_range<regclass_iterator> to {Target,MC}RegisterInfo, NFCKrzysztof Parzyszek2017-01-258-34/+23
| | | | llvm-svn: 293077
* [SLP] Extra test for functionality with extra args.Alexey Bataev2017-01-251-2/+4
| | | | llvm-svn: 293076
* Revert "Do not verify dominator tree if it has no roots"Chad Rosier2017-01-253-9/+1
| | | | | | | This reverts commit r293033, per Danny's comment. In short, we require domtrees to have roots at all times. llvm-svn: 293075
* PowerPC: Slight cleanup of getReservedRegs(); NFCMatthias Braun2017-01-251-19/+10
| | | | | | | | Change getReservedRegs() to not mark a register as reserved and then revert that decision in some cases. Motivated by the discussion in https://reviews.llvm.org/D29056 llvm-svn: 293073
* [libcxx] Mentions "targeting C++11 and above" instead of "targeting C++11" ↵Mehdi Amini2017-01-251-1/+2
| | | | | | in the doc llvm-svn: 293071
* [OpenMP] Support for the proc_bind-clause on 'target parallel' on the NVPTX ↵Arpith Chacko Jacob2017-01-253-0/+123
| | | | | | | | | | | | | | device. This patch adds support for the proc_bind clause on the Spmd construct 'target parallel' on the NVPTX device. Since the parallel region is created upon kernel launch, this clause can be safely ignored on the NVPTX device at codegen time for level 0 parallelism. Reviewers: ABataev Differential Revision: https://reviews.llvm.org/D29128 llvm-svn: 293069
* [scudo] Enabling AArch64 support for ScudoKostya Kortchinsky2017-01-252-2/+2
| | | | | | | | | | | | | | | | | Summary: Adding ARM64 as a supported architecture for Scudo. The random shuffle is not yet supported for SizeClassAllocator32, which is used by the AArch64 allocator, so disable the associated test for now. Reviewers: kcc, alekseyshl, rengolin Reviewed By: rengolin Subscribers: aemerson, mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D28960 llvm-svn: 293068
* Add loop pass insertion point EP_LateLoopOptimizationsKrzysztof Parzyszek2017-01-252-0/+10
| | | | | | Differential Revision: https://reviews.llvm.org/D28694 llvm-svn: 293067
* [powerpc] deactivate ThreadedOneSizeMallocStressTest asan test on powerpc64Bill Seurer2017-01-251-0/+5
| | | | | | | This has not reliably worked on powerpc since r279664. Re-enable this once the problem is tracked down and fixed. llvm-svn: 293066
* Clarify how to forward-declare __llvm_profile symbols.Nico Weber2017-01-251-0/+2
| | | | llvm-svn: 293065
* [Guards] Introduce loop-predication passArtur Pilipenko2017-01-2512-0/+1120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces guard based loop predication optimization. The new LoopPredication pass tries to convert loop variant range checks to loop invariant by widening checks across loop iterations. For example, it will convert for (i = 0; i < n; i++) { guard(i < len); ... } to for (i = 0; i < n; i++) { guard(n - 1 < len); ... } After this transformation the condition of the guard is loop invariant, so loop-unswitch can later unswitch the loop by this condition which basically predicates the loop by the widened condition: if (n - 1 < len) for (i = 0; i < n; i++) { ... } else deoptimize This patch relies on an NFC change to make ScalarEvolution::isMonotonicPredicate public (revision 293062). Reviewed By: sanjoy Differential Revision: https://reviews.llvm.org/D29034 llvm-svn: 293064
* [AArch64] Minor code refactoring. NFC.Chad Rosier2017-01-251-9/+10
| | | | llvm-svn: 293063
* NFC. Make ScalarEvolution::isMonotonicPredicate publicArtur Pilipenko2017-01-251-12/+12
| | | | | | Will be used by the upcoming LoopPredication optimization. llvm-svn: 293062
* [InstCombine] Canonicalize guards for NOT OR conditionArtur Pilipenko2017-01-252-0/+38
| | | | | | | | | | | | This is a partial fix for Bug 31520 - [guards] canonicalize guards in instcombine Reviewed By: apilipenko Differential Revision: https://reviews.llvm.org/D29075 Patch by Maxim Kazantsev. llvm-svn: 293061
* [InstCombine][SSE] Add support for PACKSS/PACKUS constant foldingSimon Pilgrim2017-01-252-38/+112
| | | | | | Differential Revision: https://reviews.llvm.org/D28949 llvm-svn: 293060
* [ARM] GlobalISel: Fix stack-use-after-scope bug.Martin Bohme2017-01-251-1/+1
| | | | | | | | | | | | | | | | | Summary: Lifetime extension wasn't triggered on the result of BuildMI because the reference was non-const. However, instead of adding a const, I've removed the reference entirely as RVO should kick in anyway. Reviewers: rovka, bkramer Reviewed By: bkramer Subscribers: aemerson, rengolin, dberris, llvm-commits, kristof.beyls Differential Revision: https://reviews.llvm.org/D29124 llvm-svn: 293059
* [InstCombine] Canonicalize guards for AND conditionArtur Pilipenko2017-01-252-0/+37
| | | | | | | | | | | | This is a partial fix for Bug 31520 - [guards] canonicalize guards in instcombine Reviewed By: apilipenko Differential Revision: https://reviews.llvm.org/D29074 Patch by Maxim Kazantsev. llvm-svn: 293058
* [compiler-rt] Fix xray compilation errors: errno and size_tKrzysztof Parzyszek2017-01-252-1/+2
| | | | | | | Include errno.h, and use size_t instead of std::size_t, since stddef.h was included (and not cstddef). llvm-svn: 293057
* [InstCombine] Allow InstrCombine to remove one of adjacent guards if they ↵Artur Pilipenko2017-01-252-0/+40
| | | | | | | | | | | | | | are equivalent This is a partial fix for Bug 31520 - [guards] canonicalize guards in instcombine Reviewed By: majnemer, apilipenko Differential Revision: https://reviews.llvm.org/D29071 Patch by Maxim Kazantsev. llvm-svn: 293056
* [clang-format] Implement comment reflowing.Krasimir Georgiev2017-01-2511-294/+1377
| | | | | | | | | | | | | | | | | | Summary: This presents a version of the comment reflowing with less mutable state inside the comment breakable token subclasses. The state has been pushed into the driving breakProtrudingToken method. For this, the API of BreakableToken is enriched by the methods getSplitBefore and getLineLengthAfterSplitBefore. Reviewers: klimek Reviewed By: klimek Subscribers: djasper, klimek, mgorny, cfe-commits, ioeric Differential Revision: https://reviews.llvm.org/D28764 llvm-svn: 293055
* [ELF] - Implemented support for R_386_PC8/R_386_8 relocations.George Rimar2017-01-254-16/+26
| | | | | | | | These relocations are used in linux kernel. Differential revision: https://reviews.llvm.org/D28094 llvm-svn: 293054
* [test] Add HAVE_LIBZ to canonicalized booleansMichal Gorny2017-01-251-1/+2
| | | | | | Canonicalize HAVE_LIBZ as well to fix buildbot failures. llvm-svn: 293053
* [test] Port clang tests to canonicalized booleansMichal Gorny2017-01-258-31/+21
| | | | | | | | | | | Use the new llvm_canonicalize_cmake_booleans() function to canonicalize booleans for lit tests. Replace the duplicate ENABLE_CLANG* variables used to hold canonicalized values with in-place canonicalization. Use implicit logic in Python code to avoid overrelying on exact 0/1 values. Differential Revision: https://reviews.llvm.org/D28529 llvm-svn: 293052
* [Driver] Prevent no-arc-exception-silence.m test from writing output.Martin Bohme2017-01-251-1/+1
| | | | | | | | | | | | Summary: This enables the test to run on systems where output cannot be written. Reviewers: compnerd Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D29123 llvm-svn: 293051
* [OpenCL] Diagnose write_only image3d when extension is disabledAnastasia Stulova2017-01-254-7/+58
| | | | | | | | | | | | | | Prior to OpenCL 2.0, image3d_t can only be used with the write_only access qualifier when the cl_khr_3d_image_writes extension is enabled, see e.g. OpenCL 1.1 s6.8b. Require the extension for write_only image3d_t types and guard uses of write_only image3d_t in the OpenCL header. Patch by Sven van Haastregt! Review: https://reviews.llvm.org/D28860 llvm-svn: 293050
* [OpenMP] Support for thread_limit-clause on the 'target teams' directive.Arpith Chacko Jacob2017-01-259-10/+453
| | | | | | | | | | | The thread_limit-clause on the combined directive applies to the 'teams' region of this construct. We modify the ThreadLimitClause class to capture the clause expression within the 'target' region. Reviewers: ABataev Differential Revision: https://reviews.llvm.org/D29087 llvm-svn: 293049
* [OpenMP] Support for num_teams-clause on the 'target teams' directive.Arpith Chacko Jacob2017-01-259-9/+439
| | | | | | | | | | | The num_teams-clause on the combined directive applies to the 'teams' region of this construct. We modify the NumTeamsClause class to capture the clause expression within the 'target' region. Reviewers: ABataev Differential Revision: https://reviews.llvm.org/D29085 llvm-svn: 293048
* include Host/Time.h in Cocoa.cppPavel Labath2017-01-251-0/+1
| | | | | | | Time.h contains the necessary magic to enable timegm on all android targets. llvm-svn: 293047
* NPL: Compartmentalize arm64 single step workaround betterPavel Labath2017-01-254-133/+106
| | | | | | | | | | | The main motivation for me doing this is being able to build an arm android lldb-server against api level 9 headers, but it seems like a good cleanup nonetheless. The entirety of the cpu_set_t dance now resides in SingleStepCheck.cpp, which is only built on arm64. llvm-svn: 293046
* Replace chdir() usage with the llvm equivalent.Pavel Labath2017-01-254-23/+7
| | | | | | | This removes a hack in PosixApi.h, which tends to produce strange compile errors when it's included in the wrong order. llvm-svn: 293045
* [ELF] Add local mapping symbols to ARM PLT entriesPeter Smith2017-01-2510-51/+152
| | | | | | | | | | | | | Mapping symbols allow a mapping symbol aware disassembler to correctly disassemble the PLT when the code immediately prior to the PLT is Thumb. To implement this we add a function to add symbols with local binding to be defined in SyntheticSymbols. Differential Revision: https://reviews.llvm.org/D28956 llvm-svn: 293044
* [analyzer] Fix MacOSXAPIChecker fp with static locals seen from nested blocks.Artem Dergachev2017-01-255-3/+56
| | | | | | | | | | | | | | This is an attempt to avoid new false positives caused by the reverted r292800, however the scope of the fix is significantly reduced - some variables are still in incorrect memory spaces. Relevant test cases added. rdar://problem/30105546 rdar://problem/30156693 Differential revision: https://reviews.llvm.org/D28946 llvm-svn: 293043
* [SLP] Improve horizontal vectorization for non-power-of-2 number ofAlexey Bataev2017-01-252-100/+76
| | | | | | | | | | | | | instructions. If number of instructions in horizontal reduction list is not power of 2 then only PowerOf2Floor(NumberOfInstructions) last elements are actually vectorized, other instructions remain scalar. Patch tries to vectorize the remaining elements either. Differential Revision: https://reviews.llvm.org/D28959 llvm-svn: 293042
* Mark @llvm.powi.* as safe to speculatively execute.whitequark2017-01-252-1/+8
| | | | | | | | | | | | Floating point intrinsics in LLVM are generally not speculatively executed, since most of them are defined to behave the same as libm functions, which set errno. However, the @llvm.powi.* intrinsics do not correspond to any libm function, and lacks any defined error handling semantics in LangRef. It most certainly does not alter errno. llvm-svn: 293041
* [X86] enable memory interleaving for X86\SLM arch. Mohammed Agabaria2017-01-252-1/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D28547 llvm-svn: 293040
* Fix buildbot failures introduced by 293036Artur Pilipenko2017-01-251-2/+5
| | | | | | Fix unused variable, specify types explicitly to make VC compiler happy. llvm-svn: 293039
* [DAGCombiner] Match load by bytes idiom and fold it into a single load. ↵Artur Pilipenko2017-01-256-0/+1850
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Attempt #2. The previous patch (https://reviews.llvm.org/rL289538) got reverted because of a bug. Chandler also requested some changes to the algorithm. http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20161212/413479.html This is an updated patch. The key difference is that collectBitProviders (renamed to calculateByteProvider) now collects the origin of one byte, not the whole value. It simplifies the implementation and allows to stop the traversal earlier if we know that the result won't be used. From the original commit: Match a pattern where a wide type scalar value is loaded by several narrow loads and combined by shifts and ors. Fold it into a single load or a load and a bswap if the targets supports it. Assuming little endian target: i8 *a = ... i32 val = a[0] | (a[1] << 8) | (a[2] << 16) | (a[3] << 24) => i32 val = *((i32)a) i8 *a = ... i32 val = (a[0] << 24) | (a[1] << 16) | (a[2] << 8) | a[3] => i32 val = BSWAP(*((i32)a)) This optimization was discussed on llvm-dev some time ago in "Load combine pass" thread. We came to the conclusion that we want to do this transformation late in the pipeline because in presence of atomic loads load widening is irreversible transformation and it might hinder other optimizations. Eventually we'd like to support folding patterns like this where the offset has a variable and a constant part: i32 val = a[i] | (a[i + 1] << 8) | (a[i + 2] << 16) | (a[i + 3] << 24) Matching the pattern above is easier at SelectionDAG level since address reassociation has already happened and the fact that the loads are adjacent is clear. Understanding that these loads are adjacent at IR level would have involved looking through geps/zexts/adds while looking at the addresses. The general scheme is to match OR expressions by recursively calculating the origin of individual bytes which constitute the resulting OR value. If all the OR bytes come from memory verify that they are adjacent and match with little or big endian encoding of a wider value. If so and the load of the wider type (and bswap if needed) is allowed by the target generate a load and a bswap if needed. Reviewed By: RKSimon, filcab, chandlerc Differential Revision: https://reviews.llvm.org/D27861 llvm-svn: 293036
* [ARM] GlobalISel: Support i1 add and ABI extensionsDiana Picus2017-01-257-3/+145
| | | | | | | | | | | Add support for: * i1 add * i1 function arguments, if passed through registers * i1 returns, with ABI signext/zeroext Differential Revision: https://reviews.llvm.org/D27706 llvm-svn: 293035
* [ARM] GlobalISel: Support i8/i16 ABI extensionsDiana Picus2017-01-258-5/+195
| | | | | | | | | | | | | At the moment, this means supporting the signext/zeroext attribute on the return type of the function. For function arguments, signext/zeroext should be handled by the caller, so there's nothing for us to do until we start lowering calls. Note that this does not include support for other extensions (i8 to i16), those will be added later. Differential Revision: https://reviews.llvm.org/D27705 llvm-svn: 293034
* Do not verify dominator tree if it has no rootsSerge Pavlov2017-01-253-1/+9
| | | | | | | | | | | If dominator tree has no roots, the pass that calculates it is likely to be skipped. It occures, for instance, in the case of entities with linkage available_externally. Do not run tree verification in such case. Differential Revision: https://reviews.llvm.org/D28767 llvm-svn: 293033
OpenPOWER on IntegriCloud