summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [X86] Fix latent bug in sibcall eligibility logicReid Kleckner2017-07-282-0/+49
| | | | | | | | | | | | | | | | | | | The X86 tail call eligibility logic was correct when it was written, but the addition of inalloca and argument copy elision broke its assumptions. It was assuming that fixed stack objects were immutable. Currently, we aim to emit a tail call if no arguments have to be re-arranged in memory. This code would trace the outgoing argument values back to check if they are loads from an incoming stack object. If the stack argument is immutable, then we won't need to store it back to the stack when we tail call. Fortunately, stack objects track their mutability, so we can just make the obvious check to fix the bug. This was http://crbug.com/749826 llvm-svn: 309343
* [demangler] Attempt to fix linux bots, include <cstdio>Erik Pilkington2017-07-281-0/+1
| | | | llvm-svn: 309342
* [sanitizers] Sanitizer tests CMake clean up: try #2George Karpenkov2017-07-285-64/+15
| | | | | | | | | | | | | | | | | This patch addresses two issues: Most of the time, hacks with `if/else` in order to get support for multi-configuration builds are superfluous. The variable `CMAKE_CFG_INTDIR` was created precisely for this purpose: it expands to `.` on all single-configuration builds, and to a configuration name otherwise. The `if/else` hacks for the library name generation should also not be done, as CMake has `TARGET_FILE` generator expression precisely for this purpose, as it expands to the exact filename of the resulting target. Differential Revision: https://reviews.llvm.org/D35952 llvm-svn: 309341
* [demangler] Use an AST to represent demangled namesErik Pilkington2017-07-282-925/+1981
| | | | | | | | | | | | The demangler now demangles by producing an AST, then traverses that AST to produce a demangled name. This is done for performance reasons, now the demangler doesn't manuiplate std::strings, which hurt performance and caused string operations to be inlined into the parser, leading to large code size and stack usage. Differential revision: https://reviews.llvm.org/D35159 llvm-svn: 309340
* [sancov] Add missing line breaks in test. NFC.Evgeniy Stepanov2017-07-281-5/+5
| | | | llvm-svn: 309339
* [sanitizer-coverage] clang flags pumbing for -fsanitize-coverage=pc-tableKostya Serebryany2017-07-286-1/+14
| | | | llvm-svn: 309338
* [sanitizer-coverage] rename sanitizer-coverage-create-pc-table into ↵Kostya Serebryany2017-07-283-7/+9
| | | | | | sanitizer-coverage-pc-table and add plumbing for a clang flag llvm-svn: 309337
* Remove unused function from AArch64 backend (NFC)Adrian Prantl2017-07-272-16/+0
| | | | llvm-svn: 309336
* [sanitizer-coverage] add a feature sanitizer-coverage-create-pc-table=1 ↵Kostya Serebryany2017-07-272-22/+104
| | | | | | (works with trace-pc-guard and inline-8bit-counters) that adds a static table of instrumented PCs to be used at run-time llvm-svn: 309335
* [MachineOutliner] Cleanup: move findCandidates out of suffix treeJessica Paquette2017-07-271-204/+166
| | | | | | | | | | | | Doing some cleanup in preparation for some functional changes. This commit moves findCandidates out of the suffix tree and into the MachineOutliner class. This is much easier to follow, and removes the burden of candidate choice from the suffix tree. It also adds a couple FIXMEs and simplifies building outlined function names. llvm-svn: 309334
* [sancov] Implement __sanitizer_cov_reset.Evgeniy Stepanov2017-07-274-5/+83
| | | | | | | | | | | | Summary: Clears all collected coverage. Reviewers: kcc Subscribers: srhines, kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D35958 llvm-svn: 309333
* [llvm-pdbutil] Clean up ExitOnError usage to add ": " to our errorsReid Kleckner2017-07-271-12/+12
| | | | | | | | | The banner parameter is supposed to end in a separator, like ": ". Otherwise, we get ugly errors like: Error while reading publics streamNative error: blah blah llvm-svn: 309332
* [PDB] Initialize the std::array<ulittle32_t> used for the gsi bitmapReid Kleckner2017-07-271-0/+2
| | | | | | | | With ASan, we would write about 512 bytes of malloc fill value to the PDB, with some random bits ORed in here and there. Dumping the PDB would always fail reliably. llvm-svn: 309331
* [ConstantFolder] Don't try to fold gep when the idx is a vector.Davide Italiano2017-07-272-4/+37
| | | | | | | | | | | | | | | | The code in ConstantFoldGetElementPtr() assumes integers, and therefore it crashes trying to get the integer bidwith of a vector type (in this case <4 x i32>. I just changed the code to prevent the folding in case of vectors and I didn't bother to generalize as this doesn't seem to me something that really happens in practice, but I'm willing to change the patch if you think it's worth it. This is hard to trigger from -instsimplify or -instcombine only as the second instruction is dead, so the test uses loop-unroll. Differential Revision: https://reviews.llvm.org/D35956 llvm-svn: 309330
* Add a test.Rafael Espindola2017-07-271-0/+9
| | | | | | This would have found the error in r309252. llvm-svn: 309329
* Headers: fix _Unwind_{G,S}etGR for non-EHABI targetsSaleem Abdulrasool2017-07-271-4/+1
| | | | | | | | The EHABI definition was being inlined into the users even when EHABI was not in use. Adjust the condition to ensure that the right version is defined. llvm-svn: 309327
* Avoid warnings when asserts are disabled.Rafael Espindola2017-07-271-2/+1
| | | | llvm-svn: 309326
* [X86] Don't lie about legality to TLI's demanded bits.Ahmed Bougacha2017-07-271-2/+2
| | | | | | | | | | | Like r309323, X86 had a typo where it passed the wrong flags to TLO. Found by inspection; I haven't been able to tickle this into having observable behavior. I don't think it does, given that X86 doesn't have custom demanded bits logic, and the generic logic doesn't have a lot of exposure to illegal constructs. llvm-svn: 309325
* [AArch64] Remove outdated comment. NFC.Ahmed Bougacha2017-07-271-2/+0
| | | | | | There hasn't been a ternary since r231987. llvm-svn: 309324
* [AArch64] Fix legality info passed to demanded bits for TBI opt.Ahmed Bougacha2017-07-272-2/+13
| | | | | | | | | | | | | | | The (seldom-used) TBI-aware optimization had a typo lying dormant since it was first introduced, in r252573: when asking for demanded bits, it told TLI that it was running after legalize, where the opposite was true. This is an important piece of information, that the demanded bits analysis uses to make assumptions about the node. r301019 added such an assumption, which was broken by the TBI combine. Instead, pass the correct flags to TLO. llvm-svn: 309323
* [libcxx] [test] Remove an unused local typedef in ↵Stephan T. Lavavej2017-07-271-1/+0
| | | | | | | | enable_shared_from_this.pass.cpp. Trivial change, committed without review. llvm-svn: 309322
* [OCaml] Fix undefined reference to LLVMDumpType() with NDEBUGMichal Gorny2017-07-273-0/+11
| | | | | | | | | | | | | | | Account for the possibility of LLVMDumpType() not being available with NDEBUG in the OCaml bindings. If it is not built into LLVM, make the dump function raise an exception. Since rL293359, the dump functions are built only if either NDEBUG is not defined, or LLVM_ENABLE_DUMP is defined. As a result, if the dump functions are not built in LLVM, the dynamic OCaml libraries fail to load due to undefined LLVMDumpType symbol. Differential Revision: https://reviews.llvm.org/D35899 llvm-svn: 309321
* [OCaml] Respect CMAKE_C_FLAGS for OCaml C filesMichal Gorny2017-07-271-1/+1
| | | | | | | | | | | | | | | Pass the values of CMAKE_C_FLAGS and CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE} as -ccopt to ocamlc. This enforces the specific flags used for the LLVM build to be used for OCaml bindings as well, notably -O and -march flags. This also solves the issue of the user being unable to force specific flags for OCaml bindings builds. Gentoo needs this to enforce -DNDEBUG consistently between the LLVM build and the split OCaml bindings build. Differential Revision: https://reviews.llvm.org/D35898 llvm-svn: 309320
* Fix implementation of OMP_THREAD_LIMITJonathan Peyton2017-07-277-20/+153
| | | | | | | | | | | | | | | | | | This change fixes the implementation of OMP_THREAD_LIMIT. The implementation of this previously was not restricted to a contention group (but it should be, according to the spec), and this is fixed here. A field is added to root thread to store a counter of the threads in the contention group. An extra check is added when reserving threads for a parallel region that checks this variable and compares to threadlimit-var, which is implemented as a new global variable, kmp_cg_max_nth. Associated settings changes were also made, and clean up of comments that referred to OMP_THREAD_LIMIT, but should refer to the new KMP_DEVICE_THREAD_LIMIT (added in an earlier patch). Patch by Terry Wilmarth Differential Revision: https://reviews.llvm.org/D35912 llvm-svn: 309319
* Revert "[sanitizers] Sanitizer tests CMake clean up"George Karpenkov2017-07-274-9/+64
| | | | | | | | This reverts commit 0ab44db2aa1cd3710355ad79b04f954ce68c0b3a. Fails on some bots, reverting until I can fix it. llvm-svn: 309318
* Add test to reject merging of empty manifest.Eric Beckmann2017-07-272-2/+9
| | | | | | | | | | Reviewers: ruiu, rnk Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D35954 llvm-svn: 309317
* [ARM] Add use-misched feature, to enable the MachineScheduler.Florian Hahn2017-07-273-8/+16
| | | | | | | | | | | | | | | | | | | Summary: This change makes it easier to experiment with the MachineScheduler in the ARM backend and also makes it very explicit which CPUs use the MachineScheduler (currently only swift and cyclone). Reviewers: MatzeB, t.p.northover, javed.absar Reviewed By: MatzeB Subscribers: aemerson, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D35935 llvm-svn: 309316
* Change prefix in vector-shuffle-combining-avx.patch to reduce test size.Dinar Temirbulatov2017-07-271-511/+6
| | | | llvm-svn: 309315
* [Headers] Add a test for arm64intr.hMartin Storsjo2017-07-271-0/+4
| | | | | | | | | This tests the ARM64 specific constants added in SVN r309081, similar to the one added in r277928 for armintr.h. Differential Revision: https://reviews.llvm.org/D35934 llvm-svn: 309314
* [MergeFunctions] Remove alias support.whitequark2017-07-271-47/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The alias support was dead code since 2011. It was last touched in r124182, where it was reintroduced after being removed in r110434, and since then it was gated behind a HasGlobalAliases flag that was permanently stuck as `false`. It is also broken. I'm not sure if it bitrotted or was just broken in the first place because it appears to have never been tested, but the following IR results in a crash: define internal i32 @a(i32 %a, i32 %b) unnamed_addr { %c = add i32 %a, %b %d = xor i32 %a, %c ret i32 %c } define internal i32 @b(i32 %a, i32 %b) unnamed_addr { %c = add i32 %a, %b %d = xor i32 %a, %c ret i32 %c } It seems safe to remove buggy untested code that no one cared about for seven years. Differential Revision: https://reviews.llvm.org/D34802 llvm-svn: 309313
* [lit] Fix TestRunner unit test on WindowsBrian Gesiak2017-07-271-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Normally Python converts all newline characters, Windows or Unix, to Unix newlines when opening a file. However, lit opens files in binary mode, which does not perform this conversion. As a result, trailing Windows newlines are not stripped from test input, which caused a failure in the TestRunner unit test: ``` FAIL: test_custom (__main__.TestIntegratedTestKeywordParser) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Users\bgesiak\src\llvm\llvm\utils\lit\tests\unit\TestRunner.py", line 109, in test_custom self.assertItemsEqual(value, ['a', 'b', 'c']) AssertionError: Element counts were not equal: First has 1, Second has 0: 'c\r' First has 0, Second has 1: 'c' ``` Fix the discrepancy in behavior across the two platforms by manually stripping Windows newlines before yielding each line in the test file. Reviewers: echristo, beanz, ddunbar, delcypher, rnk Reviewed By: rnk Subscribers: mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D27746 llvm-svn: 309312
* Merge OutputSectionCommand and OutputSection.Rafael Espindola2017-07-2711-733/+619
| | | | | | | | | | | | | This is a bit of a hack, but it is *so* convenient. Now that we create synthetic linker scripts when none is provided, we always have to handle paired OutputSection and OutputsectionCommand and keep a mapping from one to the other. This patch simplifies things by merging them and creating what used to be OutputSectionCommands really early. llvm-svn: 309311
* Un-revert "Teach the CMake build system to run lit's test suite. These can ↵Brian Gesiak2017-07-274-2/+51
| | | | | | | | | | | | | | | | | | | | | | be run" Summary: Depends on https://reviews.llvm.org/D35879. This reverts rL257268, which in turn was a revert of rL257221. https://reviews.llvm.org/D35879 marks the tests in the lit test suite that fail on Windows as XFAIL, which should allow these tests to pass on Windows-based buildbots. Reviewers: delcypher, beanz, mgorny, jroelofs, rnk Reviewed By: mgorny Subscribers: rnk, ddunbar, george.karpenkov, llvm-commits Differential Revision: https://reviews.llvm.org/D35880 llvm-svn: 309310
* [OPENMP] Allow all lvalues in 'depend' clause.Alexey Bataev2017-07-2716-94/+99
| | | | | | | According to upcoming OpenMP 5.0 all addressable lvalue expressions are allowed in deoend clause. llvm-svn: 309309
* Revert r264998 and r265035.Akira Hatanaka2017-07-274-25/+11
| | | | | | | | | | r303175 made changes to have __cxa_allocate_exception return a 16-byte aligned pointer, so it's no longer necessary to specify a lower alignment (8-bytes) for exception objects on Darwin. rdar://problem/32363695 llvm-svn: 309308
* Disable the deduction guide test I added in 309296 for the moment, while I ↵Marshall Clow2017-07-271-0/+4
| | | | | | figure out which compilers don't support deduction guides llvm-svn: 309307
* [sanitizers] Sanitizer tests CMake clean upGeorge Karpenkov2017-07-274-64/+9
| | | | | | | | | | | | | | | | | This patch addresses two issues: Most of the time, hacks with `if/else` in order to get support for multi-configuration builds are superfluous. The variable `CMAKE_CFG_INTDIR` was created precisely for this purpose: it expands to `.` on all single-configuration builds, and to a configuration name otherwise. The `if/else` hacks for the library name generation should also not be done, as CMake has `TARGET_FILE` generator expression precisely for this purpose, as it expands to the exact filename of the resulting target. Differential Revision: https://reviews.llvm.org/D35952 llvm-svn: 309306
* [FunctionImport] Prefer isa<> to dyn_cast<> as the value is not used.Davide Italiano2017-07-271-1/+1
| | | | | | This change makes GCC7 happy again. llvm-svn: 309305
* [InstCombine] Simplify pointer difference subtractions (GEP-GEP) where GEPs ↵Hiroshi Yamauchi2017-07-273-4/+110
| | | | | | | | | | | | | | | | | | | | | have other uses and one non-constant index Summary: Pointer difference simplifications currently happen only if input GEPs don't have other uses or their indexes are all constants, to avoid duplicating indexing arithmetic. This patch enables cases with exactly one non-constant index among input GEPs to happen where there is no duplicated arithmetic or code size increase even if input GEPs have other uses. For example, this patch allows "(&A[42][i]-&A[42][0])" --> "i", which didn't happen previously, if the input GEP(s) have other uses. Reviewers: sanjoy, bkramer Reviewed By: sanjoy Subscribers: mcrosier, llvm-commits Differential Revision: https://reviews.llvm.org/D35499 llvm-svn: 309304
* [PDB] Write public symbol records and the publics hash tableReid Kleckner2017-07-2713-68/+306
| | | | | | | | | | | | | | Summary: MSVC link.exe records all external symbol names in the publics stream. It provides similar functionality to an ELF .symtab. Reviewers: zturner, ruiu Subscribers: hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D35871 llvm-svn: 309303
* [SelectionDAG] Improve DAGTypeLegalizer::convertMask assertion (PR33960)Simon Pilgrim2017-07-272-12/+48
| | | | | | Improve DAGTypeLegalizer::convertMask's isSETCCorConvertedSETCC assertion to properly check for any mixture of SETCC or BUILD_VECTOR of constants, or a logical mask op of them. llvm-svn: 309302
* Tiny docs fixHans Wennborg2017-07-271-1/+1
| | | | llvm-svn: 309300
* [X86] SET0 to use XMM registers where possible PR26018 PR32862Dinar Temirbulatov2017-07-2785-625/+1525
| | | | | | Differential Revision: https://reviews.llvm.org/D35839 llvm-svn: 309298
* Relax the matching in these testsAdam Nemet2017-07-272-4/+4
| | | | | | | | | | | | Looks like the template arguments are displayed differently depending on the host compiler(?). E.g.: InnerAnalysisManagerProxy<CGSCCAnalysisManager InnerAnalysisManagerProxy<llvm::AnalysisManager<llvm::LazyCallGraph::SCC, ... Fix fallout after r309294 llvm-svn: 309297
* Implement P0739R0: 'Some improvements to class template argument deduction ↵Marshall Clow2017-07-275-9/+18
| | | | | | integration into the standard library' This is an API change (not ABI change) due to a late change in the c++17 standard llvm-svn: 309296
* [clangd] Don't reverse priorities of completion items.Ilya Biryukov2017-07-273-22/+18
| | | | | | | | | | | | | | Summary: Current algorithm incorrectly provides completion results in a reverse order. Reviewers: krasimir, bkramer Reviewed By: krasimir Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D35950 llvm-svn: 309295
* [ICP] Migrate to OptimizationRemarkEmitterAdam Nemet2017-07-275-43/+66
| | | | | | | | | | | | | | | | | | | | | This is a module pass so for the old PM, we can't use ORE, the function analysis pass. Instead ORE is created on the fly. A few notes: - isPromotionLegal is folded in the caller since we want to emit the Function in the remark but we can only do that if the symbol table look-up succeeded. - There was good test coverage for remarks in this pass. - promoteIndirectCall uses ORE conditionally since it's also used from SampleProfile which does not use ORE yet. Fixes PR33792. Differential Revision: https://reviews.llvm.org/D35929 llvm-svn: 309294
* [OptRemark] Allow streaming of 64-bit integersAdam Nemet2017-07-273-1/+9
| | | | llvm-svn: 309293
* [lit] Fix order of checks in shtest-shell.py testBrian Gesiak2017-07-272-0/+10
| | | | | | | | | | | | | | | | | | Summary: An expectation in `utils/lit/tests/Inputs/shtest-shell/redirects.txt` expects that first a string printed to stdout is seen, and then a string printed to stderr. Add `flush()` calls to ensure that stdout is printed before stderr, as expected. Reviewers: rnk, mgorny, jroelofs Reviewed By: rnk Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D35947 llvm-svn: 309292
* All libcalls should be considered to be GC-leaf functions.Daniel Neilson2017-07-276-13/+88
| | | | | | | | | | | | | | | | | | Summary: It is possible for some passes to materialize a call to a libcall (ex: ldexp, exp2, etc), but these passes will not mark the call as a gc-leaf-function. All libcalls are actually gc-leaf-functions, so we change llvm::callsGCLeafFunction() to tell us that available libcalls are equivalent to gc-leaf-function calls. Reviewers: sanjoy, anna, reames Reviewed By: anna Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D35840 llvm-svn: 309291
OpenPOWER on IntegriCloud