summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* [x86] autoupgrade and remove AVX2 integer min/max intrinsicsSanjay Patel2016-06-162-16/+10
| | | | | | | This will (hopefully very temporarily) break clang. The clang side of this should be the next commit. llvm-svn: 272932
* [codeview] Use hashBufferV8 to verify all type records.Rui Ueyama2016-06-161-15/+15
| | | | | | Differential Revision: http://reviews.llvm.org/D21393 llvm-svn: 272930
* Resubmit "[pdb] Change type visitor pattern to be dynamic."Zachary Turner2016-06-167-246/+368
| | | | | | | There was a regression introduced during type stream merging when visiting a field list record. This has been fixed in this patch. llvm-svn: 272929
* Revert "[pdb] Change type visitor pattern to be dynamic."Zachary Turner2016-06-167-361/+251
| | | | | | | | This reverts commit fb0dd311e1ad945827b8ffd5354f4810e2be1579. This breaks some llvm-readobj tests. llvm-svn: 272927
* [pdb] Change type visitor pattern to be dynamic.Zachary Turner2016-06-167-251/+361
| | | | | | | | | | | | | | | This allows better catching of compiler errors since we can use the override keyword to verify that methods are actually overridden. Also in this patch I've changed from storing a boolean Error code everywhere to returning an llvm::Error, to propagate richer error information up the call stack. Reviewed By: ruiu, rnk Differential Revision: http://reviews.llvm.org/D21410 llvm-svn: 272926
* [PM] Revert the port of MergeLoadStoreMotion to the new pass manager.Davide Italiano2016-06-165-131/+133
| | | | | | | | Daniel Berlin expressed some real concerns about the port and proposed and alternative approach. I'll revert this for now while working on a new patch, which I hope to put up for review shortly. Sorry for the churn. llvm-svn: 272925
* [DSE] Minor style cleanup. NFC.Chad Rosier2016-06-161-12/+5
| | | | llvm-svn: 272922
* [DAG] Remove redundant FMUL in Newton-Raphson SQRT codeSanjay Patel2016-06-161-53/+86
| | | | | | | | | | | | | | | | | When calculating a square root using Newton-Raphson with two constants, a naive implementation is to use five multiplications (four muls to calculate reciprocal square root and another one to calculate the square root itself). However, after some reassociation and CSE the same result can be obtained with only four multiplications. Unfortunately, there's no reliable way to do such a reassociation in the back-end. So, the patch modifies NR code itself so that it directly builds optimal code for SQRT and doesn't rely on any further reassociation. Patch by Nikolai Bozhenov! Differential Revision: http://reviews.llvm.org/D21127 llvm-svn: 272920
* AMDGPU: Add v_mad 16-bit instructions definition.Wei Ding2016-06-162-0/+11
| | | | | | Differential Revision: http://reviews.llvm.org/D21362 llvm-svn: 272919
* Revert r272891 "[JumpThreading] Prevent dangling pointer problems in ↵Igor Laevsky2016-06-163-25/+5
| | | | | | | | BranchProbabilityInfo" It was causing failures in Profile-i386 and Profile-x86_64 tests. llvm-svn: 272912
* [PATCH] Fix RuntimeDyldCOFFI386 to handle relocations with a non-zero addendReid Kleckner2016-06-161-3/+21
| | | | | | | | | This fixes IMAGE_REL_I386_DIR32, IMAGE_REL_I386_DIR32NB, IMAGE_REL_I386_SECREL, and IMAGE_REL_I386_REL32 relocations. Based on patch by Jon Turney <jon.turney@dronecode.org.uk> llvm-svn: 272911
* Don't print (PLT) on arm.Rafael Espindola2016-06-165-32/+4
| | | | | | | | | The R_ARM_PLT32 relocation is deprecated and is not produced by MC. This means that the code being deleted is dead from the .o point of view and was making the .s more confusing. llvm-svn: 272909
* [x86] autoupgrade and remove SSE2/SSE41 integer min/max intrinsicsSanjay Patel2016-06-162-12/+36
| | | | | | | | Follow-up to: http://reviews.llvm.org/rL272806 http://reviews.llvm.org/rL272807 llvm-svn: 272907
* Refactor duplicated code. NFC.Rafael Espindola2016-06-161-3/+1
| | | | llvm-svn: 272905
* Refactor duplicated code. NFC.Rafael Espindola2016-06-161-6/+5
| | | | llvm-svn: 272904
* Refactor duplicated code. NFC.Rafael Espindola2016-06-161-4/+5
| | | | llvm-svn: 272903
* Refactor duplicated code. NFC.Rafael Espindola2016-06-161-3/+5
| | | | llvm-svn: 272901
* [codeview] Pass CVRecord to visitTypeBegin callback.Rui Ueyama2016-06-163-27/+18
| | | | | | | | | Both parameters to visitTypeBegin are actually members of CVRecord, so we can just pass CVRecord instead of destructuring it. Differential Revision: http://reviews.llvm.org/D21435 llvm-svn: 272899
* [codeview] Remove unused parameter.Rui Ueyama2016-06-163-64/+42
| | | | | | Differential Revision: http://reviews.llvm.org/D21433 llvm-svn: 272898
* [mips] Fix small typo. NFC.Vasileios Kalintiris2016-06-161-1/+1
| | | | llvm-svn: 272895
* Implement pdb::hashBufferV8 hash function.Rui Ueyama2016-06-162-10/+55
| | | | llvm-svn: 272894
* [JumpThreading] Prevent dangling pointer problems in BranchProbabilityInfoIgor Laevsky2016-06-163-5/+25
| | | | | | | | | We should update results of the BranchProbabilityInfo after removing block in JumpThreading. Otherwise we will get dangling pointer inside BranchProbabilityInfo cache. Differential Revision: http://reviews.llvm.org/D20957 llvm-svn: 272891
* Remove redundant namespace specifiers.Rui Ueyama2016-06-161-9/+9
| | | | llvm-svn: 272889
* [codeview] Use CVTypeVisitor instead of a hand-written switch-cases.Rui Ueyama2016-06-161-68/+64
| | | | | | Differential Revision: http://reviews.llvm.org/D21418 llvm-svn: 272888
* PR27938: Don't remove valid DebugLoc in ScalarizerPatrik Hagglund2016-06-161-1/+2
| | | | | | | | | | | | | | | | | Added checks to make sure the Scalarizer::transferMetadata() don't remove valid debug locations from instructions. This is important as the verifier pass require that e.g. inlinable callsites have a valid debug location. https://llvm.org/bugs/show_bug.cgi?id=27938 Patch by Karl-Johan Karlsson Reviewers: dblaikie Differential Revision: http://reviews.llvm.org/D20807 llvm-svn: 272884
* [mips][mips16] Fix machine verifier errors about incorrect register classes ↵Daniel Sanders2016-06-167-161/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | on load/stores. Summary: [ls][bh] and [ls][bh]u cannot use sp-relative addresses and must therefore lower frameindex nodes such that there is a copy to a CPU16Regs register. This is now done consistently using a separate addressing mode that does not permit frameindex nodes. As part of this I've had to remove an optimization that reduced the number of instructions needed to work around the lack of sp-relative addresses on [ls][bh] and [ls][bh]u. This optimization used one of the eight CPU16Regs registers as a copy of the stack pointer and it's implementation was the root cause of many of the register vs register class mismatches. lw/sw can use sp-relative addresses but we ought to ensure that we use the correct version of lw/sw internally for things like IAS. This is not currently the case and this change does not fix this. However, this change does clean it up sufficiently well to fix the machine verifier failures. Also removed irrelevant functions from stchar.ll. Reviewers: sdardis Subscribers: dsanders, sdardis, llvm-commits Differential Revision: http://reviews.llvm.org/D21062 llvm-svn: 272882
* [llvm-objdump] Support detection of feature bits from the object and ↵Daniel Sanders2016-06-162-2/+70
| | | | | | | | | | | | | | | | | | | | implement this for Mips. Summary: The Mips implementation only covers the feature bits described by the ELF e_flags so far. Mips stores additional feature bits such as MSA in the .MIPS.abiflags section. Also fixed a small bug this revealed where microMIPS wouldn't add the EF_MIPS_MICROMIPS flag when using -filetype=obj. Reviewers: echristo, rafael Subscribers: rafael, mehdi_amini, dsanders, sdardis, llvm-commits Differential Revision: http://reviews.llvm.org/D21125 llvm-svn: 272880
* [LAA] Rename Strides to SymblicStrides in analyzeLoop. NFCAdam Nemet2016-06-161-7/+8
| | | | | | This is to facilitate to move of SymblicStrides from LV to LAA. llvm-svn: 272879
* [LAA] Default getInfo to not speculate symbolic strides. NFCAdam Nemet2016-06-164-6/+4
| | | | | | | Soon we won't be passing Strides to getInfo and then we'll have fewer call sites to update. llvm-svn: 272878
* [mips][micromips] Implement DCLO, DCLZ, DROTR, DROTR32 and DROTRV instructionsHrvoje Varga2016-06-165-86/+134
| | | | | | Differential Revision: http://reviews.llvm.org/D16917 llvm-svn: 272876
* Attempt to define friend function more portably.Sean Silva2016-06-161-16/+5
| | | | | | Patch written by Reid. I verified it locally with clang. llvm-svn: 272875
* SimplifyCFG is able to detect the pattern:Chuang-Yu Cheng2016-06-161-4/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (i == 5334 || i == 5335) to: ((i & -2) == 5334) This transformation has some incorrect side conditions. Specifically, the transformation is only applied when the right-hand side constant (5334 in the example) is a power of two not equal and not equal to the negated mask. These side conditions were added in r258904 to fix PR26323. The correct side condition is that: ((Constant & Mask) == Constant)[(5334 & -2) == 5334]. It's a little bit hard to see why these transformations are correct and what the side conditions ought to be. Here is a CVC3 program to verify them for 64-bit values: ONE : BITVECTOR(64) = BVZEROEXTEND(0bin1, 63); x : BITVECTOR(64); y : BITVECTOR(64); z : BITVECTOR(64); mask : BITVECTOR(64) = BVSHL(ONE, z); QUERY( (y & ~mask = y) => ((x & ~mask = y) <=> (x = y OR x = (y | mask))) ); Please note that each pattern must be a dual implication (<--> or iff). One directional implication can create spurious matches. If the implication is only one-way, an unsatisfiable condition on the left side can imply a satisfiable condition on the right side. Dual implication ensures that satisfiable conditions are transformed to other satisfiable conditions and unsatisfiable conditions are transformed to other unsatisfiable conditions. Here is a concrete example of a unsatisfiable condition on the left implying a satisfiable condition on the right: mask = (1 << z) (x & ~mask) == y --> (x == y || x == (y | mask)) Substituting y = 3, z = 0 yields: (x & -2) == 3 --> (x == 3 || x == 2) The version of this code before r258904 had no side-conditions and incorrectly justified itself in comments through one-directional implication. Thanks to Chandler for the suggestion! Author: Thomas Jablin (tjablin) Reviewers: chandlerc majnemer hfinkel cycheng http://reviews.llvm.org/D21417 llvm-svn: 272873
* [X86] Pre-size some SmallVectors using the constructor in the shuffle ↵Craig Topper2016-06-161-18/+13
| | | | | | lowering code instead of using push_back. Some of these already did this but used resize or assign instead of the constructor. NFC llvm-svn: 272872
* [X86] Remove else after return. NFCCraig Topper2016-06-161-3/+2
| | | | llvm-svn: 272871
* [X86] Inline a couple lambdas into their callers since they are only used ↵Craig Topper2016-06-161-6/+2
| | | | | | once and it all fits on a single line. NFC llvm-svn: 272869
* [InstCombine] Don't widen metadata on store-to-load forwardingEli Friedman2016-06-162-3/+8
| | | | | | | | | | | | | The original check for load CSE or store-to-load forwarding is wrong when the forwarded stored value happened to be a load. Ref https://github.com/JuliaLang/julia/issues/16894 Differential Revision: http://reviews.llvm.org/D21271 Patch by Yichao Yu! llvm-svn: 272868
* Fix test from D21194Vitaly Buka2016-06-161-2/+1
| | | | | | Bot sets ASAN_OPTIONS=handle_abort=1 which prevents expected crash. llvm-svn: 272866
* AArch64: allow MOV (imm) alias to be printedTim Northover2016-06-163-18/+93
| | | | | | | | | The backend has been around for years, it's pretty ridiculous that we can't even use the preferred form for printing "MOV" aliases. Unfortunately, TableGen can't handle the complex predicates when printing so it's a bunch of nasty C++. Oh well. llvm-svn: 272865
* Debugging D21194 issues on botVitaly Buka2016-06-161-0/+1
| | | | llvm-svn: 272863
* Tidy the asm parser: 80-col, whitespace.Eric Christopher2016-06-161-8/+14
| | | | llvm-svn: 272861
* Enable libFuzzer's afl_driver to append stderr to a file.Vitaly Buka2016-06-164-0/+56
| | | | | | | | | | | | | | | | | | | Summary: [libFuzzer] Enable afl_driver to append stderr to a user specified file. Append stderr of afl_driver to the file specified by the environmental variable AFL_DRIVER_STDERR_DUPLICATE_FILENAME if it is set. This lets users see outputs on crashes without rerunning crashing test cases (which won't work for crashes that are difficult to reproduce). Before this patch, stderr would only be sent to afl-fuzz and users would have no way of seeing it. Reviewers: llvm-commits, aizatsky, kcc, vitalybuka Subscribers: vitalybuka Differential Revision: http://reviews.llvm.org/D21194 llvm-svn: 272858
* [IR] [DAE] Copy comdats during DAE, and don't copy comdats in ↵Justin Lebar2016-06-153-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | GlobalObject::copyAttributesFrom. Summary: This reverts the changes to Globals.cpp and IRMover.cpp in "[IR] Copy comdats in GlobalObject::copyAttributesFrom" (D20631, rL270743). The DeadArgElim test is left unchanged, and we change DAE to explicitly copy comdats. The reverted change breaks copyAttributesFrom when the destination lives in a different module from the source. The decision in D21255 was to revert this patch and handle comdat copying separately from copyAttributesFrom. Reviewers: majnemer, rnk Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D21403 llvm-svn: 272855
* [LV] Make the new getter return a const reference. NFCAdam Nemet2016-06-151-1/+3
| | | | | | | | | LoopVectorizationLegality holds a constant reference to LAI, so this will have to be const as well. Also added missed function comment. llvm-svn: 272851
* Address review feedbacks of AddDiscriminator changeXinliang David Li2016-06-151-4/+6
| | | | llvm-svn: 272850
* [DSE] Hoist a redundant check to simplify logic. NFC.Chad Rosier2016-06-151-12/+5
| | | | llvm-svn: 272849
* fix comments; NFCSanjay Patel2016-06-151-6/+3
| | | | llvm-svn: 272848
* [PM] Port Add discriminator pass to new PMXinliang David Li2016-06-154-9/+25
| | | | llvm-svn: 272847
* Typo. NFC.Chad Rosier2016-06-151-1/+1
| | | | llvm-svn: 272846
* [Codeview] Add a class for LF_UDT_MOD_SRC_LINE.Rui Ueyama2016-06-153-1/+25
| | | | | | Differential Revision: http://reviews.llvm.org/D21406 llvm-svn: 272843
* [PM] Remove unneded doFinalization() override from LoopVersioningLICM.Davide Italiano2016-06-151-4/+0
| | | | llvm-svn: 272842
OpenPOWER on IntegriCloud