summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Remove name space pollution from Signals.cppKristof Beyls2017-03-313-5/+4
| | | | llvm-svn: 299224
* [mips][msa] Prevent output operand from commuting for dpadd_[su].df insPetar Jovanovic2017-03-312-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | Implementation of TargetInstrInfo::findCommutedOpIndices for MIPS target, restricting commutativity to second and third operand only for dpaadd_[su].df instructions therein. Prior to this change, there were cases where the vector that is to be added to the dot product of the other two could take a position other than the first one in the instruction, generating false output in the destination vector. Such behavior has been noticed in the two functions generating v2i64 output values so far. Other ones may exhibit such behavior as well, just not for the vector operands which are present in the test at the moment. Tests altered so that the function's first operand is a constant splat so that it can be loaded with a ldi instruction, since that is the case in which the erroneous instruction operand placement has occurred. We check that the register which is present in the ldi instruction is placed as the first operand in the corresponding dpadd instruction. Patch by Stefan Maksimovic. Differential Revision: https://reviews.llvm.org/D30827 llvm-svn: 299223
* Remove more name space pollution from .inc filesKristof Beyls2017-03-314-20/+16
| | | | llvm-svn: 299222
* [DAGCombiner] Add ComputeNumSignBits vector demanded elements support to ↵Simon Pilgrim2017-03-311-1/+35
| | | | | | | | ASHR and INSERT_VECTOR_ELT Followup to D31311 llvm-svn: 299221
* [SystemZ] Make sure of correct regclasses in insertSelect()Jonas Paulsson2017-03-311-0/+6
| | | | | | | | | Since LOCR only accepts GR32 virtual registers, its operands must be copied into this regclass in insertSelect(), when an LOCR is built. Otherwise, the case where the source operand was GRX32 will produce invalid IR. Review: Ulrich Weigand llvm-svn: 299220
* [DAGCombiner] Add vector demanded elements support to ComputeNumSignBitsSimon Pilgrim2017-03-316-12/+43
| | | | | | | | | | | | | | Currently ComputeNumSignBits returns the minimum number of sign bits for all elements of vector data, when we may only be interested in one/some of the elements. This patch adds a DemandedElts argument that allows us to specify the elements we actually care about. The original ComputeNumSignBits implementation calls with a DemandedElts demanding all elements to match current behaviour. Scalar types set this to 1. I've only added support for BUILD_VECTOR and EXTRACT_VECTOR_ELT so far, all others will default to demanding all elements but can be updated in due course. Followup to D25691. Differential Revision: https://reviews.llvm.org/D31311 llvm-svn: 299219
* Do not pollute the namespace in a header file.Kristof Beyls2017-03-311-1/+0
| | | | llvm-svn: 299218
* [SystemZ] Skip DAGCombining of vector node for older subtargets.Jonas Paulsson2017-03-311-0/+6
| | | | | | | | | | | | | Even on older subtargets that lack vector support, there may be vector values with just one element in the input program. These are converted during DAG legalization to scalar values. The pre-legalize SystemZ DAGCombiner methods should in this circumstance not touch these nodes. This patch adds a check for this in SystemZTargetLowering::combineEXTRACT_VECTOR_ELT(). Review: Ulrich Weigand llvm-svn: 299213
* Make naming in Host.h in line with coding standards.Kristof Beyls2017-03-312-12/+12
| | | | | | | Based on post-commit review comments by Chandler Carruth on https://reviews.llvm.org/D31236. Thanks! llvm-svn: 299211
* Update comment for r299098 per feedback from James Henderson.Yaron Keren2017-03-311-2/+1
| | | | llvm-svn: 299207
* [ScalarEvolution] Re-enable Predicate implication from operationsMax Kazantsev2017-03-311-16/+171
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch rL298481 was reverted due to crash on clang-with-lto-ubuntu build. The reason of the crash was type mismatch between either a or b and RHS in the following situation: LHS = sext(a +nsw b) > RHS. This is quite rare, but still possible situation. Normally we need to cast all {a, b, RHS} to their widest type. But we try to avoid creation of new SCEV that are not constants to avoid initiating recursive analysis that can take a lot of time and/or cache a bad value for iterations number. To deal with this, in this patch we reject this case and will not try to analyze it if the type of sum doesn't match with the type of RHS. In this situation we don't need to create any non-constant SCEVs. This patch also adds an assertion to the method IsProvedViaContext so that we could fail on it and not go further into range analysis etc (because in some situations these analyzes succeed even when the passed arguments have wrong types, what should not normally happen). The patch also contains a fix for a problem with too narrow scope of the analysis caused by wrong usage of predicates in recursive invocations. The regression test on the said failure: test/Analysis/ScalarEvolution/implied-via-addition.ll Reviewers: reames, apilipenko, anna, sanjoy Reviewed By: sanjoy Subscribers: mzolotukhin, mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D31238 llvm-svn: 299205
* Do not pollute the namespace in a header file.Kristof Beyls2017-03-311-7/+7
| | | | llvm-svn: 299203
* [AMDGPU] SDWA Peephole: improve search for immediates in SDWA patternsSam Kolton2017-03-314-43/+75
| | | | | | | | | | | | | | | | | Previously compiler often extracted common immediates into specific register, e.g.: ``` %vreg0 = S_MOV_B32 0xff; %vreg2 = V_AND_B32_e32 %vreg0, %vreg1 %vreg4 = V_AND_B32_e32 %vreg0, %vreg3 ``` Because of this SDWA peephole failed to find SDWA convertible pattern. E.g. in previous example this could be converted into 2 SDWA src operands: ``` SDWA src: %vreg2 src_sel:BYTE_0 SDWA src: %vreg4 src_sel:BYTE_0 ``` With this change peephole check if operand is either immediate or register that is copy of immediate. llvm-svn: 299202
* [DAGCombiner] Add vector demanded elements support to ↵Simon Pilgrim2017-03-3116-6/+18
| | | | | | | | | | computeKnownBitsForTargetNode Follow up to D25691, this sets up the plumbing necessary to support vector demanded elements support in known bits calculations in target nodes. Differential Revision: https://reviews.llvm.org/D31249 llvm-svn: 299201
* Spelling mistakes in comments. NFCI.Simon Pilgrim2017-03-312-2/+2
| | | | llvm-svn: 299197
* Fix MSVC 'not all control paths return a value' warningSimon Pilgrim2017-03-311-0/+1
| | | | llvm-svn: 299195
* Fix signed/unsigned warningSimon Pilgrim2017-03-311-1/+1
| | | | llvm-svn: 299194
* [Scalarizer] Handle scalar arguments in vector GEPMikael Holmen2017-03-311-3/+16
| | | | | | | | | | | | | | | | | | Summary: Triggered by commit r298620: "[LV] Vectorize GEPs". If we encounter a vector GEP with scalar arguments, we splat the scalar into a vector of appropriate size before we scatter the argument. Reviewers: arsenm, mehdi_amini, bkramer Reviewed By: arsenm Subscribers: bjope, mssimpso, wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D31416 llvm-svn: 299186
* Re-apply r299168 and r299169 now that the libdeps are fixed.Peter Collingbourne2017-03-313-127/+314
| | | | llvm-svn: 299184
* Move llvm::emitLinkerFlagsForGlobalCOFF() to Mangler.Peter Collingbourne2017-03-314-33/+33
| | | | llvm-svn: 299183
* Move llvm::canBeOmittedFromSymbolTable() to Analysis.Peter Collingbourne2017-03-313-20/+2
| | | | llvm-svn: 299182
* [libFuzzer] simplify the code a bitKostya Serebryany2017-03-313-17/+14
| | | | llvm-svn: 299180
* [libFuzzer] tests: don't test 64-bit comparison on 32-bit buildsKostya Serebryany2017-03-312-5/+7
| | | | llvm-svn: 299179
* [libFuzzer] ensure that strncmp is not inlined in a testKostya Serebryany2017-03-311-1/+2
| | | | llvm-svn: 299177
* Revert r299168 and r299169 due to library dependency issues.Peter Collingbourne2017-03-313-314/+127
| | | | | | http://bb.pgr.jp/builders/i686-mingw32-RA-on-linux/builds/25073/steps/build_llvmclang/logs/stdio llvm-svn: 299171
* LTO: Reduce memory consumption by creating an in-memory symbol table for ↵Peter Collingbourne2017-03-313-127/+314
| | | | | | | | | | | | | | | | | | | | | | | InputFiles. NFCI. Introduce symbol table data structures that can be potentially written to disk, have the LTO library build those data structures using temporarily constructed modules and redirect the LTO library implementation to go through those data structures. This allows us to remove the LLVMContext and Modules owned by InputFile. With this change I measured a peak memory consumption decrease from 5.4GB to 2.8GB in a no-op incremental ThinLTO link of Chromium on Linux. The impact on memory consumption is larger in COFF linkers where we are currently forced to materialize all metadata in order to read linker options. Peak memory consumption linking a large piece of Chromium for Windows with full LTO and debug info decreases from >64GB (OOM) to 15GB. Part of PR27551. Differential Revision: https://reviews.llvm.org/D31364 llvm-svn: 299168
* [libFuzzer] make sure we don't execute libFuzzer's mem* and str* hooks while ↵Kostya Serebryany2017-03-315-9/+17
| | | | | | calling mem*/str* inside libFuzzer itself llvm-svn: 299167
* Temporarily revert "[PPC] In PPCBoolRetToInt change the bool value to i64 if ↵Eric Christopher2017-03-313-37/+19
| | | | | | | | the target is ppc64" as it's causing test failures, I've given Carrot a testcase offline. This reverts commit r298955. llvm-svn: 299153
* Fix typo, defind -> defined.Eric Christopher2017-03-311-1/+1
| | | | llvm-svn: 299149
* [libFuzzer] try to fix value-profile-strncmp on the Mac botKostya Serebryany2017-03-311-1/+1
| | | | llvm-svn: 299145
* ModuleSummaryAnalysis: Use a more precise #include. NFC.Peter Collingbourne2017-03-311-1/+1
| | | | llvm-svn: 299142
* [WebAssembly] Initial linking metadata supportDan Gohman2017-03-307-36/+213
| | | | | | | | | | | | | | | | Add support for the new relocations and linking metadata section support in https://github.com/WebAssembly/tool-conventions/blob/master/Linking.md. In particular, this allows LLVM to indicate which variable is the stack pointer, so that it can be linked with other objects. This also adds support for emitting type relocations for call_indirect instructions. Right now, this is mainly tested by using wabt and hexdump to examine the output on selected testcases. We'll add more tests as the design stablizes and more of the pieces are in place. llvm-svn: 299141
* AMDGPU: Rename isKernelMatt Arsenault2017-03-303-6/+22
| | | | | | | | What we really want to do is distinguish functions that may be called by other functions, and graphics shaders are not called kernels. llvm-svn: 299140
* ThinLTOBitcodeWriter: Use Module::global_values(). NFCI.Peter Collingbourne2017-03-301-25/+7
| | | | llvm-svn: 299132
* getPristineRegs is not accurately considering shrink wrapping putsEric Christopher2017-03-303-2/+8
| | | | | | | | | | | registers not saved in certain blocks. Use explicit getCalleeSavedInfo and isLiveIn instead. This fixes pr32292. Patch by Tim Shen! llvm-svn: 299124
* [InstCombine] Fix typo last->least. NFCCraig Topper2017-03-301-3/+3
| | | | llvm-svn: 299123
* AMDGPU: Add all atomicrmw fields to atomic.inc/decMatt Arsenault2017-03-302-4/+13
| | | | | | Add scope, order, isVolatile llvm-svn: 299122
* [InstSimplify] Use m_SignBit instead of calling getSignBit and using ↵Craig Topper2017-03-301-4/+2
| | | | | | m_Specific. NFCI llvm-svn: 299121
* [InstSimplify] Use APInt::isMaxSignedValue() instead of comparing with ↵Craig Topper2017-03-301-1/+1
| | | | | | ~APInt::getSignBit. NFC llvm-svn: 299120
* [SimplifyIndvar] Replace the sdiv used by IV if we can prove both of its ↵Hongbin Zheng2017-03-301-4/+38
| | | | | | | | | | operands are non-negative Since there is no sdiv in SCEV, an 'udiv' is a better canonical form than an 'sdiv' as the user of induction variable Differential Revision: https://reviews.llvm.org/D31488 llvm-svn: 299118
* [AVX-512] Fix bad comment from r299112. NFCCraig Topper2017-03-301-1/+2
| | | | llvm-svn: 299114
* [AVX-512] Fix another case where fastisel was generating a GR8 to VK1 copy. ↵Craig Topper2017-03-301-2/+12
| | | | | | | | This time after calls returning i1. Fixes PR32472. llvm-svn: 299112
* [AMDGPU] Add GlobalOpt parameter to Always Inliner passStanislav Mekhanoshin2017-03-303-7/+11
| | | | | | | | | If set to false it does not remove global aliases. With this parameter set to false it should be safe to run the pass before link. Differential Revision: https://reviews.llvm.org/D31489 llvm-svn: 299108
* Teach stripNonLineTableDebugInfo() to remap DILocations in !llvm.loop nodes.Adrian Prantl2017-03-301-11/+20
| | | | llvm-svn: 299107
* [Object] Remove check for BIND_OPCODE_DONE/REBASE_OPCODE_DONE.Juergen Ributzka2017-03-301-12/+8
| | | | | | | | | | BIND_OPCODE_DONE/REBASE_OPCODE_DONE may appear at the end of the opcode array, but they are not required to. The linker only adds them as padding to align the opcodes to pointer size. This fixes rdar://problem/31285560. llvm-svn: 299104
* [AArch64ISelLowering] Remove `else` after `return` in LowerGlobalTLSAddress.Davide Italiano2017-03-301-1/+1
| | | | llvm-svn: 299103
* [AArch64] Simplify isSingExtended()/isZeroExtended(). NFCI.Davide Italiano2017-03-301-10/+4
| | | | llvm-svn: 299102
* [WebAssembly] Improve support for WebAssembly binary formatDerek Schuff2017-03-304-61/+926
| | | | | | | | | | | | | | | | | | | Mostly this change adds support converting to and from YAML which will allow us to write more test cases for the WebAssembly MC and lld ports. Better support for objdump, readelf, and nm will be in followup CLs. I had to update the two wasm test binaries because they used the old style 'name' section which is no longer supported. Differential Revision: https://reviews.llvm.org/D31099 Patch by Sam Clegg llvm-svn: 299101
* Following r297661, disable dup workaround to disable duplicate STDOUT fd ↵Yaron Keren2017-03-301-1/+8
| | | | | | | | | | | | | | | | closing and instead directly prevent closing of STD* file descriptors. We do not want to close STDOUT as there may have been several uses of it such as the case: llc %s -o=- -pass-remarks-output=- -filetype=asm which cause multiple closes of STDOUT_FILENO and/or use-after-close of it. Using dup() in getFD doesn't work as we end up with original STDOUT_FILENO open anyhow. reviewed by Rafael Espindola Differential Revision: https://reviews.llvm.org/D31505 llvm-svn: 299098
* [DAGCombiner] Initial support for the fast-math flag contractAdam Nemet2017-03-301-19/+31
| | | | | | | | | | | | | | | | Now alternatively to the TargetOption.AllowFPOpFusion global flag, FMUL->FADD can also use the per operation FMF to allow fusion. The idea here is not to port everything to the new scheme (e.g. fused multiply-and-sub will be ported later) but that this work all the way from clang. The transformation is conditionalized on *both* the FADD and the FMUL having the FMF contract flag. Differential Revision: https://reviews.llvm.org/D31169 llvm-svn: 299096
OpenPOWER on IntegriCloud