summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* [WebAssembly] Disable the store-results optimization.Dan Gohman2016-08-187-154/+70
| | | | | | | | | | The WebAssemly spec removing the return value from store instructions, so remove the associated optimization from LLVM. This patch leaves the store instruction operands in place for now, so stores now always write to "$drop"; these will be removed in a seperate patch. llvm-svn: 279100
* [Assumptions] Make collecting ephemeral values not quadratic in theChandler Carruth2016-08-181-23/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | number of assume intrinsics. The classical way to have a cache-friendly vector style container when we need queue semantics for BFS instead of stack semantics for DFS is to use an ever-growing vector and an index. Erasing from the front requires O(size) work, and unless we expect the worklist to grow *very* large, its probably cheaper to just grow and race down the list. But that makes it more bad that we're putting the assume intrinsics in this at all. We end up looking at the (by definition empty) use list to see if they're ephemeral (when we've already put them in that set), etc. Instead, directly populate the worklist with the operands when we mark the assume intrinsics as ephemeral. Also, test the visited set *before* putting things into the worklist so we don't accumulate the same value in the list 100s of times. It would be nice to use a set-vector for this but I think its useful to test the set earlier to avoid repeatedly querying whether the same instruction is safe to speculate. Hopefully with these changes the number of values pushed onto the worklist is smaller, and we avoid quadratic work by letting it grow as necessary. Differential Revision: https://reviews.llvm.org/D23396 llvm-svn: 279099
* Fix -Wpessimizing-move error, NFCVedant Kumar2016-08-181-1/+1
| | | | llvm-svn: 279095
* [InstCombine] clean up foldICmpUDivConstant; NFCSanjay Patel2016-08-181-16/+12
| | | | | | | 1. Better variable names 2. Remove unnecessary check of ConstantInt llvm-svn: 279094
* Reapply "ADT: Remove references in has_rbegin for reverse()"Duncan P. N. Exon Smith2016-08-182-12/+74
| | | | | | | | | | | | | | | | | | | | | | | This reverts commit r279086, reapplying r279084. I'm not sure what I ran before, because the compile failure for ADTTests reproduced locally. The problem is that TestRev is calling BidirectionalVector::rbegin() when the BidirectionalVector is const, but rbegin() is always non-const. I've updated BidirectionalVector::rbegin() to be callable from const. Original commit message follows. -- As a follow-up to r278991, add some tests that check that decltype(reverse(R).begin()) == decltype(R.rbegin()), and get them passing by adding std::remove_reference to has_rbegin. I'm using static_assert instead of EXPECT_TRUE (and updated the other has_rbegin check from r278991 in the same way) since I figure that's more helpful. llvm-svn: 279091
* Resubmit "Write the TPI stream from a PDB to Yaml."Zachary Turner2016-08-1828-260/+2059
| | | | | | | | The original patch was breaking some buildbots due to an incorrect ordering of function definitions which caused some compilers to recognize a definition but others to not. llvm-svn: 279089
* llvm-objdump: add coff import library symbol listing supportSaleem Abdulrasool2016-08-185-0/+55
| | | | | | | | | | This adds behaviour similar to binutils' objdump which can show symbols in an import library. Differences from that stem around the fact that we do not create section symbols nor the all import import descriptor symbol reference. However, this does mean that the tool can serve as a possible replacement for the existing tool. llvm-svn: 279088
* Revert "ADT: Remove references in has_rbegin for reverse()"Duncan P. N. Exon Smith2016-08-182-69/+7
| | | | | | | This reverts commit r279084, since it failed on a bot: http://bb.pgr.jp/builders/cmake-llvm-x86_64-linux/builds/41733 llvm-svn: 279086
* ADT: Remove references in has_rbegin for reverse()Duncan P. N. Exon Smith2016-08-182-7/+69
| | | | | | | | | | | | As a follow-up to r278991, add some tests that check that decltype(reverse(R).begin()) == decltype(R.rbegin()), and get them passing by adding std::remove_reference to has_rbegin. I'm using static_assert instead of EXPECT_TRUE (and updated the other has_rbegin check from r278991 in the same way) since I figure that's more helpful. llvm-svn: 279084
* CVP. Turn marking adds as no wrap (introduced by r278107) off by defaultArtur Pilipenko2016-08-182-1/+6
| | | | | | It causes a regression on our internal benchmark. Introduce cvp-dont-process flag and set it off by default while investigating the regression. llvm-svn: 279082
* [AArch64][GlobalISel] Select floating-point binary ops.Ahmed Bougacha2016-08-183-0/+283
| | | | | | There is no FREM instruction, but the others are straightforward. llvm-svn: 279081
* [GlobalISel] Add floating-point binary ops.Ahmed Bougacha2016-08-184-5/+129
| | | | llvm-svn: 279080
* [IRCE] Switch over to LLVM_DUMP_METHOD. NFCI.Davide Italiano2016-08-181-2/+1
| | | | llvm-svn: 279079
* [ARM] Correct ARMv8*-A optional extension definitions in TargetParserRichard Barton2016-08-182-6/+5
| | | | | | | | | | | | | | | | | | | | | The ARMv8*-A descriptions in the ARM and AArch64 TargetParsers are incorrect architecturally and mismatched to the backend descriptions. RAS is an optional extension to ARMv8-A and ARMv8.1-A and mandatory in ARMv8.2-A. Correct the ARMTargetParser descriptions which had this as enabled by default in the earlier versions. The FP16 and SPE extensions are optional in ARMv8.2-A and the backend defaults them as off. They are not available as extensions to earlier ARMv8-A versions. Correct the AArch64TargetParser which had these as enabled by default in all ARMv8-A definitions. These macros are only used to define preprocessor macros. There are no macros yet as ACLE has not caught up with ARMv8.2-A so not possible to add a test. Differential Revision: https://reviews.llvm.org/D23500 llvm-svn: 279078
* [InstCombine] use m_APInt to allow icmp (mul X, Y), C folds for splat ↵Sanjay Patel2016-08-182-21/+15
| | | | | | | | | | | | constant vectors This is a sibling of: https://reviews.llvm.org/rL278859 https://reviews.llvm.org/rL278935 https://reviews.llvm.org/rL278945 https://reviews.llvm.org/rL279066 llvm-svn: 279077
* [WebAssembly] Refactor WebAssemblyLowerEmscriptenException pass for ↵Derek Schuff2016-08-186-133/+191
| | | | | | | | | | | | | | | | | | | | | | setjmp/longjmp This patch changes the code structure of WebAssemblyLowerEmscriptenException pass to support both exception handling and setjmp/longjmp. It also changes the name of the pass and the source file. 1. Change the file/pass name to WebAssemblyLowerEmscriptenExceptions -> WebAssemblyLowerEmscriptenEHSjLj to make it clear that it supports both EH and SjLj 2. List function / global variable names at the top so they can be changed easily 3. Some cosmetic changes Patch by Heejin Ahn Differential Revision: https://reviews.llvm.org/D23588 llvm-svn: 279075
* [AArch64][GlobalISel] Select G_SDIV/G_UDIV.Ahmed Bougacha2016-08-183-1/+137
| | | | | | | | There is no REM instruction; that will require an expansion. It's not obvious that should be done in select, rather than as a (custom?) legalization. llvm-svn: 279074
* [GlobalISel] Add support for DIV/REM.Ahmed Bougacha2016-08-184-4/+102
| | | | llvm-svn: 279073
* [InstCombine] use APInt in isSignTest instead of ConstantInt; NFCSanjay Patel2016-08-181-6/+7
| | | | | | | This will enable vector splat folding, but NFC until the callers have their ConstantInt restrictions removed. llvm-svn: 279072
* llvm-readobj: handle import libraries with -coff-exportsSaleem Abdulrasool2016-08-183-0/+24
| | | | | | | | `link -dump -exports` lists exported symbols from import libraries as well as normal dlls. Ensure that we can handle import libraries as well in llvm-readobj. llvm-svn: 279069
* fix typo; NFCSanjay Patel2016-08-181-1/+1
| | | | llvm-svn: 279068
* [Hexagon] Create vcombine in HexagonCopyToCombineKrzysztof Parzyszek2016-08-182-18/+112
| | | | llvm-svn: 279067
* [InstCombine] use m_APInt to allow icmp (xor X, Y), C folds for splat ↵Sanjay Patel2016-08-185-29/+16
| | | | | | | | | | | constant vectors This is a sibling of: https://reviews.llvm.org/rL278859 https://reviews.llvm.org/rL278935 https://reviews.llvm.org/rL278945 llvm-svn: 279066
* [X86][SSE] Add SSE1 tests to make sure we don't merge loads on illegal typesSimon Pilgrim2016-08-181-123/+499
| | | | llvm-svn: 279065
* [mips] Correct tail call encoding for MIPSR6Simon Dardis2016-08-1811-41/+74
| | | | | | | | | | | | | r277708 enabled tails calls for MIPS but used the 'jr' instruction when the jump target was held in a register. For MIPSR6, 'jalr $zero, $reg' should have been used. Additionally, add missing patterns for external and global symbols for tail calls. Reviewers: dsanders, vkalintiris Differential Review: https://reviews.llvm.org/D23301 llvm-svn: 279064
* [Reassociate] Add test for PR28367.Chad Rosier2016-08-181-0/+28
| | | | llvm-svn: 279063
* (Trivial) TargetPassConfig: assert when TargetMachine has no MCAsmInfoAlex Bradbury2016-08-181-1/+3
| | | | | | | | | | | | | | | Summary: This is a pretty trivial, but I thought it was worth just checking that nobody feels it's completely the wrong thing to be doing. The motivation is that when starting a new backend, you often start with a minimal stub, pretty much just FooTargetMachine and FooTargetInfo. Once that's built, you might naturally try `llc -march=foo myinput.ll` and it seems more developer-friendly if this ends up asserting due to the lack of MCAsmInfo with an informative message rather than just segfaulting. Reviewers: MatzeB, chandlerc Subscribers: bogner, llvm-commits Differential Revision: https://reviews.llvm.org/D23443 llvm-svn: 279061
* Remove trailing whitespaceSimon Pilgrim2016-08-181-9/+9
| | | | llvm-svn: 279054
* Revert "ADT: Remove UB in ilist (and use a circular linked list)"Diana Picus2016-08-183-243/+287
| | | | | | | This reverts commit r278974 which broke some of our bots (e.g. clang-cmake-aarch64-42vma, clang-cmake-aarch64-full). llvm-svn: 279053
* Revert "ADT: Tidy up ilist_traits static asserts, NFC"Diana Picus2016-08-182-33/+19
| | | | | | | This reverts commit r279012. r278974 broke some bots, I have to revert this to get to it. llvm-svn: 279052
* [Docs] More MemorySSA doc updates!George Burgess IV2016-08-181-5/+5
| | | | | | Thanks again to Michael Kuperstein for the feedback. llvm-svn: 279032
* Testcase for r279022Matthias Braun2016-08-181-0/+24
| | | | llvm-svn: 279031
* Revert r279016 -- it breaks win32-elf JIT tests.Lang Hames2016-08-182-4/+4
| | | | llvm-svn: 279029
* [sanitizer-coverage/libFuzzer] instrument comparisons with ↵Kostya Serebryany2016-08-184-12/+75
| | | | | | __sanitizer_cov_trace_cmp[1248] instead of __sanitizer_cov_trace_cmp, don't pass the comparison type to save a bit performance. Use these new callbacks in libFuzzer llvm-svn: 279027
* Fix bot failure due to new testTeresa Johnson2016-08-181-1/+1
| | | | | | | I had updated the output file name but not the corresponding nm based check before submitting as r279023. This should fix the bot failures llvm-svn: 279025
* [ThinLTO] Keep common symbols in ThinLTO modulesTeresa Johnson2016-08-184-1/+59
| | | | | | | | | | | | | | | | | | | | Summary: Skip the merging of common symbols for ThinLTO modules, they will be merged by the final native object link. Trying to merge the symbols and add to a combined module will incorrectly enable the common symbol to be internalized in the ThinLTO module. Additionally, we will not want to create a combined module for ThinLTO distributed builds. This fixes failures in 7 cpu2006 benchmarks from the new LTO API in ThinLTO mode. Reviewers: mehdi_amini Subscribers: pcc, llvm-commits, mehdi_amini Differential Revision: https://reviews.llvm.org/D23637 llvm-svn: 279023
* TailDuplicator: Fix crash after r278974Matthias Braun2016-08-181-1/+1
| | | | | | | | Some inputs would after r278974 without this fix (see http://lab.llvm.org:8080/green/job/clang-stage2-cmake-RgSan_build/2733/console for an example) llvm-svn: 279022
* [LTO] Promote before performing weak resolutionMehdi Amini2016-08-182-2/+15
| | | | | | | | | | | | | | | | Summary: This was reversed compared to ThinLTOCodeGenerator for some reason, and lead to an increased code-size on my tests. I figured that the weak resolution may internalize a linkonce function, which will be promoted immediately (and renamed), before being internalized again. Reviewers: tejohnson Subscribers: pcc, llvm-commits, mehdi_amini Differential Revision: https://reviews.llvm.org/D23632 llvm-svn: 279021
* [asan] Add support of lifetime poisoning into ComputeASanStackFrameLayoutVitaly Buka2016-08-184-33/+48
| | | | | | | | | | | | | | | Summary: We are going to combine poisoning of red zones and scope poisoning. PR27453 Reviewers: kcc, eugenis Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D23623 llvm-svn: 279020
* [RuntimeDyld] Strip leading '_' from symbols on 32-bit windows inLang Hames2016-08-182-4/+4
| | | | | | | | | | | RTDyldMemoryManager::getSymbolAddressInProcess() This should allow JIT'd code for win32 to find in-process symbols. See http://llvm.org/PR28699 . Patch by James Holderness. Thanks James! llvm-svn: 279016
* [LTO] Change addSaveTemps API: do not add dot to the supplied prefix pathMehdi Amini2016-08-186-12/+12
| | | | | | | | | | | | | | | | Summary: It does not play well with directories (end up with a bunch of hidden files). Also, do not strip the 0 suffix for the first task, especially since 0 can be used by ThinLTO as well now. Reviewers: tejohnson Subscribers: mehdi_amini, pcc, llvm-commits Differential Revision: https://reviews.llvm.org/D23612 llvm-svn: 279014
* ADT: Tidy up ilist_traits static asserts, NFCDuncan P. N. Exon Smith2016-08-172-19/+33
| | | | | | | | | | | | Change the ilist traits to use decltype instead of sizeof, and add HasObsoleteCustomization so that additions to this list don't need to be added in two places. I suspect this will now work with MSVC, since the trait tested in r278991 seems to work. If for some reason it continues to fail on Windows I'll follow up by adding back the #ifndef _MSC_VER. llvm-svn: 279012
* [WebAssembly] Handle debug information and virtual registers without ↵Dominic Chen2016-08-175-3/+82
| | | | | | | | | | | | | | crashing (reland r278967) Summary: Currently, enabling debug information when compiling for WebAssembly crashes the backend. This commit fixes these by skipping debug values in backend passes. Reviewers: jfb, aprantl, dschuff, echristo Subscribers: llvm-commits, dschuff, jfb, MatzeB, dexonsmith, yurydelendik, mehdi_amini Differential Revision: https://reviews.llvm.org/D23635 llvm-svn: 279011
* [Docs] Update MemorySSA doc to address more feedback.George Burgess IV2016-08-171-34/+38
| | | | | | | | | Primarily, this clarifies wording in a few places, and adds "\ "s to make the formatting of things like "``Foo`` s" better. Thanks to Michael Kuperstein for the comments. llvm-svn: 279007
* [libFuzzer] force proper popcnt instructionKostya Serebryany2016-08-172-1/+3
| | | | llvm-svn: 279002
* Make llvm-pdbdump print column info when availableAdrian McCarthy2016-08-171-0/+9
| | | | | | | | | | llvm-pdbdump already had code to retrieve column information in the line tables, but it wasn't using it. Most Microsoft PDBs don't seem to have column info, so this wasn't missed. But Clang includes column info by default (at least for now), and being able to see that is useful for ensuring we get the column info correct. Differential Revision: https://reviews.llvm.org/D23629 llvm-svn: 279001
* Actually enable new test for const RangeAdapter. Missing from r278991Pete Cooper2016-08-171-1/+2
| | | | llvm-svn: 279000
* SCEV: Don't assert about non-SCEV-able value in isSCEVExprNeverPoison() ↵Hans Wennborg2016-08-172-0/+53
| | | | | | | | (PR28932) Differential Revision: https://reviews.llvm.org/D23594 llvm-svn: 278999
* [LoopUnroll] Move a simple check earlier. NFC.Haicheng Wu2016-08-171-5/+5
| | | | | | | | Move the check of CallInst earlier to skip expensive recursive operations. Differential Revision: https://reviews.llvm.org/D23611 llvm-svn: 278998
* [LV] Move LoopBodyTraits to a better place, and add comment for simplifying ↵Tim Shen2016-08-172-57/+60
| | | | | | | | | | | | | | LoopBlocksTraversal. NFC. Summary: I later (after r278573) found that LoopIterator.h has some overlapping with LoopBodyTraits. It's good to use LoopBodyTraits because a *Traits struct is algorithm independent. Reviewers: anemet, nadav, mkuper Subscribers: mzolotukhin, llvm-commits Differential Revision: https://reviews.llvm.org/D23529 llvm-svn: 278996
OpenPOWER on IntegriCloud