summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [mips] Recommit: "N64 static relocation model support"Simon Dardis2017-01-2750-354/+617
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes one change to GOT handling and two changes to N64's relocation model handling. Furthermore, the jumptable encodings have been corrected for static N64. Big GOT handling is now done via a new SDNode MipsGotHi - this node is unconditionally lowered to an lui instruction. The first change to N64's relocation handling is the lifting of the restriction that N64 always uses PIC. Now it is possible to target static environments. The second change adds support for 64 bit symbols and enables them by default. Previously N64 had patterns for sym32 mode only. In this mode all symbols are assumed to have 32 bit addresses. sym32 mode support is selectable with attribute 'sym32'. A follow on patch for clang will add the necessary frontend parameter. This partially resolves PR/23485. Thanks to Brooks Davis for reporting the issue! This version corrects a "Conditional jump or move depends on uninitialised value(s)" error detected by valgrind present in the original commit. Reviewers: dsanders, seanbruno, zoran.jovanovic, vkalintiris Differential Revision: https://reviews.llvm.org/D23652 llvm-svn: 293279
* [ELF] Fixed formatting. NFCEugene Leviant2017-01-271-4/+4
| | | | llvm-svn: 293278
* [libomptarget] Fix compilation with libc++Jonas Hahnfeld2017-01-271-1/+1
| | | | | | | | iterator is only guaranteed to be default-constructible, without any argument. Differential Revision: https://reviews.llvm.org/D29171 llvm-svn: 293277
* [ELF] Bypass section type checkEugene Leviant2017-01-275-14/+28
| | | | | | Differential revision: https://reviews.llvm.org/D28761 llvm-svn: 293276
* [lld][mips] Correct tests for mips64 implying PIC.Simon Dardis2017-01-273-8/+9
| | | | | | | | | | | | | | | Currently LLVM can only generate PIC code for MIPS64 with the N64 as it uses the idiom "isPositionIndependent() || IsABI_N64()" throughout the MIPS backend. r293164 changed this, causing test failures for LLD. This patch changes the tests minimally to preserve existing test coverage and one case where the test was "right" in the wrong circumstance. Reviewers: atanasyan Differential Revision: https://reviews.llvm.org/D29194 llvm-svn: 293275
* [SLP] Refactoring of horizontal reduction analysis, NFC.Alexey Bataev2017-01-271-24/+25
| | | | | | | | | | | Some checks in SLP horizontal reduction analysis function are performed several times, though it is enough to perform these checks only once during an initial attempt at adding candidate for the reduction instruction/reduced value. Differential Revision: https://reviews.llvm.org/D29175 llvm-svn: 293274
* [LICM] When we are recomputing the alias sets for a subloop, we cannotChandler Carruth2017-01-272-3/+76
| | | | | | | | | | | | | | | | | | | | | | | skip sub-subloops. The logic to skip subloops dated from when this code was shared with the cached case. Once it was factored out to only run in the case of recomputed subloops it became a dangerous bug. If a subsubloop contained an interfering instruction it would be silently skipped from the alias sets for LICM. With the old pass manager this was extremely hard to trigger as it would require failing to visit these subloops with the LICM pass but then visiting the outer loop somehow. I've not yet contrived any test case that actually manages to trigger this. But with the new pass manager we don't do the cross-loop caching hack that the old PM does and so we recompute alias set information from first principles. While this seems much cleaner and simpler it exposed this bug and would subtly miscompile code due to failing to correctly model the aliasing constraints of deeply nested loops. llvm-svn: 293273
* clang-format: [JS] do not format MPEG transport streams.Martin Probst2017-01-273-1/+22
| | | | | | | | | | | | | | | Summary: The MPEG transport stream file format also uses ".ts" as its file extension. This change detects its specific framing format (0x47 every 189 bytes) and simply ignores MPEG TS files. Reviewers: djasper, sammccall Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D29186 llvm-svn: 293270
* Unroll r292930 due to TestCallThatThrows test fail is not fixed in ↵Boris Ulasevich2017-01-279-254/+24
| | | | | | reasonable time. llvm-svn: 293269
* [DAGTypeLegalizer] Handle SIGN/ZERO_EXTEND in WidenVecRes_Convert().Jonas Paulsson2017-01-273-0/+191
| | | | | | | | | | | | | In case of a SIGN/ZERO_EXTEND of an incomplete vector type (using only a partial number of available vector elements), WidenVecRes_Convert() used to resort to scalarization. This patch adds a handling of the (common) case where an input vector can be found of same width as the widened result vector, by converting the node to SIGN/ZERO_EXTEND_VECTOR_INREG. Review: Eli Friedman llvm-svn: 293268
* Revert "Implement a new clang-tidy check that suggests users replace dynamic ↵Diana Picus2017-01-2710-487/+1
| | | | | | | | | exception specifications with noexcept exception specifications." This reverts commit r293217, its follow-up 293218 and part of 293234 because it broke all bots that build clang-tools-extra. llvm-svn: 293267
* [opt-viewer] Introduce global contextAdam Nemet2017-01-271-18/+24
| | | | | | | This is necessary since globals (max_hotness, caller_loc) need to be explicitly passed to the subprocesses. llvm-svn: 293266
* [opt-viewer] Remove message from the keyAdam Nemet2017-01-271-1/+1
| | | | | | | | This is causing problems because the rendering of the text will depend on varying global state to show relative hotness or a link in the inlining context. llvm-svn: 293265
* [opt-viewer] Unique across the different jobs as wellAdam Nemet2017-01-271-24/+11
| | | | llvm-svn: 293264
* [opt-viewer] Make sorting for the index page deterministicAdam Nemet2017-01-271-2/+2
| | | | | | Break the tie between entries with identical hotness deterministically. llvm-svn: 293263
* [opt-viewer] Include the function in the remark keyAdam Nemet2017-01-271-1/+1
| | | | | | Avoid uniquing remarks with different the inlining context (Function). llvm-svn: 293262
* [opt-viewer] Put critical items in parallelAdam Nemet2017-01-271-42/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Put opt-viewer critical items in parallel Patch by Brian Cain! Requires features from Python 2.7 **Performance** Below are performance results across various configurations. These were taken on an i5-5200U (dual core + HT). They were taken with a small subset of the YAML output of building Python 3.6.0b3 with LTO+PGO. 60 YAML files. "multiprocessing" is the current submission contents. "baseline" is as of 544f14c6b2a07a94168df31833dba9dc35fd8289 (I think this is aka r287505). "ImportError" vs "class<...CLoader>" below are just confirming the expected configuration (with/without CLoader). The below was measured on AMD A8-5500B (4 cores) with 224 input YAML files, showing a ~1.75x speed increase over the baseline with libYAML. I suspect it would scale well on high-end servers. ``` **************************************** MULTIPROCESSING **************************************** PyYAML: Traceback (most recent call last): File "<string>", line 1, in <module> ImportError: cannot import name CLoader Python 2.7.10 489.42user 5.53system 2:38.03elapsed 313%CPU (0avgtext+0avgdata 400308maxresident)k 0inputs+31392outputs (0major+473540minor)pagefaults 0swaps PyYAML+libYAML: <class 'yaml.cyaml.CLoader'> Python 2.7.10 78.69user 5.45system 0:32.63elapsed 257%CPU (0avgtext+0avgdata 398560maxresident)k 0inputs+31392outputs (0major+542022minor)pagefaults 0swaps PyPy/PyYAML: Traceback (most recent call last): File "<builtin>/app_main.py", line 75, in run_toplevel File "<builtin>/app_main.py", line 601, in run_it File "<string>", line 1, in <module> ImportError: cannot import name 'CLoader' Python 2.7.9 (2.6.0+dfsg-3, Jul 04 2015, 05:43:17) [PyPy 2.6.0 with GCC 4.9.3] 154.27user 8.12system 0:53.83elapsed 301%CPU (0avgtext+0avgdata 627960maxresident)k 808inputs+30376outputs (0major+727994minor)pagefaults 0swaps **************************************** BASELINE **************************************** PyYAML: Traceback (most recent call last): File "<string>", line 1, in <module> ImportError: cannot import name CLoader Python 2.7.10 358.08user 4.05system 6:08.37elapsed 98%CPU (0avgtext+0avgdata 315004maxresident)k 0inputs+31392outputs (0major+85252minor)pagefaults 0swaps PyYAML+libYAML: <class 'yaml.cyaml.CLoader'> Python 2.7.10 50.32user 3.30system 0:56.59elapsed 94%CPU (0avgtext+0avgdata 307296maxresident)k 0inputs+31392outputs (0major+79335minor)pagefaults 0swaps PyPy/PyYAML: Traceback (most recent call last): File "<builtin>/app_main.py", line 75, in run_toplevel File "<builtin>/app_main.py", line 601, in run_it File "<string>", line 1, in <module> ImportError: cannot import name 'CLoader' Python 2.7.9 (2.6.0+dfsg-3, Jul 04 2015, 05:43:17) [PyPy 2.6.0 with GCC 4.9.3] 72.94user 5.18system 1:23.41elapsed 93%CPU (0avgtext+0avgdata 455312maxresident)k 0inputs+30392outputs (0major+110280minor)pagefaults 0swaps ``` Reviewers: fhahn, anemet Reviewed By: anemet Subscribers: llvm-commits, mehdi_amini Differential Revision: https://reviews.llvm.org/D26967 llvm-svn: 293261
* Fix unused variable warning.Richard Trieu2017-01-271-0/+1
| | | | llvm-svn: 293260
* ARM: fix vectorized division on WoASaleem Abdulrasool2017-01-272-39/+48
| | | | | | | | | | | | | | The Windows on ARM target uses custom division for normal division as the backend needs to insert division-by-zero checks. However, it is designed to only handle non-vectorized division. ARM has custom lowering for vectorized division as that can avoid loading registers with the values and invoke a division routine for each one, preferring to lower using NEON instructions. Fall back to the custom lowering for the NEON instructions if we encounter a vectorized division. Resolves PR31778! llvm-svn: 293259
* NewGVN: Add basic dead and redundant store eliminationDaniel Berlin2017-01-273-30/+240
| | | | | | | | | | | | | | | | | | | | Summary: This adds basic dead and redundant store elimination to NewGVN. Unlike our current DSE, it will happily do cross-block DSE if it meets our requirements. We get a bunch of DSE's simple.ll cases, and some stuff it doesn't. Unlike DSE, however, we only try to eliminate stores of the same value to the same memory location, not just general stores to the same memory location. Reviewers: davide Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D29149 llvm-svn: 293258
* Revert "DWARF: convert error logs to _LIBUNWIND_LOG"Saleem Abdulrasool2017-01-272-17/+31
| | | | | | | | This reverts SVN r292721. Avoid the use of the GNU extension as the preprocessor in C++11 mode requires at least one argument, and this warning cannot be disabled, resulting in failing -Werror builds. llvm-svn: 293257
* NVPTXCodeGen: Add IPO to libdeps, since r293189.NAKAMURA Takumi2017-01-271-1/+1
| | | | llvm-svn: 293256
* [APFloat] Reduce some dispatch boilerplates. NFC.Tim Shen2017-01-272-167/+49
| | | | | | | | | | | | Summary: This is an attempt to reduce the verbose manual dispatching code in APFloat. This doesn't handle multiple dispatch on single discriminator (e.g. APFloat::add(const APFloat&)), nor handles multiple dispatch on multiple discriminators (e.g. APFloat::convert()). Reviewers: hfinkel, echristo, jlebar Subscribers: mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D29161 llvm-svn: 293255
* [docs] Add help text and refine grouping for various options.Richard Smith2017-01-273-168/+210
| | | | | | Also accept -G= (and -msmall-data-threshold=) as an alias for -G on MIPS as well as Hexagon. llvm-svn: 293254
* [NVPTX] [InstCombine] Add llvm_unreachable to appease MSVC.Justin Lebar2017-01-271-0/+1
| | | | llvm-svn: 293253
* Improve workaround for Sphinx's lack of support for command line options ↵Richard Smith2017-01-272-853/+123
| | | | | | containing '+', '.' etc. to be more stable as the set of options changes. llvm-svn: 293252
* [NVPTX] Fix use-after-stack-free bug in InstCombineCalls.Justin Lebar2017-01-271-1/+1
| | | | | | Introduced in r293244. llvm-svn: 293251
* Constant fold switch inst when looking for trivial conditions to unswitch on.Xin Tong2017-01-272-3/+55
| | | | | | | | | | | | Summary: Constant fold switch inst when looking for trivial conditions to unswitch on. Reviewers: sanjoy, chenli, hfinkel, efriedma Subscribers: llvm-commits, mzolotukhin Differential Revision: https://reviews.llvm.org/D29037 llvm-svn: 293250
* [PM] Port LoopLoadElimination to the new pass manager and wire it intoChandler Carruth2017-01-277-28/+99
| | | | | | | | | | | the main pipeline. This is a very straight forward port. Nothing weird or surprising. This brings the number of missing passes from the new PM's pipeline down to three. llvm-svn: 293249
* [ARM][LegalizerInfo] Specify the type of the opcode.Quentin Colombet2017-01-271-1/+1
| | | | | | | This is to fix the win7 bot that does not seem to be very good at infering the type when it gets used in an initiliazer list. llvm-svn: 293248
* [Builtin][ARM] Add Thumb1 support for aeabi_c{f,d}cmp.S and dcmp.SWeiming Zhao2017-01-274-2/+79
| | | | | | | | | | | | Reviewers: compnerd, rengolin Reviewed By: rengolin Subscribers: aemerson, llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D28985 llvm-svn: 293247
* [AArch64][LegalizerInfo] Specify the type of the opcode.Quentin Colombet2017-01-271-6/+6
| | | | | | | This is an attempt to fix the win7 bot that does not seem to be very good at infering the type when it gets used in an initiliazer list. llvm-svn: 293246
* Revert "[AArch64][LegalizerInfo] Specify the type of the initialization list."Quentin Colombet2017-01-271-76/+70
| | | | | | | | This reverts commit r293238. Even with that the win7 bot is still failing: http://lab.llvm.org:8011/builders/lld-x86_64-win7/builds/3862 llvm-svn: 293245
* [NVPTX] Upgrade NVVM intrinsics in InstCombineCalls.Justin Lebar2017-01-272-0/+721
| | | | | | | | | | | | | | | | | | | | | | | | Summary: There are many NVVM intrinsics that we can't entirely get rid of, but that nonetheless often correspond to target-generic LLVM intrinsics. For example, if flush denormals to zero (ftz) is enabled, we can convert @llvm.nvvm.ceil.ftz.f to @llvm.ceil.f32. On the other hand, if ftz is disabled, we can't do this, because @llvm.ceil.f32 will be lowered to a non-ftz PTX instruction. In this case, we can, however, simplify the non-ftz nvvm ceil intrinsic, @llvm.nvvm.ceil.f, to @llvm.ceil.f32. These transformations are particularly useful because they let us constant fold instructions that appear in libdevice, the bitcode library that ships with CUDA and essentially functions as its libm. Reviewers: tra Subscribers: hfinkel, majnemer, llvm-commits Differential Revision: https://reviews.llvm.org/D28794 llvm-svn: 293244
* [ValueTracking] Add comment that CannotBeOrderedLessThanZero does the wrong ↵Justin Lebar2017-01-271-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | thing for powi. Summary: CannotBeOrderedLessThanZero(powi(x, exp)) returns true if CannotBeOrderedLessThanZero(x). But powi(-0, exp) is negative if exp is odd, so we actually want to return SignBitMustBeZero(x). Except that also isn't right, because we want to return true if x is NaN, even if x has a negative sign bit. What we really need in order to fix this is a consistent approach in this function to handling the sign bit of NaNs. Without this it's very difficult to say what the correct behavior here is. Reviewers: hfinkel, efriedma, sanjoy Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D28927 llvm-svn: 293243
* [LangRef] Make @llvm.sqrt(x) return undef, rather than have UB, for negative x.Justin Lebar2017-01-272-10/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Some frontends emit a speculate-and-select idiom for sqrt, wherein they compute sqrt(x), check if x is negative, and select NaN if it is: %cmp = fcmp olt double %a, -0.000000e+00 %sqrt = call double @llvm.sqrt.f64(double %a) %ret = select i1 %cmp, double 0x7FF8000000000000, double %sqrt This is technically UB as the LangRef is written today if %a is ever less than -0. But emitting code that's compliant with the current definition of sqrt would require a branch, which would then prevent us from matching this idiom in SelectionDAG (which we do today -- ISD::FSQRT has defined behavior on negative inputs), because SelectionDAG looks at one BB at a time. Nothing in LLVM takes advantage of this undefined behavior, as far as we can tell, and the fact that llvm.sqrt has UB dates from its initial addition to the LangRef. Reviewers: arsenm, mehdi_amini, hfinkel Subscribers: wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D28797 llvm-svn: 293242
* [PM] Flesh out almost all of the late loop passes.Chandler Carruth2017-01-272-9/+43
| | | | | | | | | | | | | | | | | | | | | | | | | With this the per-module pass pipeline is *extremely* close to the legacy PM. The missing pieces are: - PruneEH (or some equivalent) - ArgumentPromotion - LoopLoadElimination - LoopUnswitch I'm going to work through those in essentially that order but this seems like a worthwhile incremental step toward the end state. One difference in what I have here from the legacy PM is that I've consolidated some of the per-function passes at the very end of the pipeline into the main optimization function pipeline. The intervening passes are *really* uninteresting and so this seems very likely to have any effect other than minor improvement to locality. Note that there are still some failures in the test suite, but the compiler doesn't crash or assert. Differential Revision: https://reviews.llvm.org/D29114 llvm-svn: 293241
* [libFuzzer] simplify the value profiling callback further: don't use (idx ↵Kostya Serebryany2017-01-273-10/+11
| | | | | | MOD prime) on the hot path where it is useless anyway llvm-svn: 293239
* [AArch64][LegalizerInfo] Specify the type of the initialization list.Quentin Colombet2017-01-271-70/+76
| | | | | | | This is an attempt to fix the win7 bot that does not seem to be very good at infering the type. llvm-svn: 293238
* [libFuzzer] make sure (again) that __builtin_popcountl is compiled into popcntKostya Serebryany2017-01-271-0/+8
| | | | llvm-svn: 293237
* [libFuzzer] simplify the value profile code and disable asan/msan on itKostya Serebryany2017-01-273-6/+19
| | | | llvm-svn: 293236
* NFC: Rename PDB_ReaderType::Raw to Native for consistency with the ↵Adrian McCarthy2017-01-273-6/+6
| | | | | | NativeSession rename. llvm-svn: 293235
* [Clang-tidy documentation] Consistency (fix-it); 80 characters per line.Eugene Zelenko2017-01-264-16/+14
| | | | llvm-svn: 293234
* Switch the default for building GlobalISel.Quentin Colombet2017-01-261-1/+1
| | | | | | | | | Now, GlobalISel will be built by default. To turn that off, one has to use -DLLVM_BUILD_GLOBAL_ISEL=OFF on the cmake command line. <rdar://problem/30004433> llvm-svn: 293232
* Re-apply r292662, "IRGen: Start using the WriteThinLTOBitcode pass."Peter Collingbourne2017-01-263-3/+17
| | | | | | The internal build issue has been resolved. llvm-svn: 293231
* CMake is funky on detecting Intel 17 as GCC compatible.Yichao Yu2017-01-261-0/+2
| | | | | | | | | | | | | | Summary: This adds a fallback in case that the Intel compiler is failed to be detected correctly. Reviewers: chapuni Reviewed By: chapuni Subscribers: llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D27610 llvm-svn: 293230
* [ARM] Fix some Clang-tidy modernize and Include What You Use warnings; other ↵Eugene Zelenko2017-01-2613-131/+244
| | | | | | minor fixes (NFC). llvm-svn: 293229
* GlobalISel: support debug intrinsics.Tim Northover2017-01-265-38/+192
| | | | | | | | The translation scheme is mostly cribbed from FastISel, and it's not entirely convincing semantically. But it does seem to work in the common cases and allow variables to be printed so it can't be all wrong. llvm-svn: 293228
* Revert a couple of InstCombine/Guard checkinsSanjoy Das2017-01-262-75/+0
| | | | | | | | | | | | | | | | | | | | | | | | | This change reverts: r293061: "[InstCombine] Canonicalize guards for NOT OR condition" r293058: "[InstCombine] Canonicalize guards for AND condition" They miscompile cases like: ``` declare void @llvm.experimental.guard(i1, ...) define void @test_guard_not_or(i1 %A, i1 %B) { %C = or i1 %A, %B %D = xor i1 %C, true call void(i1, ...) @llvm.experimental.guard(i1 %D, i32 20, i32 30)[ "deopt"() ] ret void } ``` because they do transfer the `i32 20, i32 30` parameters to newly created guard instructions. llvm-svn: 293227
* Add intrinsics for constrained floating point operationsAndrew Kaylor2017-01-2613-0/+768
| | | | | | | | | | | | | | This commit introduces a set of experimental intrinsics intended to prevent optimizations that make assumptions about the rounding mode and floating point exception behavior. These intrinsics will later be extended to specify flush-to-zero behavior. More work is also required to model instruction dependencies in machine code and to generate these instructions from clang (when required by pragmas and/or command line options that are not currently supported). Differential Revision: https://reviews.llvm.org/D27028 llvm-svn: 293226
OpenPOWER on IntegriCloud