summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [LangRef] Clarify semantics of load metadata.Eli Friedman2018-07-171-9/+12
| | | | | | | | | | | | | | | | We need to explicitly state what happens when an invariant promised by load metadata is violated at runtime, since it's come up repeatedly. It's possible we want to specify that the result of the load is poison in some cases, rather than undefined behavior, if the constraint is violated. That would allow preserving the metadata when the load is hoisted, but doesn't allow propagating metadata based on control flow. We currently do transforms based on control flow for nonnull metadata (in PromoteMemToReg). Differential Revision: https://reviews.llvm.org/D47854 llvm-svn: 337325
* [libFuzzer] Mutation tracking and logging implemented.Max Moroz2018-07-177-21/+55
| | | | | | | | | | | | | | | | | | | Summary: Code now exists to track number of mutations that are used in fuzzing in total and ones that produce new coverage. The stats are currently being dumped to the command line. Patch by Kodé Williams (@kodewilliams). Reviewers: metzman, Dor1s, morehouse, kcc Reviewed By: Dor1s, morehouse, kcc Subscribers: delcypher, kubamracek, kcc, morehouse, llvm-commits, #sanitizers, mgorny Differential Revision: https://reviews.llvm.org/D48054 llvm-svn: 337324
* [LangRef] nnan and ninf produce poison.Eli Friedman2018-07-171-4/+4
| | | | | | | | | Clarify that violating nnan and ninf can lead to undefined behavior. This allows more aggressive optimizations based on those assumptions. Differential Revision: https://reviews.llvm.org/D47963 llvm-svn: 337323
* [LangRef] Clarify which fast-math flags affect fcmp.Eli Friedman2018-07-171-1/+1
| | | | | | | nsz has no effect due to the way fcmp is defined; +0 and -0 compare equal anyway. reassoc could have the obvious effect. llvm-svn: 337322
* Remove unnecessary trailing ; in macro intrinsic definition.Eric Christopher2018-07-171-1/+1
| | | | llvm-svn: 337321
* [X86] Add patterns for folding full vector load into MOVHPS and MOVLPS with ↵Craig Topper2018-07-173-19/+26
| | | | | | SSE1 only. llvm-svn: 337320
* [X86] Add test case for missed opportunity to use MOVLPS on the SSE1 only ↵Craig Topper2018-07-171-0/+12
| | | | | | targets. llvm-svn: 337319
* [Demangle] Add missing header filesFangrui Song2018-07-171-0/+2
| | | | llvm-svn: 337318
* Add missing include.Zachary Turner2018-07-171-1/+2
| | | | llvm-svn: 337317
* Add some helper functions to the demangle utility classes.Zachary Turner2018-07-174-22/+136
| | | | | | | | | | | | | | These are all methods that, while not currently used in the Itanium demangler, are generally useful enough that it's likely the itanium demangler could find a use for them. More importantly, they are all necessary for the Microsoft demangler which is up and coming in a subsequent patch. Rather than combine these into a single monolithic patch, I think it makes sense to commit this utility code first since it is very simple, this way it won't detract from the substance of the MS demangler patch. llvm-svn: 337316
* [WebAssemlby] Set IsUsedInRegularObj correctly for undefined data symbolsSam Clegg2018-07-173-0/+56
| | | | | | Differential Revision: https://reviews.llvm.org/D49113 llvm-svn: 337314
* [builtins] Implement the __chkstk function for ARM for MinGWMartin Storsjo2018-07-172-0/+35
| | | | | | | | | | This function is available for linking in from kernel32.dll, but it's not allowed to link that function from there in Windows Store apps. Differential Revision: https://reviews.llvm.org/D49055 llvm-svn: 337313
* The semantics of DW_CFA_GNU_args_size have changed subtile over theJoerg Sonnenberger2018-07-172-3/+13
| | | | | | | | | | years. Adopt the new convention that it is call-site specific and that it should be applied before moving the IP by personality routines, but not during normal unwinding. Differential Revision: https://reviews.llvm.org/D38680 llvm-svn: 337312
* Invert dependency between lldb-framework and lldb-suiteAlex Langford2018-07-174-8/+10
| | | | | | | | | | | | | | | | | Summary: Currently, if you build lldb-framework the entire framework doesn't actually build. In order to build the entire framework, you need to actually build lldb-suite. This abstraction doesn't feel quite right because lldb-framework truly does depend on lldb-suite (liblldb + related tools). In this change I want to invert their dependency. This will mean that lldb and finish_swig will depend on lldb-framework in a framework build, and lldb-suite otherwise. Instead of adding conditional logic everywhere to handle this, I introduce LLDB_SUITE_TARGET to handle it. Differential Revision: https://reviews.llvm.org/D49406 llvm-svn: 337311
* [InstCombine] Preserve debug value when simplifying cast-of-selectVedant Kumar2018-07-172-1/+14
| | | | | | | | | | | | | | | | | | | | InstCombine has a cast transform that matches a cast-of-select: Orig = cast (Src = select Cond TV FV) And tries to replace it with a select which has the cast folded in: NewSel = select Cond (cast TV) (cast FV) The combiner does RAUW(Orig, NewSel), so any debug values for Orig would survive the transform. But debug values for Src would be lost. This patch teaches InstCombine to replace all debug uses of Src with NewSel (taking care of doing any necessary DIExpression rewriting). Differential Revision: https://reviews.llvm.org/D49270 llvm-svn: 337310
* Remove an errant piece of !dbg metadata from a test, NFCVedant Kumar2018-07-171-1/+1
| | | | llvm-svn: 337309
* [x86/SLH] Flesh out the data-invariant instruction table a bit based on ↵Chandler Carruth2018-07-172-9/+98
| | | | | | | | | | | | | | | | | | | | | | | | | feedback from Craig. Summary: The only thing he suggested that I've skipped here is the double-wide multiply instructions. Multiply is an area I'm nervous about there being some hidden data-dependent behavior, and it doesn't seem important for any benchmarks I have, so skipping it and sticking with the minimal multiply support that matches what I know is widely used in existing crypto libraries. We can always add double-wide multiply when we have clarity from vendors about its behavior and guarantees. I've tried to at least cover the fundamentals here with tests, although I've not tried to cover every width or permutation. I can add more tests where folks think it would be helpful. Reviewers: craig.topper Subscribers: sanjoy, mcrosier, hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D49413 llvm-svn: 337308
* [llvm-mca][x86] Add extend, carry-flag and CMP instructions to general ↵Simon Pilgrim2018-07-1710-10/+1200
| | | | | | x86_64 resource tests llvm-svn: 337306
* [llvm-mca][x86] Add MOVBE resource tests to all supporting targetsSimon Pilgrim2018-07-179-0/+462
| | | | | | SNB doesn't support MOVBE but the numbers in Generic (which use the SNB model) look sane. llvm-svn: 337305
* [analyzer] Fix Z3 backend after D48205Mikhail R. Gadelha2018-07-172-30/+30
| | | | | | | | | | | | | | | | | Summary: An assertion was added in D48205 to catch places where a `nonloc::SymbolVal` was wrapping a `loc` object. This patch fixes that in the Z3 backend by making the `SValBuilder` object accessible from inherited instances of `SimpleConstraintManager` and calling `SVB.makeSymbolVal(foo)` instead of `nonloc::SymbolVal(foo)`. Reviewers: NoQ, george.karpenkov Reviewed By: NoQ Subscribers: xazax.hun, szepet, a.sidorin Differential Revision: https://reviews.llvm.org/D49430 llvm-svn: 337304
* Revert rL337292 due to another MSVC STL problem.Florian Hahn2018-07-172-156/+0
| | | | llvm-svn: 337303
* [llvm-mca][x86] Add BSWAP resource testsSimon Pilgrim2018-07-1710-10/+80
| | | | llvm-svn: 337302
* [WebAssembly] Update WebAssemblyLowerEmscriptenEHSjLj to handle separate ↵Sam Clegg2018-07-173-72/+51
| | | | | | | | | | | | | | | | | | | | | compilation Previously we were assuming whole program compilation. Now that separate compilation is a thing we need to update this pass. Firstly, it can no longer assert on the existence of malloc and free. This functions might not be in the current translation unit. If we need them then we will generate not imports for them. Secondly the global helper function we create should be marked as weak since we will be generating a separate copy in each translation unit. Finally the names of the symbols used must be unique and fixed since they need to agree across translation units. Differential Revision: https://reviews.llvm.org/D49263 llvm-svn: 337301
* Add wasm-ld to help text Improve error textSam Clegg2018-07-171-1/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D48838 llvm-svn: 337300
* [X86] Remove some standalone patterns in favor of the patterns in the MOVLPD ↵Craig Topper2018-07-172-20/+2
| | | | | | | | instruction definitions. Previously we passed 'null_frag' into the instruction definition. The multiclass is shared with MOVHPD which doesn't use null_frag. It turns out by passing X86Movsd it produces patterns equivalent to some standalone patterns. llvm-svn: 337299
* [llvm-mca][x86] Add displacement-only and additional scale=1 LEA testsSimon Pilgrim2018-07-171-1/+82
| | | | llvm-svn: 337298
* [llvm-mca][x86] Add LEA resource tests (PR32326)Simon Pilgrim2018-07-171-0/+362
| | | | | | Add llvm-mca tests demonstrating how LEA instructions are currently modelled. Once this is working on btver2 I'll copy the test file to the other target directories. llvm-svn: 337297
* 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
OpenPOWER on IntegriCloud