summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [AArch64] Extend AArch64RedundantCopyElimination to do simple copy propagation.Geoff Berry2017-02-222-43/+422
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Extend AArch64RedundantCopyElimination to catch cases where the register that is known to be zero is COPY'd in the predecessor block. Before this change, this pass would catch cases like: CBZW %W0, <BB#1> BB#1: %W0 = COPY %WZR // removed After this change, cases like the one below are also caught: %W0 = COPY %W1 CBZW %W1, <BB#1> BB#1: %W0 = COPY %WZR // removed This change results in a 4% increase in static copies removed by this pass when compiling the llvm test-suite. It also fixes regressions caused by doing post-RA copy propagation (a separate change to be put up for review shortly). Reviewers: junbuml, mcrosier, t.p.northover, qcolombet, MatzeB Subscribers: aemerson, rengolin, llvm-commits Differential Revision: https://reviews.llvm.org/D30113 llvm-svn: 295863
* [LV] Add scalar floating-point induction test (NFC)Matthew Simpson2017-02-221-0/+58
| | | | llvm-svn: 295862
* [ModuleSummaryAnalysis] Don't crash when referencing unnamed globals.Davide Italiano2017-02-222-0/+16
| | | | | | | Instead, just be conservative as these are unfrequent enough. Thanks to Peter Collingbourne for the discussion about this on IRC. llvm-svn: 295861
* [WebAssembly] Implement the wasm binary container header.Dan Gohman2017-02-224-2/+15
| | | | | | | Also, update the version number to 0x1, which is what engines are now expecting. llvm-svn: 295860
* MIRTests: Remove unnecessary 2>&1 redirectionMatthias Braun2017-02-2269-69/+69
| | | | | | | llc mir output goes to stdout nowadays, so the 2>&1 is not necessary anymore for most tests. llvm-svn: 295859
* [LoopVectorize] Added address space check when analysing interleaved accessesKarl-Johan Karlsson2017-02-222-14/+56
| | | | | | | | | | | | | | | | | | | | Prevent memory objects of different address spaces to be part of the same load/store groups when analysing interleaved accesses. This is fixing pr31900. Reviewers: HaoLiu, mssimpso, mkuper Reviewed By: mssimpso, mkuper Subscribers: llvm-commits, efriedma, mzolotukhin Differential Revision: https://reviews.llvm.org/D29717 This reverts r295042 (re-applies r295038) with an additional fix for the buildbot problem. llvm-svn: 295858
* [WebAssembly] Define a table of function signatures for runtime library calls.Dan Gohman2017-02-223-0/+1345
| | | | | | | | | | LLVM CodeGen emits references to external symbols that are never declared in LLVM IR level, so they have no declared signature. However, WebAssembly requires all functions be declared with signatures. This patch adds a table for providing signatures for known runtime libcalls that will be used in subsequent patches to emit declarations for such functions. llvm-svn: 295857
* [RDF] Skip undef uses when calculating kill flagsKrzysztof Parzyszek2017-02-221-1/+1
| | | | llvm-svn: 295856
* [RDF] Only access block live-ins when tracking livenessKrzysztof Parzyszek2017-02-221-2/+4
| | | | llvm-svn: 295855
* [Support] Provide linux/magic.h fallback for older kernelsMichal Gorny2017-02-222-0/+24
| | | | | | | | | | | | | | | | | | | | | The function for distinguishing local and remote files added in r295768 unconditionally uses linux/magic.h header to provide necessary filesystem magic numbers. However, in kernel headers predating 2.6.18 the magic numbers are spread throughout multiple include files. Furthermore, LLVM did not require kernel headers being installed so far. To increase the portability across different versions of Linux kernel and different Linux systems, add CMake header checks for linux/magic.h and -- if it is missing -- the linux/nfs_fs.h and linux/smb.h headers which contained the numbers previously. Furthermore, since the numbers are static and the feature does not seem critical enough to make LLVM require kernel headers at all, add fallback constants for the case when none of the necessary headers is available. Differential Revision: https://reviews.llvm.org/D30261 llvm-svn: 295854
* [SLP] Test with extra argument used several times.Alexey Bataev2017-02-221-0/+108
| | | | llvm-svn: 295853
* Fix an obvious bug in SampleProfileReaderGCC.Dehao Chen2017-02-223-5/+29
| | | | | | | | | | | | | | Summary: The CallTargetProfile should be added to FProfile to be consistent with other profile readers. Reviewers: dnovillo, davidxl Reviewed By: davidxl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D30233 llvm-svn: 295852
* [WebAssembly] Configure codegen to legalize f16 values.Dan Gohman2017-02-222-0/+33
| | | | llvm-svn: 295850
* [DAGCombiner] revert r295336Bill Seurer2017-02-229-74/+170
| | | | | | | | | | | r295336 causes a bootstrapped clang to fail for many compilations on powerpc BE. See http://lab.llvm.org:8011/builders/clang-ppc64be-linux-multistage/builds/2315 for example. Reverting as per the developer's request. llvm-svn: 295849
* [X86][SSE] getTargetConstantBitsFromNode - insert constant bits directly ↵Simon Pilgrim2017-02-221-18/+15
| | | | | | | | into masks. Minor optimization, don't create temporary mask APInts that are just going to be OR'd into the accumulate masks - insert directly instead. llvm-svn: 295848
* [DeLICM] Add regression tests for DeLICM reject cases.Michael Kruse2017-02-227-3/+401
| | | | | | | | | | | | | | | | | These tests were not included in the main DeLICM commit. These check the cases where zone analysis cannot be successful because of assumption violations. We use the LLVM optimization remark infrastructure as it seems to be the best fit for this kind of messages. I tried to make use if the OptimizationRemarkEmitter. However, it would insert additional function passes into the pass manager to get the hotness information. The pass manager would insert them between the flatten pass and delicm, causing the ScopInfo with the flattened schedule being thrown away. Differential Revision: https://reviews.llvm.org/D30253 llvm-svn: 295846
* [X86][SSE] Use APInt::getBitsSet() instead of APInt::getLowBitsSet().shl() ↵Simon Pilgrim2017-02-222-8/+10
| | | | | | separately. NFCI. llvm-svn: 295845
* [OpenCL] r600 needs OpenCL kernel calling conventionJan Vesely2017-02-222-1/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D30236 llvm-svn: 295843
* [Support] XFAIL is_local for mipsSimon Dardis2017-02-221-0/+36
| | | | | | | is_local can't pass on some our buildbots as some of our buildbots use network shares for building and testing LLVM. llvm-svn: 295840
* Remove superfluous initializer. Yaron Keren2017-02-221-1/+1
| | | | | | The following fully-covered switch either sets value to External or exits the function. llvm-svn: 295839
* [DeLICM] Fix wrong comment. NFC.Michael Kruse2017-02-221-1/+1
| | | | | | | Correct a comment that claimed that a store after load was detected when the code checks a load after a store. llvm-svn: 295835
* * [AMDGPU][mc][tests] Updated coverage/smoke tests for gfx7 and gfx8; minor ↵Dmitry Preobrazhensky2017-02-224-100835/+114665
| | | | | | | test corrections. NB: several old tests have been corrected because they violated constant bus limitations llvm-svn: 295834
* [DeLICM] Print message when zone analysis is not available on -analysis.Michael Kruse2017-02-221-0/+5
| | | | | | | This is to distinguish the cases that analysis has failed from the case where not transformation was performed. llvm-svn: 295833
* [DeLICM] Use opt<int>.Michael Kruse2017-02-221-1/+1
| | | | | | | | There is no template specialization for cl::parser<unsigned long> such that parsing an cl::opt<unsigned long> command line argument will fail. Use opt<int> instead which has an associated parser. llvm-svn: 295832
* Fix -Wunused-but-set-variable warning by removing unused 'aggregateIsPacked' ↵Simon Pilgrim2017-02-221-4/+0
| | | | | | checking llvm-svn: 295830
* Fix 'control reaches end of non-void function' warningSimon Pilgrim2017-02-221-1/+2
| | | | llvm-svn: 295829
* Fix -Wunused-private-field warning by removing unused ODRHash reference ↵Simon Pilgrim2017-02-221-4/+3
| | | | | | field from ODRDeclVisitor llvm-svn: 295828
* [GlobalISel] Fix compiler warnings and make assert assert something.Benjamin Kramer2017-02-223-11/+7
| | | | llvm-svn: 295827
* [SLP] Remove unused initial value from the variable, NFC.Alexey Bataev2017-02-221-1/+1
| | | | llvm-svn: 295826
* [X86][GlobalISel] Initial implementation , select G_ADD gpr, gprIgor Breger2017-02-2210-6/+407
| | | | | | | | | | | | | | Summary: Initial implementation for X86InstructionSelector. Handle selection COPY and G_ADD/G_SUB gpr, gpr . Reviewers: qcolombet, rovka, zvi, ab Reviewed By: rovka Subscribers: mgorny, dberris, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D29816 llvm-svn: 295824
* Switch "lldb" log channel to the new registration mechanismPavel Labath2017-02-225-301/+45
| | | | llvm-svn: 295823
* Replace WINLOG_*** macros with LLDB_LOGPavel Labath2017-02-226-374/+244
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The main difference here is that in the WINLOG macros you can specify log categories per call, whereas here you have to go the usual lldb route of getting a Log* variable first. While this means you have to write at least two statements, it usually means that each statement will fit on a single line, whereas fitting the WINLOG invocation on a single line was almost impossible. So the total size of code does not increase even in functions with a single log statement, and functions with more logging get shorter. The downside here is reduced flexibility in specifying the log categories, which a couple of functions used quite heavily (e.g. RefreshStateAfterStop). For these I chose a single category used most prominently and put everything into that, although a solution with multiple log variables is definitely possible. Reviewers: zturner, amccarth Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D30172 llvm-svn: 295822
* Add format_provider for the MemoryRegionInfo::OptionalBool enumPavel Labath2017-02-223-0/+42
| | | | llvm-svn: 295821
* [ODRHash] Avoid dereferencing end() of a SmallVector.Benjamin Kramer2017-02-221-1/+2
| | | | | | Found by MSAN. llvm-svn: 295820
* [X86] Regenerate CSE test with codegen instead of just the instruction countSimon Pilgrim2017-02-221-2/+37
| | | | llvm-svn: 295819
* Completion related fixes for clang-include-fixer.el.Manuel Klimek2017-02-221-21/+24
| | | | | | | | | | | | | | | | 1. Quitting inside a process sentinel is not allowed, but the sentinel invokes completion, where the user is free to hit C-g. By wrapping the call in with-local-quit, the process sentinel invocation can finish without triggering an error 2. Invoke completing-read instead of ido-completing-read, since this may interfere with user customizations to completing-read-function. The user should use something like ido-ubiquitous if ido completion is wanted 3. Compare the string returned from completion with string=, since it may be a copy of the original string in the collection Patch by Torsten Marek. llvm-svn: 295818
* [ELF] - Addressed post commit review comments for D30187George Rimar2017-02-221-3/+3
| | | | | | | * Added comment. * Pass std::string copy instead using move semantic. llvm-svn: 295817
* [ARM] Fix constant islands pass.Roger Ferrer Ibanez2017-02-222-0/+1059
| | | | | | | | | | | | The pass tries to fix a spill of LR that turns out to be unnecessary. So it removes the tPOP but forgets to remove tPUSH. This causes the stack be misaligned upon returning the function. Thus, remove the tPUSH as well in this case. Differential Revision: https://reviews.llvm.org/D30207 llvm-svn: 295816
* Write to a temporary file in test instead of random file in the test directory.Benjamin Kramer2017-02-221-6/+6
| | | | llvm-svn: 295815
* Adds a hook clang-include-fixer-add-include-hook that is invoked with the ↵Manuel Klimek2017-02-221-3/+20
| | | | | | | | | | path and type of the added include. This patch also adds a new function clang-include-fixer-from-symbol, which prompts the user for a symbol to resolve and include. Patch by Torsten Marek. llvm-svn: 295814
* [X86] Fix memory operands definition for some instructions.Ayman Musa2017-02-221-10/+14
| | | | | | | | Change integer memory operands to FP memory operands to some FP instructions. Differential Revision: https://reviews.llvm.org/D30201 llvm-svn: 295813
* OptDiag: Add const to some interfaces that don't modify anything. NFCJustin Bogner2017-02-224-11/+11
| | | | | | | | This needed a const_cast for the dominator tree recalculation in OptimizationRemarkEmitter, but we do that all over the place already and it's safe. llvm-svn: 295812
* [ARM] Classification Improvements to ARM Sched-Models. NFCI.Javed Absar2017-02-226-69/+286
| | | | | | | | | | | | | | This patch adds missing sched classes for Thumb2 instructions. This has been missing so far, and as a consequence, machine scheduler models for individual sub-targets have tended to be larger than they needed to be. These patches should help write schedulers better and faster in the future for ARM sub-targets. Reviewer: Diana Picus Differential Revision: https://reviews.llvm.org/D29953 llvm-svn: 295811
* [AVX-512] Allow legacy scalar min/max intrinsics to select EVEX instructions ↵Craig Topper2017-02-229-61/+121
| | | | | | | | | | | | when available This patch introduces new X86ISD::FMAXS and X86ISD::FMINS opcodes. The legacy intrinsics now lower to this node. As do the AVX-512 masked intrinsics when the rounding mode is CUR_DIRECTION. I've merged a copy of the tablegen multiclass avx512_fp_scalar into avx512_fp_scalar_sae. avx512_fp_scalar still needs to support CUR_DIRECTION appearing as a rounding mode for X86ISD::FADD_ROUND and others. Differential revision: https://reviews.llvm.org/D30186 llvm-svn: 295810
* [ValueTracking] Make poison propagation more aggressiveSanjoy Das2017-02-224-66/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Motivation: fix PR31181 without regression (the actual fix is still in progress). However, the actual content of PR31181 is not relevant here. This change makes poison propagation more aggressive in the following cases: 1. poision * Val == poison, for any Val. In particular, this changes existing intentional and documented behavior in these two cases: a. Val is 0 b. Val is 2^k * N 2. poison << Val == poison, for any Val 3. getelementptr is poison if any input is poison I think all of these are justified (and are axiomatically true in the new poison / undef model): 1a: we need poison * 0 to be poison to allow transforms like these: A * (B + C) ==> A * B + A * C If poison * 0 were 0 then the above transform could not be allowed since e.g. we could have A = poison, B = 1, C = -1, making the LHS poison * (1 + -1) = poison * 0 = 0 and the RHS poison * 1 + poison * -1 = poison + poison = poison 1b: we need e.g. poison * 4 to be poison since we want to allow A * 4 ==> A + A + A + A If poison * 4 were a value with all of their bits poison except the last four; then we'd not be able to do this transform since then if A were poison the LHS would only be "partially" poison while the RHS would be "full" poison. 2: Same reasoning as (1b), we'd like have the following kinds transforms be legal: A << 1 ==> A + A Reviewers: majnemer, efriedma Subscribers: mcrosier, llvm-commits Differential Revision: https://reviews.llvm.org/D30185 llvm-svn: 295809
* [OpenMP] Generate better diagnostics for cancel and cancellation pointJonas Hahnfeld2017-02-223-14/+36
| | | | | | | | | | | | | | | checkNestingOfRegions uses CancelRegion to determine whether cancel and cancellation point are valid in the given nesting. This leads to unuseful diagnostics if CancelRegion is invalid. The given test case has produced: region cannot be closely nested inside 'parallel' region As a solution, introduce checkCancelRegion and call it first to get the expected error: one of 'for', 'parallel', 'sections' or 'taskgroup' is expected Differential Revision: https://reviews.llvm.org/D30135 llvm-svn: 295808
* Use const-ref in range-loop for to avoid copying pairs of std::stringSean Silva2017-02-222-2/+2
| | | | | | | | | | No reason to create temporaries. Differential Revision: https://reviews.llvm.org/D29871 Patch by sergio.martins! llvm-svn: 295807
* Call the correct @llvm.objectsize.George Burgess IV2017-02-222-6/+33
| | | | | | | | | | | | | | | | | | The following code would crash clang: void foo(unsigned *const __attribute__((pass_object_size(0)))); void bar(unsigned *i) { foo(i); } This is because we were always selecting the version of `@llvm.objectsize` that takes an i8* in CodeGen. Passing an i32* as an i8* makes LLVM very unhappy. (Yes, I'm surprised that this remained uncaught for so long, too. :) ) As an added bonus, we'll now also use the appropriate address space when emitting @llvm.objectsize calls. llvm-svn: 295805
* Mark TestDarwinLogBasic.py as an xfail because the logging isJason Molenda2017-02-221-0/+1
| | | | | | | not being picked up; filed <rdar://problem/30645203> to track the work to investigate this. llvm-svn: 295804
* [WebAssembly] Add skeleton MC support for the Wasm container formatDan Gohman2017-02-2235-22/+1307
| | | | | | | | | This just adds the basic skeleton for supporting a new object file format. All of the actual encoding will be implemented in followup patches. Differential Revision: https://reviews.llvm.org/D26722 llvm-svn: 295803
OpenPOWER on IntegriCloud