summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [ELF] - Allow relocation to a weak undefined symbol when -z notext is given.George Rimar2017-12-272-13/+29
| | | | | | | | | | | | | | Previously we failed to resolve them when produced executables: "relocation R_X86_64_32 cannot be used against shared object; recompile with -fPIC" Patch fixes it so that we resolve them to 0 for executables. And for -shared case we still should produce the relocation. This finishes fixing PR35720. DIfferential revision: https://reviews.llvm.org/D41551 llvm-svn: 321473
* [SCEV] Do not insert if it is already in cacheSerguei Katkov2017-12-272-2/+82
| | | | | | | | | | | | | | | | | | | This is fix for the crash caused by ScalarEvolution::getTruncateExpr. It expects that if it checked the condition that SCEV is not in UniqueSCEVs cache in the beginning that it will not be there inside this method. However during recursion and transformation/simplification for sub expression, it is possible that these modifications will end up with the same SCEV as we started from. So we must always check whether SCEV is in cache and do not insert item if it is already there. Reviewers: sanjoy, mkazantsev, craig.topper Reviewed By: sanjoy Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D41380 llvm-svn: 321472
* Make it clear where is a placeholder for later binary patching.Rui Ueyama2017-12-272-20/+20
| | | | | | | | | This is an aesthetic change to represent a placeholder for later binary patching as "0, 0, 0, 0" instead of "0x00, 0x00, 0x00, 0x00". The former is how we represent it in COFF, and I found it easier to read than the latter. llvm-svn: 321471
* [COFF] Do not parse args twice if no rsp files existsRui Ueyama2017-12-273-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch by Takuto Ikuta. This patch reduces link time of chromium's blink_core.dll in component build. Total size of input argument in .directives become nearly 300MB in the build and no rsp file is used. Speedup link by skipping duplicate parsing. On my desktop machine, 4 times stats are like below. Improved around 15%. This patch TotalSeconds : 18.408538 TotalSeconds : 17.2996744 TotalSeconds : 17.1053862 TotalSeconds : 17.809777 avg: 17.6558439 master TotalSeconds : 20.9290504 TotalSeconds : 19.9158213 TotalSeconds : 21.0643515 TotalSeconds : 20.8775831 avg: 20.696701575 Differential Revision: https://reviews.llvm.org/D41581 llvm-svn: 321470
* There is no portable format string for printing `uintptr_t` values.Chandler Carruth2017-12-271-6/+6
| | | | | | | | | Instead, cast them to `void *` which has a portable format string syntax of `%p`. This fixes a -Wformat error when building libunwind. llvm-svn: 321469
* [instcombine] add powi(x, 2) -> x * xPhilip Reames2017-12-272-0/+9
| | | | llvm-svn: 321468
* Sink a couple of transforms from instcombine into instsimplify.Philip Reames2017-12-272-24/+28
| | | | llvm-svn: 321467
* [NFC] Extract out a helper function for SimplifyCall(CS, Q)Philip Reames2017-12-273-5/+11
| | | | | | This simplifies code, but the real motivation is that it lets me clean up some downstream code. llvm-svn: 321466
* [Unroll][DebugInfo] Propagate loop body's debug location to epilog preheaderZhaoshi Zheng2017-12-263-3/+138
| | | | | | | NewExit and epilog PreHeader should has the same debug loc as the original loop body, instead of original loop exit. llvm-svn: 321465
* [DAGCombine] visitANDLike - ensure APInt is is in range for ↵Simon Pilgrim2017-12-262-4/+20
| | | | | | | | getSExtValue/getZExtValue Reduced from oss-fuzz #4782 test case llvm-svn: 321464
* [X86] Return SDValue(N, 0) instead of an SDValue() after a successful combine.Craig Topper2017-12-261-2/+2
| | | | | | | | Returning SDValue() means nothing changed, SDValue(N,0) means there was a change but the worklist management was taken care of. I don't know if this has a real effect other than making sure the combine counter in the DAG combiner gets updated, but it is the correct thing to do. llvm-svn: 321463
* [X86] Regenerate test using update_llc_test_checks.py.Craig Topper2017-12-261-34/+128
| | | | llvm-svn: 321462
* [InstCombine] fix miscompile of frem with 0.0 operand (PR34870)Sanjay Patel2017-12-262-6/+3
| | | | | | | We might want to select NAN here or do this transform with fast-math, but this should at least fix the miscompile. llvm-svn: 321461
* [InstCombine] add test for frem with 0.0 (PR34870); NFCSanjay Patel2017-12-261-0/+13
| | | | llvm-svn: 321460
* It's a fix for Bug 35741 - can't use comments after x86 prefixes.Andrew V. Tischenko2017-12-262-2/+7
| | | | | | Differential Revision: https://reviews.llvm.org/D41579 llvm-svn: 321459
* Add a comment about subtracting two non abs symbols. NFC.Rafael Espindola2017-12-261-0/+1
| | | | llvm-svn: 321458
* Fix comment typo in r321312.Paul Robinson2017-12-261-1/+1
| | | | | | Post-commit review by Kim Grasman! llvm-svn: 321457
* [ValueTracking] ignore FP signed-zero when detecting a casted-to-integer ↵Sanjay Patel2017-12-262-13/+36
| | | | | | | | | | | | | | | | | fmin/fmax pattern This is a preliminary step for the patch discussed in D41136 (and denoted here with the FIXME comment). When we match an FP min/max that is cast to integer, any intermediate difference between +0.0 or -0.0 should be muted in the result by the conversion (either fptosi or fptoui) of the result. Thus, we can enable 'nsz' for the purpose of matching fmin/fmax. Note that there's probably room to generalize this more, possibly by fixing the current calls to the weak version of isKnownNonZero() in matchSelectPattern() to the more powerful recursive version. Differential Revision: https://reviews.llvm.org/D41333 llvm-svn: 321456
* [DAGCombine] Don't combine (and (setne X, 0), (setne X, -1)) --> (setuge ↵Simon Pilgrim2017-12-262-1/+26
| | | | | | | | (add X, 1), 2) for i1 Reduced from oss-fuzz #4773 test case llvm-svn: 321455
* [InstSimplify] Check for in range extraction index before calling ↵Simon Pilgrim2017-12-262-2/+16
| | | | | | | | APInt::getZExtValue() Reduced from oss-fuzz #4768 test case llvm-svn: 321454
* Simplify script lexer.Rui Ueyama2017-12-262-3/+9
| | | | | | Differential Revision: https://reviews.llvm.org/D41577 llvm-svn: 321453
* [X86] Pass itins.rr/itins.rm through properly for some instructions.Craig Topper2017-12-262-37/+18
| | | | llvm-svn: 321452
* [X86] Use SSE_INTMUL_ITINS_P for the AVX-512 MUL instructions to match their ↵Craig Topper2017-12-262-9/+9
| | | | | | SSE/AVX counterparts. llvm-svn: 321451
* [X86] Fix typo in assert message.Craig Topper2017-12-261-1/+1
| | | | llvm-svn: 321450
* Add a fixit for attributes incorrectly placed prior to 'struct/class/enum' ↵Faisal Vali2017-12-257-14/+55
| | | | | | | | | | | | | keyword. Suggest moving the following erroneous attrib list (based on location) [[]] struct X; to struct [[]] X; Additionally, added a fixme for the current implementation that diagnoses misplaced attributes to consider using the newly introduced diagnostic (that I think is more user-friendly). llvm-svn: 321449
* [libunwind] Remove dubious template function. NFC.whitequark2017-12-251-7/+3
| | | | | | Per review by Don Hinton. llvm-svn: 321448
* COFF: fix IMAGE_FILE_MACHINE_AM33Martell Malone2017-12-251-1/+1
| | | | | | | PE COFF spec value is 0x1D3 not 0x13 https://msdn.microsoft.com/en-us/library/windows/desktop/ms680547(v=vs.85).aspx llvm-svn: 321447
* [libunwind] Unbreak debug builds after r321440.whitequark2017-12-251-4/+7
| | | | llvm-svn: 321446
* [libunwind] Add proper support for DWARF unwind on bare metal.whitequark2017-12-251-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now, ARM EHABI unwind on bare metal expects to find the symbols __exidx_start and __exidx_end defined, and uses those to locate the EH tables. However, DWARF unwind on bare metal expects to find dl_iterate_phdr, which, although possible to provide, is inconvenient and mildly absurd. This commit provides feature parity with ARM EHABI unwind by looking for symbols __eh_frame_start, __eh_frame_end, __eh_frame_hdr_start and __eh_frame_hdr_end, denoting the start and end of the sections with corresponding names. As far as I know, there is no de jure or de facto ABI providing any such names, so I chose the obvious ones. The .eh_frame_hdr support is optional for maximum flexibility and possible space savings (e.g. if libunwind is only used to provide backtraces when a device crashes, providing the .eh_frame_hdr, which is an index for rapid access to EH tables, would be a waste.) The support for .eh_frame_hdr/DWARF index in the first place is conditional on defined(_LIBUNWIND_SUPPORT_DWARF_INDEX), although right now config.h will always define this macro. The support for DWARF unwind on bare metal has been validated within the ARTIQ environment[1]. [1]: https://m-labs.hk/artiq/ llvm-svn: 321445
* [docs] Use dbgs() instead of errs() for DEBUG()Jonas Devlieghere2017-12-251-5/+5
| | | | | | | | | | | | The examples in llvm/Support/Debug.h use `DEBUG(dbgs() << ...)` instead of `errs()`, so the examples in the Programmer's Manual should match that. Patch by: Moritz Sichert <moritz.sichert@googlemail.com> Differential revision: https://reviews.llvm.org/D41170 llvm-svn: 321444
* [ThinLTO] Don't import functions with noinline attributeEugene Leviant2017-12-253-1/+37
| | | | | | Differential revision: https://reviews.llvm.org/D41489 llvm-svn: 321443
* [libunwind] fix a typo in r321441.whitequark2017-12-251-1/+1
| | | | llvm-svn: 321442
* [libunwind] convert error logs to _LIBUNWIND_LOG/_LIBUNWIND_LOG0.whitequark2017-12-252-35/+35
| | | | | | | | | | | | | Use the `_LIBUNWIND_LOG` and `_LIBUNWIND_LOG0` macros instead of the explicit `fprintf` call. This was previously done in r292721 as a cleanup and then reverted in r293257 because the implementation in r292721 relied on a GNU extension. This implementation avoids the use of an extension by using a second macro instead, and allows to avoid the dependency on fprintf if _LIBUNWIND_BARE_METAL is defined. llvm-svn: 321441
* [libunwind] Avoid using C++ headers.whitequark2017-12-251-1/+1
| | | | | | This is useful for building libunwind on libcxx-free systems. llvm-svn: 321440
* [MC] - Disallow invalid section groups declarations.George Rimar2017-12-252-2/+16
| | | | | | | | | | | | This fixes parseGroup() so that it always sets error condition on error. Previously it was not done, because parseIdentifier looks never do that, assuming that caller should do it if he wants to. So previously cases from test were silently accepted and produced broken output. Differential revision: https://reviews.llvm.org/D41559 llvm-svn: 321439
* [SafepointIRVerifier] Allow non-dereferencing uses of unrelocated or ↵Max Kazantsev2017-12-254-27/+266
| | | | | | | | | | | | | | | | | | poisoned PHI nodes PHI that has at least one unrelocated input cannot cause any issues by itself, though its uses should be carefully verified. With this patch PHIs are allowed to have any inputs but when all inputs are unrelocated the PHI is marked as unrelocated and if not all inputs are unrelocated then the PHI is marked as poisoned. Poisoned pointers can be used only in three ways: to derive new pointers, in PHIs or in comparisons against constants that are exclusively derived from null. Patch by Daniil Suchkov! Differential Revision: https://reviews.llvm.org/D41006 llvm-svn: 321438
* [X86] Add a DAG combines to turn vXi64 muls into VPMULDQ/VPMULUDQ if the ↵Craig Topper2017-12-253-56/+54
| | | | | | | | | | upper bits are all sign bits or zeros. Normally we catch this during lowering, but vXi64 mul is considered legal when we have AVX512DQ. This DAG combine allows us to avoid PMULLQ with AVX512DQ if we can prove its unnecessary. PMULLQ is 3 uops that take 4 cycles each. While pmuldq/pmuludq is only one 4 cycle uop. llvm-svn: 321437
* [X86] Add avx512vl and avx512dq command lines to combine-pmuldq.ll to ↵Craig Topper2017-12-251-31/+101
| | | | | | | | demonstrate where we fail to use pmuldq/pmuludq and use to pmullq instead. It's nice that pmullq exists, but it has higher latency and probably lower throughput than pmuldq/pmuludq. We should prefer those if we can. llvm-svn: 321436
* [libcxx] Suppress unused warning on apple.Don Hinton2017-12-251-0/+1
| | | | | | | | | | | | | | | | Summary: This warning is already suppressed on non-apple platforms, so this change just suppresses it on apple as well. Reviewers: EricWF, lichray Reviewed By: lichray Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D41248 llvm-svn: 321435
* [cmake] Always respect existing CMAKE_REQUIRED_FLAGS when adding additional ↵Don Hinton2017-12-253-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | ones. Summary: Always respect existing CMAKE_REQUIRED_FLAGS when adding additional ones. This is important when cross compiling where --sysroot and -target were already added. In particular, this is needed when cross compiling from Darwin to Linux, since --sysroot is required to find headers and libraries. Cmake has a similar bug in check_include_file[_cxx] where CMAKE_REQUIRED_LIBRARIES isn't passed, which causes try_compile to fail. (please see https://gitlab.kitware.com/cmake/cmake/merge_requests/1620) Reviewers: compnerd, silvas, beanz, brad.king Reviewed By: compnerd Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D41568 llvm-svn: 321434
* [X86] Make some helper methods static functions instead. NFCCraig Topper2017-12-252-19/+15
| | | | llvm-svn: 321433
* [X86] Use SelectionDAG::getFPExtendOrRound to simplify some code.Craig Topper2017-12-251-10/+1
| | | | llvm-svn: 321432
* Fix PR35739: chkstk and chkst2 should only be built for WindowsDimitry Andric2017-12-241-4/+0
| | | | | | | | | | | | | | | | | | | | As reported in PR35739, rL252927 added the Windows specific chkstk and chkstk2 sources unconditionally, and since these are assembly without a NO_EXEC_STACK_DIRECTIVE at the end, automated vulnerability scanners warned about the objects having an executable stack. Avoid the problem by only including these files when Windows is targeted. Reviewers: compnerd, rnk, martell Reviewed By: martell Subscribers: mstorsjo, mgorny, martell, javed.absar, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D41567 llvm-svn: 321431
* Allow relocations in rw sections to create plt entries.Rafael Espindola2017-12-245-10/+24
| | | | | | | | | | | If a relocation cannot be implemented by the dynamic linker and the section is rw, allow creating a plt entry to use as the function address as if the section was ro. This matches bfd and gold. It also matches our behavior with -z notext. llvm-svn: 321430
* [AST] Inline CompoundStmt contents into the parent allocation.Benjamin Kramer2017-12-248-59/+62
| | | | | | Saves a pointer on every CompoundStmt. llvm-svn: 321429
* [AST] Convert AttributedStmt to llvm::TrailingObjects.Benjamin Kramer2017-12-242-7/+8
| | | | | | No functionality change intended. llvm-svn: 321428
* [OPENMP] Fix the tests for 32bits targets, NFC.Alexey Bataev2017-12-242-6/+6
| | | | llvm-svn: 321427
* [X86][AVX] Add AVX1/AVX2 vmul testsSimon Pilgrim2017-12-241-939/+2056
| | | | llvm-svn: 321426
* Make helpers static. No functionality change.Benjamin Kramer2017-12-244-6/+15
| | | | llvm-svn: 321425
* [X86][X87] Mark pseudo memory fold instructions as load/sideeffects ↵Simon Pilgrim2017-12-242-5/+3
| | | | | | | | (PR21160, PR34080, PR34454). Match regular x87 memory fold instructions with load/sideeffects tags, to prevent the schedulers from re-ordering them across the fnstcw/fldcw sequences for truncating stores while they are still pseudo during the stack conversion pass. llvm-svn: 321424
OpenPOWER on IntegriCloud