summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* libFuzzer: prevent irrelevant strings from leaking into auto-dictionaryMatt Morehouse2018-07-178-28/+20
| | | | | | | | | | | | | | | | This is a fix for bug 37047. https://bugs.llvm.org/show_bug.cgi?id=37047 Implemented by basically reversing the logic. Previously all strings were considered, with some operations excluded. Now strings are excluded by default, and only strings during the CB considered. Patch By: pdknsk Differential Revision: https://reviews.llvm.org/D48800 llvm-svn: 337296
* [llvm-mca][docs] Revert mca internals docs.Matt Davis2018-07-171-98/+3
| | | | | | | | | We're going to work on this in a separate review focusing more on documenting the View and probably removing some of the less-interesting/less-useful pieces. This reverts r337219,337225 llvm-svn: 337295
* [Tablegen][PredicateExpander] Fix a bug in `expandCheckImmOperand`.Andrea Di Biagio2018-07-171-4/+4
| | | | | | | | | | Function `expandCheckImmOperand` should always check if the input machine instruction is passed by reference before calling method `getOperand()` on it. Found while working on a patch that relies on `expandCheckImmOperand` to expand a scheduling predicate. llvm-svn: 337294
* [AArch64][SVE]: Integer multiply-add/subtract instructions.Sander de Smalen2018-07-1710-0/+273
| | | | | | | | | | This patch adds support for the following instructions: MLA mul-add, writing addend (Zda = Zda + Zn * Zm) MLS mul-sub, writing addend (Zda = Zda + -Zn * Zm) MAD mul-add, writing multiplicant (Zdn = Za + Zdn * Zm) MSB mul-sub, writing multiplicant (Zdn = Za + -Zdn * Zm) llvm-svn: 337293
* Recommit r334887: [SmallSet] Add SmallSetIterator.Florian Hahn2018-07-172-0/+156
| | | | | | | Spell out destructor, copy/move constructor and assignment operators for MSVC STL, where set<T>::const_iterator is not trivially copy constructible. llvm-svn: 337292
* [CMake] Have check-lldb-unit use CMAKE_CURRENT_BINARY_DIRJonas Devlieghere2018-07-171-2/+3
| | | | | | | | | | | | | | | llvm-lit uses `map_config` directives (generated at configuration-time) to make it possible to pass a test path relative to the source instead of the build folder (CMAKE_CURRENT_BINARY_DIR). However, this doesn't work in the case of swift where the build directory layout prevents llvm-lit from knowing about lldb and its test paths. This caused check-lldb-unit to fail in this configuration, while everything was working as expected upstream. This patch fixes the issue by passing a path relative to the build directory. This was already the case for check-lldb-lit. llvm-svn: 337291
* clang-cl: Postpone Wmsvc-not-found emission until link.exe gets used.Nico Weber2018-07-172-2/+5
| | | | | | | | | | | | | | | | | Wmsvc-not-found was added in r297851 to help diagnose why link.exe can't be executed. However, it's emitted even when using -fuse-ld=lld, and in cross builds there's no way to get rid of the warning other than disabling it. Instead, emit it when we look up link.exe and it ends up not being executable. That way, when passing -fuse-ld=lld it will never be printed. It will also not be printed if we find link.exe on PATH. (We might want to eventually default to lld one day, at least when running on a non-Win host, but that's for another day.) Fixes PR38016. llvm-svn: 337290
* [Fixed Point Arithmetic] Fix for bug where integer literals could be treated ↵Leonard Chan2018-07-174-5/+105
| | | | | | | | | | | | | | | | as fixed point literals This addresses a bug brought up in https://bugs.llvm.org/show_bug.cgi?id=38161 where integer literals could be treated as fixed point types and throw errors related to fixed point types when the 'k' or 'r' suffix used. The fix also addresses the second issue brought up with the assertion by not treating integers as fixed point types in the first place. Integers that have suffixes 'k' and 'r' now throw the error `invalid suffix 'k/r' on integer constant`. A few more tests were also added to ensure that fixed point types, and any errors/warnings related to them, are limited to C for now. Prior discussion also at https://reviews.llvm.org/D46915. Differential Revision: https://reviews.llvm.org/D49327 llvm-svn: 337289
* [Mips][FastISel] Fix handling of icmp with i1 typePetar Jovanovic2018-07-173-2/+19
| | | | | | | | | | | The Mips FastISel back-end does not extend i1 values while lowering icmp. Ensure that we bail into DAG ISel when handling this case. Patch by Dragan Mladjenovic. Differential Revision: https://reviews.llvm.org/D49290 llvm-svn: 337288
* [ELF] - Eliminate dead 'return' in EhFrameSection::finalizeContents(). NFC.George Rimar2018-07-171-3/+1
| | | | | | | | | EhFrameSection::finalizeContents() is called from a single place: https://github.com/llvm-mirror/lld/blob/master/ELF/Writer.cpp#L1559 So code was dead. llvm-svn: 337287
* [clang-tidy: modernize] Fix modernize-use-equals-default with {} brackets ↵Idriss Riouak2018-07-172-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | list initialization: patch Summary: Hello, i would like to suggest a fix for one of the checks in clang-tidy. The bug was reported in https://bugs.llvm.org/show_bug.cgi?id=38039 where you can find more information. ``` struct UOB{ UOB(const UOB &Other):j{Other.j}{} int j; }; ``` In this case the check modernize-use-equals-default does not detect copy constructors that can be defaulted; that should be: ``` struct UOB{ UOB(const UOB &Other) = default; int j; }; ``` Reviewers: aaron.ballman, hokein, alexfh Reviewed By: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D49356 llvm-svn: 337286
* Remove superfluous ; to fix -Wpedantic warning from gccNico Weber2018-07-171-1/+1
| | | | llvm-svn: 337285
* [Tooling] Add operator== to CompileCommandSimon Marchi2018-07-172-0/+37
| | | | | | | | | | | | Summary: It does the obvious thing of comparing all fields. This will be needed for a clangd patch I have in the pipeline. Subscribers: dblaikie, ilya-biryukov, ioeric, cfe-commits Differential Revision: https://reviews.llvm.org/D49265 llvm-svn: 337284
* [IPSCCP] Run Solve each time we resolved an undef in a function.Florian Hahn2018-07-173-7/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Once we resolved an undef in a function we can run Solve, which could lead to finding a constant return value for the function, which in turn could turn undefs into constants in other functions that call it, before resolving undefs there. Computationally the amount of work we are doing stays the same, just the order we process things is slightly different and potentially there are a few less undefs to resolve. We are still relying on the order of functions in the IR, which means depending on the order, we are able to resolve the optimal undef first or not. For example, if @test1 comes before @testf, we find the constant return value of @testf too late and we cannot use it while solving @test1. This on its own does not lead to more constants removed in the test-suite, probably because currently we have to be very lucky to visit applicable functions in the right order. Maybe we manage to come up with a better way of resolving undefs in more 'profitable' functions first. Reviewers: efriedma, mssimpso, davide Reviewed By: efriedma, davide Differential Revision: https://reviews.llvm.org/D49385 llvm-svn: 337283
* [AArch64][SVE] Asm: FP fused multiply-add/subtract instructions.Sander de Smalen2018-07-1718-0/+695
| | | | | | | | | | | | | | | | | | This patch adds support for the following instructions: FMLA mul-add, writing addend (Zda = Zda + Zn * Zm) FNMLA negated mul-add, writing addend (Zda = -Zda + -Zn * Zm) FMLS mul-sub, writing addend (Zda = Zda + -Zn * Zm) FNMLS negated mul-sub, writing addend (Zda = -Zda + Zn * Zm) FMAD mul-add, writing multiplicant (Zdn = Za + Zdn * Zm) FNMAD negated mul-add, writing multiplicant (Zdn = -Za + -Zdn * Zm) FMSB mul-sub, writing multiplicant (Zdn = Za + -Zdn * Zm) FNMSB negated mul-sub, writing multiplicant (Zdn = -Za + Zdn * Zm) llvm-svn: 337282
* [ELF] - Remove dead code from EhFrameSection::addCie. NFC.George Rimar2018-07-171-5/+1
| | | | | | | | Code was dead because caller of the addCie() already checks that ID is equal to 0: https://github.com/llvm-mirror/lld/blob/master/ELF/SyntheticSections.cpp#L431 llvm-svn: 337281
* [SLPVectorizer] Don't attempt horizontal reduction on pointer types (PR38191)Simon Pilgrim2018-07-172-0/+130
| | | | | | TTI::getMinMaxReductionCost typically can't handle pointer types - until this is changed its better to limit horizontal reduction to integer/float vector types only. llvm-svn: 337280
* Revert "[Sema] Reword warning for constant captures that are not required"Benjamin Kramer2018-07-172-8/+8
| | | | | | | | This reverts commit r337152. This applies to non-constants too. The real explanation is that the capture is not ODR-used, but putting that into the warning message seems ... worse. llvm-svn: 337278
* Always use __mcount on NetBSD. Some platforms don't provide _mcount.Joerg Sonnenberger2018-07-173-12/+14
| | | | llvm-svn: 337277
* [ELF] - Eliminate dead code. NFC.George Rimar2018-07-171-2/+0
| | | | | | | | | Code was dead because at the moment of BssSection creation it can never have a parent. Also, code simply does not make sence as alignment adjastment happens when BssSection is added to its parent later. llvm-svn: 337276
* [ASTImporter] Fix poisonous structural equivalence cacheGabor Marton2018-07-175-33/+109
| | | | | | | | | | | | | | | | | | | | | Summary: Implementation functions call into the member functions of ASTStructuralEquivalence, thus they can falsely alter the DeclsToCheck state (they add decls). This results that some leaf declarations can be stated as inequivalent as a side effect of one inequivalent element in the DeclsToCheck list. And since we store the non-equivalencies, any (otherwise independent) decls will be rendered as non-equivalent. Solution: I tried to clearly separate the implementation functions (the static ones) and the public interface. From now on, the implementation functions do not call any public member functions, only other implementation functions. Reviewers: a.sidorin, a_sidorin, r.stahl Subscribers: rnkovacs, dkrupp, cfe-commits Differential Revision: https://reviews.llvm.org/D49300 llvm-svn: 337275
* For NetBSD, unwind data is emitted by default, so also enable frameJoerg Sonnenberger2018-07-172-0/+13
| | | | | | pointer optimisation by default when using optimisation. llvm-svn: 337274
* More fixes for subreg join failure in RegCoalescerTim Renouf2018-07-172-4/+340
| | | | | | | | | | | | | | | | | | | | | | Summary: Part of the adjustCopiesBackFrom method wasn't correctly dealing with SubRange intervals when updating. 2 changes. The first to ensure that bogus SubRange Segments aren't propagated when encountering Segments of the form [1234r, 1234d:0) when preparing to merge value numbers. These can be removed in this case. The second forces a shrinkToUses call if SubRanges end on the copy index (instead of just the parent register). V2: Addressed review comments, plus MIR test instead of ll test Subscribers: MatzeB, qcolombet, nhaehnle Differential Revision: https://reviews.llvm.org/D40308 Change-Id: I1d2b2b4beea802fce11da01edf71feb2064aab05 llvm-svn: 337273
* [AArch64][SVE] Asm: Support for predicated FP operations (FP immediate)Sander de Smalen2018-07-1711-0/+385
| | | | | | | | | | | | | | | | | | | | | | | | This patch completes support for the following floating point instructions that take FP immediates: FADD* (addition) FSUB (subtract) FSUBR (subtract reverse form) FMUL* (multiplication) FMAX* (maximum) FMAXNM (maximum number) FMIN (maximum) FMINNM (maximum number) All operations are predicated and take a FP immediate operand, e.g. fadd z0.h, p0/m, z0.h, #0.5 fmin z0.s, p0/m, z0.s, #1.0 ^___________^ (tied) * Instructions added in a previous patch. llvm-svn: 337272
* By popular demand, switch in64_t on NetBSD/AArch64 and NetBSD/PowerPC64Joerg Sonnenberger2018-07-174-45/+38
| | | | | | to long for consistency with other 64bit platforms. llvm-svn: 337271
* [NFC][testcases] add testcases for folding srem whose operands are negatived.Chen Zheng2018-07-171-0/+49
| | | | | | | Finish same optimization for add instruction in D49216 and sdiv instruction in D49382. This patch is for srem instruction. llvm-svn: 337270
* Don't assert that a size_t fits into 64bit.Joerg Sonnenberger2018-07-171-1/+0
| | | | | | Avoids tautological compare warnings on 32bit platforms. llvm-svn: 337269
* [ELF] - Add test for checking unknown -color-diagnostics arguments.George Rimar2018-07-171-0/+3
| | | | | | | This covers a following line with the test: https://github.com/llvm-mirror/lld/blob/master/ELF/DriverUtils.cpp#L73 llvm-svn: 337268
* [ASTImporter] Fix import of unnamed structsGabor Marton2018-07-173-8/+124
| | | | | | | | | | | | | | | Summary: D48773 simplified ASTImporter nicely, but it introduced a new error: Unnamed structs are not imported correctly, if they appear in a recursive context. This patch provides a fix for structural equivalency. Reviewers: a.sidorin, a_sidorin, balazske, gerazo Subscribers: rnkovacs, dkrupp, cfe-commits Differential Revision: https://reviews.llvm.org/D49296 llvm-svn: 337267
* [ELF] - Add a test for --no-warn-symbol-ordering.George Rimar2018-07-171-0/+5
| | | | | | | | | | Mentioned flag was never tested together with --call-graph-ordering-file. And the following line was uncovered: https://github.com/llvm-mirror/lld/blob/master/ELF/Symbols.cpp#L248 llvm-svn: 337266
* [ELF] - Simplify Symbol::getSize(). NFC.George Rimar2018-07-171-3/+1
| | | | | | | | | | There are following symbols currently available: DefinedKind, SharedKind, UndefinedKind, LazyArchiveKind, LazyObjectKind. Our code calls getSize() only for first two and there seems to be no reason to return 0 for the rest. llvm-svn: 337265
* [LLVM-C] Fix name mangling on AggressiveInstCombinewhitequark2018-07-171-0/+1
| | | | | | | | | | | | | | Similarly to rL336736, at least one more C API function does not properly get declared as extern "C" due to a missing header, causing name mangling and linking errors. This patch fixes calls to LLVMAddAggressiveInstCombinerPass(). Differential Revision: https://reviews.llvm.org/D49416 Reviewed By: whitequark llvm-svn: 337264
* [LLVM-C] Add target triple normalization to the C API.whitequark2018-07-172-0/+8
| | | | | | | | | | | | | | | | | | rL333307 was introduced to remove automatic target triple normalization when calling sys::getDefaultTargetTriple(), arguing that users of the latter already called Triple::normalize() if necessary. However, users of the C API currently have no way of doing target triple normalization. This patch introduces an LLVMNormalizeTargetTriple function to the C API which wraps Triple::normalize() and can be used on the result of LLVMGetDefaultTargetTriple to achieve the same effect. Differential Revision: https://reviews.llvm.org/D49414 Reviewed By: whitequark llvm-svn: 337263
* [llvm-objcopy] Run not with any python, but the python configured in lit.Benjamin Kramer2018-07-174-4/+4
| | | | llvm-svn: 337262
* Move pretty stack trace printer into driver.Jonas Devlieghere2018-07-174-4/+21
| | | | | | | | | | | | We used to have a pretty stack trace printer in SystemInitializerCommon. This was disabled on Apple because we didn't want the library to be setting signal handlers, as this was causing issues when loaded into Xcode. However, I think it's useful to have this for the LLDB driver, so I moved it up to use the PrettyStackTraceProgram in the driver's main. Differential revision: https://reviews.llvm.org/D49377 llvm-svn: 337261
* [ASTImporter] Import described template (if any) of function.Balazs Keri2018-07-172-1/+15
| | | | | | | | | | | | | | | | | Summary: When a function is imported, check if it has a described template. The name lookup is corrected to find the templated entity in this case. The described template of the function is imported too. Reviewers: a.sidorin, a_sidorin Reviewed By: a_sidorin Subscribers: a_sidorin, martong, cfe-commits Differential Revision: https://reviews.llvm.org/D49235 llvm-svn: 337260
* [AArch64][SVE] Asm: Support for predicated FP operations.Sander de Smalen2018-07-1728-0/+781
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the following floating point instructions: FABD (absolute difference) FADD (addition) FSUB (subtract) FSUBR (subtract reverse form) FDIV (divide) FDIVR (divide reverse form) FMAX (maximum) FMAXNM (maximum number) FMIN (minimum) FMINNM (minimum number) FSCALE (adjust exponent) FMULX (multiply extended) All operations are predicated and binary form, e.g. fadd z0.h, p0/m, z0.h, z1.h ^___________^ (tied) Supporting 16, 32 and 64-bit FP elements. llvm-svn: 337259
* [DAGCombiner] Call SimplifyDemandedVectorElts from EXTRACT_VECTOR_ELTSimon Pilgrim2018-07-1711-606/+366
| | | | | | | | If we are only extracting vector elements via EXTRACT_VECTOR_ELT(s) we may be able to use SimplifyDemandedVectorElts to avoid unnecessary vector ops. Differential Revision: https://reviews.llvm.org/D49262 llvm-svn: 337258
* Fix MSVC "result of 32-bit shift implicitly converted to 64 bits" warning. NFCI.Simon Pilgrim2018-07-171-2/+2
| | | | llvm-svn: 337257
* [ELF] - Check we able to report function symbols that encloses a location in ↵George Rimar2018-07-171-0/+14
| | | | | | | | | | | | error messages. InputSectionBase::getLocation() have the following block of the code which is uncovered by our test cases: https://github.com/llvm-mirror/lld/blob/master/ELF/InputSection.cpp#L238 Patch adds a test to trigger this branch. llvm-svn: 337256
* Temporarily revert r337226 "Restructure checking for, and warning on, ↵Florian Hahn2018-07-1723-483/+240
| | | | | | | | | | | | | | | | | | | | | | | | | | | lifetime extension." This change breaks on ARM because pointers to clang::InitializedEntity are only 4 byte aligned and do not have 3 bits to store values. A possible solution would be to change the fields in clang::InitializedEntity to enforce a bigger alignment requirement. The error message is llvm/include/llvm/ADT/PointerIntPair.h:132:3: error: static_assert failed "PointerIntPair with integer size too large for pointer" static_assert(IntBits <= PtrTraits::NumLowBitsAvailable, include/llvm/ADT/PointerIntPair.h:73:13: note: in instantiation of template class 'llvm::PointerIntPairInfo<const clang::InitializedEntity *, 3, llvm::PointerLikeTypeTraits<const clang::InitializedEntity *> >' requested here Value = Info::updateInt(Info::updatePointer(0, PtrVal), llvm/include/llvm/ADT/PointerIntPair.h:51:5: note: in instantiation of member function 'llvm::PointerIntPair<const clang::InitializedEntity *, 3, (anonymous namespace)::LifetimeKind, llvm::PointerLikeTypeTraits<const clang::InitializedEntity *>, llvm::PointerIntPairInfo<const clang::InitializedEntity *, 3, llvm::PointerLikeTypeTraits<const clang::InitializedEntity *> > >::setPointerAndInt' requested here setPointerAndInt(PtrVal, IntVal); ^ llvm/tools/clang/lib/Sema/SemaInit.cpp:6237:12: note: in instantiation of member function 'llvm::PointerIntPair<const clang::InitializedEntity *, 3, (anonymous namespace)::LifetimeKind, llvm::PointerLikeTypeTraits<const clang::InitializedEntity *>, llvm::PointerIntPairInfo<const clang::InitializedEntity *, 3, llvm::PointerLikeTypeTraits<const clang::InitializedEntity *> > >::PointerIntPair' requested here return {Entity, LK_Extended}; Full log here: http://lab.llvm.org:8011/builders/clang-cmake-armv7-global-isel/builds/1330 http://lab.llvm.org:8011/builders/clang-cmake-armv7-full/builds/1394 llvm-svn: 337255
* [ELF] - Fix BB. 'Filecheck' -> 'FileCheck'.George Rimar2018-07-171-1/+1
| | | | llvm-svn: 337254
* [AArch64][SVE] Asm: Support for SPLICE instruction.Sander de Smalen2018-07-174-0/+85
| | | | | | | | | | | | | | | | The SPLICE instruction splices two vectors into one vector using a predicate. It copies the active elements from the first vector, and then fills the remaining elements with the low-numbered elements from the second vector. The instruction has the following form, e.g. splice z0.b, p0, z0.b, z1.b for 8-bit elements. It also supports 16, 32 and 64-bit elements. llvm-svn: 337253
* [ELF] - Check we are able to report zlib decompressor errors.George Rimar2018-07-171-0/+11
| | | | | | | This test case adds a check for the following line of the code: https://github.com/llvm-mirror/lld/blob/master/ELF/InputSection.cpp#L194 llvm-svn: 337252
* [AArch64][SVE] Asm: Support for EXT instruction.Sander de Smalen2018-07-174-0/+74
| | | | | | | | | | | | | This patch adds an instruction that allows extracting a vector from a pair of vectors, given an immediate index that describes the element position to extract from. The instruction has the following assembly: ext z0.b, z0.b, z1.b, #imm where #imm is an immediate between 0 and 255. llvm-svn: 337251
* [ELF] - Check we are able to report errors when DW_AT_decl_file is invalid.George Rimar2018-07-171-0/+103
| | | | | | | | We did not try to support this intentionally but have an error handling and reporting logic that can take care of that and hence needs a test. llvm-svn: 337250
* Harden/relax clang/test/CodeGen/opt-record-MIR.c testRoman Lebedev2018-07-171-2/+3
| | | | | | | | | | | | | | | | | | Summary: If the build path is short, `Line` field can end up fitting on the same line as `File`, but the `{{.*}}` would consume it. Keeping in mind rL293149, i think we can fix it, while keeping it working when there are and there are not any quotations. At least this fixes this test for me. Reviewers: anemet, aaron.ballman, hfinkel Reviewed By: anemet Subscribers: cfe-commits, llvm-commits Differential Revision: https://reviews.llvm.org/D49348 llvm-svn: 337249
* [DependenceInfo] Use isl++ to replace foreach_set with for loopTobias Grosser2018-07-171-9/+13
| | | | llvm-svn: 337248
* [IslNodeBuilder] Use isl++ to replace foreach_set with for loopTobias Grosser2018-07-172-16/+15
| | | | llvm-svn: 337247
* [ScopInfo] Replace isl foreach calls with for loopsTobias Grosser2018-07-171-9/+16
| | | | llvm-svn: 337246
OpenPOWER on IntegriCloud