summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Update lld documentation to mention PDB support.Zachary Turner2018-02-221-3/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D43636 llvm-svn: 325821
* Fix DataFlowSanitizer instrumentation pass to take parameter position ↵Peter Collingbourne2018-02-223-12/+153
| | | | | | | | | | | | | | changes into account for custom functions. When DataFlowSanitizer transforms a call to a custom function, the new call has extra parameters. The attributes on parameters must be updated to take the new position of each parameter into account. Patch by Sam Kerner! Differential Revision: https://reviews.llvm.org/D43132 llvm-svn: 325820
* [ThinLTO] Always create linked objects file for --thinlto-index-only=Vitaly Buka2018-02-225-29/+63
| | | | | | | | | | | | | | | Summary: ThinLTO indexing may decide to skip all objects. If we don't write something to the list build system may consider this as failure or linker can reuse a file from the previews build. Reviewers: pcc, tejohnson Subscribers: mehdi_amini, inglorion, eraman, hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D43415 llvm-svn: 325819
* [gold] Extract runLTO to avoid exit(0) from function with non-trivial ↵Vitaly Buka2018-02-221-17/+23
| | | | | | | | | | | | objects on the stack Reviewers: tejohnson, pcc Subscribers: inglorion, llvm-commits Differential Revision: https://reviews.llvm.org/D43537 llvm-svn: 325818
* [libFuzzer] Include TEMP_MAX_LEN in Fuzzer::PrintStats.Matt Morehouse2018-02-222-6/+6
| | | | | | | | | | | | Reviewers: kcc Reviewed By: kcc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D43597 llvm-svn: 325817
* [AlignmentFromAssumptions] Set source and dest alignments of memory ↵Daniel Neilson2018-02-224-52/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | intrinsiscs separately Summary: This change is part of step five in the series of changes to remove alignment argument from memcpy/memmove/memset in favour of alignment attributes. In particular, this changes the AlignmentFromAssumptions pass to cease using the old getAlignment()/setAlignment API of MemoryIntrinsic in favour of getting/setting source & dest specific alignments through the new API. This allows us to simplify some of the code in this pass and also be more aggressive about setting the source and destination alignments separately. Steps: Step 1) Remove alignment parameter and create alignment parameter attributes for memcpy/memmove/memset. ( rL322965, rC322964, rL322963 ) Step 2) Expand the IRBuilder API to allow creation of memcpy/memmove with differing source and dest alignments. ( rL323597 ) Step 3) Update Clang to use the new IRBuilder API. ( rC323617 ) Step 4) Update Polly to use the new IRBuilder API. ( rL323618 ) Step 5) Update LLVM passes that create memcpy/memmove calls to use the new IRBuilder API, and those that use use MemIntrinsicInst::[get|set]Alignment() to use [get|set]DestAlignment() and [get|set]SourceAlignment() instead. ( rL323886, rL323891, rL324148, rL324273, rL324278, rL324384, rL324395, rL324402, rL324626, rL324642, rL324653, rL324654, rL324773, rL324774, rL324781, rL324784, rL324955, rL324960 ) Step 6) Remove the single-alignment IRBuilder API for memcpy/memmove, and the MemIntrinsicInst::[get|set]Alignment() methods. Reference http://lists.llvm.org/pipermail/llvm-dev/2015-August/089384.html http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20151109/312083.html Reviewers: hfinkel, bollu, reames Reviewed By: reames Subscribers: reames, llvm-commits Differential Revision: https://reviews.llvm.org/D43081 llvm-svn: 325816
* [SelectionDAG] Move matchUnaryPredicate/matchBinaryPredicate into ↵Simon Pilgrim2018-02-223-62/+69
| | | | | | | | | | SelectionDAGNodes.h This allows us to improve vector constant matching in more DAG code (backends, TargetLowering etc.). Differential Revision: https://reviews.llvm.org/D43466 llvm-svn: 325815
* [CUDA] Added missing functions.Artem Belevich2018-02-221-0/+22
| | | | | | | | | Initial commit missed sincos(float), llabs() and few atomics that we used to pull in from device_functions.hpp, which we no longer include. Differential Revision: https://reviews.llvm.org/D43602 llvm-svn: 325814
* [clangd] Extend textDocument/didChange to specify whether diagnostics should ↵Eric Liu2018-02-223-2/+13
| | | | | | | | | | | | | | | | be generated. Summary: This would allow us to disable diagnostics when didChange is called but diagnostics are not wanted (e.g. code completion). Reviewers: sammccall Subscribers: klimek, ilya-biryukov, jkorous-apple, cfe-commits Differential Revision: https://reviews.llvm.org/D43634 llvm-svn: 325813
* [OPENMP] Require valid SourceLocation in function call, NFC.Alexey Bataev2018-02-222-8/+7
| | | | | | | Removed default empty SourceLocation argument from `emitCall` function and require valid location. llvm-svn: 325812
* [MC] Don't crash on modulo by zero (PR35650)Simon Pilgrim2018-02-222-2/+8
| | | | | | | | Extension to D12776, handle modulo by zero in the same way we handle divide by zero. Differential Revision: https://reviews.llvm.org/D43631 llvm-svn: 325810
* [ELF] - Rewrote outdated comment. NFC.George Rimar2018-02-221-2/+2
| | | | llvm-svn: 325809
* [IRBuilder] add creators for FP with FMF; NFCISanjay Patel2018-02-221-67/+98
| | | | | | | | | Also, add a helper for the constant folder to reduce duplication. It seems out-of-place for and/or to be doing simplifications here? Otherwise, I could have used the helper on those opcodes too. llvm-svn: 325808
* [docs] Regenerate command line referenceJonas Hahnfeld2018-02-221-16/+30
| | | | llvm-svn: 325807
* [docs] Improve help for OpenMP options, NFC.Jonas Hahnfeld2018-02-221-12/+15
| | | | | | | | | | | | * Add HelpText for -fopenmp so that it appears in clang --help. * Hide -fno-openmp-simd, only list the positive option. * Hide -fopenmp-relocatable-target and -fopenmp-use-tls from clang --help and from ClangCommandLineReference. * Improve MetaVarName for -Xopenmp-target=<...>. Differential Revision: https://reviews.llvm.org/D42841 llvm-svn: 325806
* [docs] Fix duplicate arguments for JoinedAndSeparateJonas Hahnfeld2018-02-221-7/+15
| | | | | | | | | We can't see how many arguments are in the meta var name, so just assume that it is the right number. Differential Revision: https://reviews.llvm.org/D42840 llvm-svn: 325805
* [X86][AVX512] Add DQ+VLX scalar int<->fp tests cases for D43441Simon Pilgrim2018-02-222-14/+20
| | | | llvm-svn: 325804
* [DEBUGINFO] Do not output labels for empty macinfo sections.Alexey Bataev2018-02-222-2/+29
| | | | | | | | | | | | | | Summary: If there is no debug info for macros, do not emit labels for empty macinfo sections. Reviewers: probinson, echristo Subscribers: aprantl, llvm-commits, JDevlieghere Differential Revision: https://reviews.llvm.org/D43589 llvm-svn: 325803
* Fix "not all control paths return a value" MSVC warning. NFCI.Simon Pilgrim2018-02-221-0/+1
| | | | llvm-svn: 325802
* [clangd] fix test use-after-free from r325774Sam McCall2018-02-221-4/+3
| | | | llvm-svn: 325801
* TableGen: Add strict assertions to sanity check earlier type checkingNicolai Haehnle2018-02-222-0/+5
| | | | | | | | | | | | | | | | Summary: Both of these errors should have been caught by type-checking during parsing. Change-Id: I891087936fd1a91d21bcda57c256e3edbe12b94d Reviewers: arsenm, craig.topper, tra, MartinO Subscribers: wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D43558 llvm-svn: 325800
* TableGen: Allow implicit casting between string and codeNicolai Haehnle2018-02-223-0/+41
| | | | | | | | | | | | | | | | | | | | | Summary: Perhaps the distinction between the two should be removed entirely in the long term, and the [{ ... }] syntax should just be a convenient way of writing multi-line strings. In the meantime, a lot of existing .td files are quite relaxed about string vs. code, and this change allows switching on more consistent type checks without breaking those. Change-Id: If85e3e04469e41b58e2703b62ac0032d2711713c Reviewers: arsenm, craig.topper, tra, MartinO Subscribers: wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D43557 llvm-svn: 325799
* TableGen: Fix type of resolved and converted listsNicolai Haehnle2018-02-222-16/+18
| | | | | | | | | | | | | | | | | Summary: There are no new test cases, but a subsequent patch will introduce assertions that would be triggered by existing test cases without this fix. Change-Id: I6a82d4b311b012aff3932978ae86f6a2dcfbf725 Reviewers: arsenm, craig.topper, tra, MartinO Subscribers: wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D43556 llvm-svn: 325798
* TableGen: Fix type deduction for !foreachNicolai Haehnle2018-02-222-0/+20
| | | | | | | | | | | | | | | | | Summary: In the case of !foreach(id, input-list, transform) where the type of input-list is list<A> and the type of transform is B, we now correctly deduce list<B> as the type of the !foreach. Change-Id: Ia19dd65eecc5991dd648280ba6a15f6a20fd61de Reviewers: arsenm, craig.topper, tra, MartinO Subscribers: wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D43555 llvm-svn: 325797
* TableGen: Generalize type deduction for !listconcatNicolai Haehnle2018-02-222-3/+15
| | | | | | | | | | | | | | | Summary: This way, it should work even with complex operands. Change-Id: Iaccf5bbb50bd5882a0ba5d59689e4381315fb361 Reviewers: arsenm, craig.topper, tra, MartinO Subscribers: wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D43554 llvm-svn: 325796
* TableGen: Add some more helpful error messagesNicolai Haehnle2018-02-221-5/+9
| | | | | | | | | | | | | Summary: Some fairly simple changes to start with. Reviewers: arsenm, craig.topper, tra, MartinO Subscribers: wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D43552 Change-Id: I0c92731b36d309c6edfcae42595ae1a70cc051c9 llvm-svn: 325795
* AMDGPU: Stop using .NAME in .td filesNicolai Haehnle2018-02-221-6/+6
| | | | | | | | | | | | | | | | | | | Summary: .NAME is a bit of an odd duck, in that we should really treat it like a template argument, but we currently don't, and so when and where NAME is initialized and how is pretty inconsistent. Best to just avoid using it as a field of already instantiated records, and use cast to string instead. Change-Id: I5a0c202401cede3d5c3827ab9c7858ea48b29108 Reviewers: arsenm, rampitec Subscribers: kzhuravl, wdng, yaxunl, dstuttard, tpr, t-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D43551 llvm-svn: 325794
* [RISCV] Implement c.lui immediate operand constraintShiva Chen2018-02-225-15/+52
| | | | | | | | | | | | Implement c.lui immediate constraint to [1, 31] and [0xfffe0, 0xfffff]. The RISC-V ISA describes the constraint as [1, 63], with that value being loaded in to bits 17-12 of the destination register and sign extended from bit 17. Therefore, this 6-bit immediate can represent values in the ranges [1, 31] and [0xfffe0, 0xfffff]. Differential Revision: https://reviews.llvm.org/D42834 llvm-svn: 325792
* [FunctionAttrs][ArgumentPromotion][GlobalOpt] Disable some optimisations ↵Luke Cheeseman2018-02-226-2/+86
| | | | | | | | | | | | | | passes for naked functions - Fix for bug 36078. - Prevent the functionattrs, function-attrs, globalopt and argpromotion passes from changing naked functions. - These passes can perform some alterations to the functions that should not be applied. An example is removing parameters that are seemingly not used because they are only referenced in the inline assembly. Another example is marking the function as fastcc. llvm-svn: 325788
* [InstCombine] add fmul multi-use test; NFCSanjay Patel2018-02-221-14/+33
| | | | | | Also, rename tests to make their intent clearer. llvm-svn: 325785
* [clangd] DidChangeConfiguration NotificationSimon Marchi2018-02-2213-0/+180
| | | | | | | | | | | | | | | | | | | | Summary: Implementation of DidChangeConfiguration notification handling in clangd. This currently only supports changing one setting: the path of the compilation database to be used for the current project. In other words, it is no longer necessary to restart clangd with a different command line argument in order to change the compilation database. Reviewers: malaperle, krasimir, bkramer, ilya-biryukov Subscribers: jkorous-apple, ioeric, simark, klimek, ilya-biryukov, arphaman, rwols, cfe-commits Differential Revision: https://reviews.llvm.org/D39571 Signed-off-by: Simon Marchi <simon.marchi@ericsson.com> Signed-off-by: William Enright <william.enright@polymtl.ca> llvm-svn: 325784
* [mips] Generate memory dependencies for byVal argumentsStefan Maksimovic2018-02-223-3/+34
| | | | | | | | | | | | | | | | | | | | | There were no memory dependencies made between stores generated when lowering formal arguments and loads generated when call lowering byVal arguments which made the Post-RA scheduler place a load before a matching store. Make the fixed object stored to mutable so that the load instructions can have their memory dependencies added Set the frame object as isAliased which clears the underlying objects vector in ScheduleDAGInstrs::buildSchedGraph(). This results in addition of all stores as dependenies for loads. This problem appeared when passing a byVal parameter coupled with a fastcc function call. Differential Revision: https://reviews.llvm.org/D37515 llvm-svn: 325782
* [clangd] Correct setting ignoreWarnings in CodeCompletion.Haojian Wu2018-02-222-4/+4
| | | | | | | | | | | | | | | | | | | | | | | Summary: We should set the flag before creating ComplierInstance -- when CopmilerInstance gets initialized, it also initializes the DiagnosticsEngine using the DiagnosticOptions. This was hidden deeply -- as clang suppresses all diagnostics when we hit the code-completion (but internally it does do unnecessary analysis stuff). As a bonus point, this fix will optmize the completion speed -- clang won't do any analysis (e.g. -Wunreachable-code, -Wthread-safety-analysisi) at all internally. Reviewers: ilya-biryukov Reviewed By: ilya-biryukov Subscribers: klimek, jkorous-apple, ioeric, cfe-commits Differential Revision: https://reviews.llvm.org/D43569 llvm-svn: 325779
* Syndicate duplicate code between CallInst and InvokeInstSerge Guelton2018-02-222-851/+490
| | | | | | | | NFC intended, syndicate common code to a parametric base class. Part of the original problem is that InvokeInst is a TerminatorInst, unlike CallInst. the problem is solved by introducing a parametrized class paramtertized by its base. Differential Revision: https://reviews.llvm.org/D40727 llvm-svn: 325778
* Fix Wdocumentation warning - remove param tag for old argumentSimon Pilgrim2018-02-221-2/+0
| | | | llvm-svn: 325777
* [RISCV][NFC] Make logic in RISCVMCCodeEmitter::getImmOpValue more defensiveAlex Bradbury2018-02-221-5/+13
| | | | | | | | | | | As pointed out by @sabuasal in a comment on D23568, the logic in RISCVMCCodeEmitter::getImmOpValue could be more defensive. Although with the current instruction definitions it is always the case that `VK_RISCV_LO` is always used with either an I- or S-format instruction, this may not always be the case in the future. Add a check to ensure we will get an assertion in debug builds if that changes. llvm-svn: 325775
* [clangd] Allow embedders some control over when diagnostics are generated.Sam McCall2018-02-228-80/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Through the C++ API, we support for a given snapshot version: - Yes: make sure we generate diagnostics for exactly this version - Auto: generate eventually-consistent diagnostics for at least this version - No: don't generate diagnostics for this version Eventually auto should be debounced for better UX. Through LSP, we force diagnostics for initial load (bypassing future debouncing) and all updates follow the "auto" policy. This is complicated to implement under the CancellationFlag design, so rewrote that part to just inspect the queue instead. It turns out we never pass None to the diagnostics callback, so remove Optional from the signature. The questionable behavior of not invoking the callback at all if CppFile::rebuild fails is not changed. Reviewers: ilya-biryukov Subscribers: klimek, jkorous-apple, ioeric, cfe-commits Differential Revision: https://reviews.llvm.org/D43518 llvm-svn: 325774
* [SLPVectorizer][X86] Add load extend tests (PR36091)Simon Pilgrim2018-02-222-0/+1696
| | | | llvm-svn: 325772
* [OpenCL] Add '-cl-uniform-work-group-size' compile optionAlexey Sotkin2018-02-229-3/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: OpenCL 2.0 specification defines '-cl-uniform-work-group-size' option, which requires that the global work-size be a multiple of the work-group size specified to clEnqueueNDRangeKernel and allows optimizations that are made possible by this restriction. The patch introduces the support of this option. To keep information about whether an OpenCL kernel has uniform work group size or not, clang generates 'uniform-work-group-size' function attribute for every kernel: - "uniform-work-group-size"="true" for OpenCL 1.2 and lower, - "uniform-work-group-size"="true" for OpenCL 2.0 and higher if '-cl-uniform-work-group-size' option was specified, - "uniform-work-group-size"="false" for OpenCL 2.0 and higher if no '-cl-uniform-work-group-size' options was specified. If the function is not an OpenCL kernel, 'uniform-work-group-size' attribute isn't generated. Patch by: krisb Reviewers: yaxunl, Anastasia, b-sumner Reviewed By: yaxunl, Anastasia Subscribers: nhaehnle, yaxunl, Anastasia, cfe-commits Differential Revision: https://reviews.llvm.org/D43570 llvm-svn: 325771
* [mips] Regenerate tests for D38128 (NFC)Simon Dardis2018-02-226-1468/+2787
| | | | llvm-svn: 325770
* [dsymutil] Remove \brief from comments. NFCJonas Devlieghere2018-02-224-29/+23
| | | | | | | With autobrief enabled, these server no purpose anymore. Most of them were already removed but this makes everything consistent. llvm-svn: 325769
* [dsymutil] Fix typos and formatting. NFC.Jonas Devlieghere2018-02-2210-254/+238
| | | | | | | Some over-due gardening: this fixes a bunch of typos and makes the formatting consistent with LLVM's style guide. llvm-svn: 325768
* Recommit: [ARM] f16 constant pool fixSjoerd Meijer2018-02-224-5/+115
| | | | | | | This recommits r325754; the modified and failing test case actually didn't need any modifications. llvm-svn: 325765
* [clangd] Not collect include headers for dynamic index for now.Eric Liu2018-02-226-36/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The new behaviors introduced by this patch: o When include collection is enabled, we always set IncludeHeader field in Symbol even if it's the same as FileURI in decl. o Disable include collection in FileIndex which is currently only used to build dynamic index. We should revisit when we actually want to use FileIndex to global index. o Code-completion only uses IncludeHeader to insert headers but not FileURI in CanonicalDeclaration. This ensures that inserted headers are always canonicalized. Note that include insertion can still be triggered for symbols that are already included if they are merged from dynamic index and static index, but we would only use includes that are already canonicalized (e.g. from static index). Reason for change: Collecting header includes in dynamic index enables inserting includes for headers that are not indexed but opened in the editor. Comparing to inserting includes for symbols in global/static index, this is nice-to-have but would probably require non-trivial amount of work to get right. For example: o Currently it's not easy to fully support CanonicalIncludes in dynamic index, given the way we run dynamic index. o It's also harder to reason about the correctness of include canonicalization for dynamic index (i.e. symbols in the current file/TU) than static index where symbols are collected offline and sanity check is possible before shipping to production. o We have less control/flexibility over symbol info in the dynamic index (e.g. URIs, path normalization), which could be used to help make decision when inserting includes. As header collection (especially canonicalization) is relatively new, and enabling it for dynamic index would immediately affect current users with only dynamic index support, I propose we disable it for dynamic index for now to avoid compromising other hot features like code completion and only support it for static index where include insertion would likely to bring more value. Reviewers: ilya-biryukov, sammccall, hokein Subscribers: klimek, jkorous-apple, cfe-commits Differential Revision: https://reviews.llvm.org/D43550 llvm-svn: 325764
* [ELF] - Introduce getInputSections() helper.George Rimar2018-02-225-40/+27
| | | | | | | | | | | We sometimes need to iterate over input sections for a given output section. It is not very convinent because we have to iterate over section descriptions. Patch introduces getInputSections helper, it simplifies things. Differential revision: https://reviews.llvm.org/D43574 llvm-svn: 325763
* [dsymutil] Replace PATH_MAX in SmallString with fixed value.Jonas Devlieghere2018-02-221-3/+3
| | | | | | | | | | | Apparently the Windows bots don't know this define, so just going with a sensible default. Failing builds: http://lab.llvm.org:8011/builders/lldb-x86-windows-msvc2015/builds/19179 http://lab.llvm.org:8011/builders/lld-x86_64-win7/builds/19263 llvm-svn: 325762
* [ARM] Fix issue with large xor constants.David Green2018-02-222-5/+31
| | | | | | | | | | Fixup to rL325573 for large xor constants. Thanks to Eli Friedman for the catch. Differential revision: https://reviews.llvm.org/D43549 llvm-svn: 325761
* [libcxx] Do not include the C math.h header before __configMikhail Maltsev2018-02-221-10/+16
| | | | | | | | | | | | | | | | | | | | | | Summary: Certain C libraries require configuration macros defined in __config to provide the correct functionality for libc++. This patch ensures that the C header math.h is always included after the __config header. It also adds a Windows-specific #if guard for the case when the C math.h file is included the second time, as suggested by Marshall in https://reviews.llvm.org/rL323490. Fixes PR36382. Reviewers: mclow.lists, EricWF Reviewed By: mclow.lists Subscribers: cfe-commits, pcc, christof, rogfer01 Differential Revision: https://reviews.llvm.org/D43579 llvm-svn: 325760
* [dsymutil] Be smarter in caching calls to realpathJonas Devlieghere2018-02-221-17/+44
| | | | | | | | | | | | | | | | | | | Calling realpath is expensive but necessary to perform the uniqueing in dsymutil. Although we already cached the results for every individual file in the line table, we had reports of it taking 40 seconds of a 3.5 minute link. This patch adds a second level of caching. When we do have to call realpath, we cache its result for its parents path. We didn't replace the existing caching, because it's fast (indexed) and saves us from reading the line table for entries we've already seen. For WebkitCore this results in a decrease of 11% in linking time: from 85.79 to 76.11 seconds (average over 3 runs). Differential revision: https://reviews.llvm.org/D43511 llvm-svn: 325757
* Revert r325754 and r325755 (f16 literal pool) because buildbots were unhappy.Sjoerd Meijer2018-02-225-117/+7
| | | | llvm-svn: 325756
OpenPOWER on IntegriCloud