summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix TestSBData.py on WindowsAdrian McCarthy2018-02-221-1/+1
| | | | | | | | | Ensure that the test data is an array of bytes rather than a string that gets encoded differently between Python 2 and Python 3. Differential Revision: https://reviews.llvm.org/D43532 llvm-svn: 325835
* [Sema] Fix some Clang-tidy modernize and Include What You Use warnings; ↵Eugene Zelenko2018-02-227-255/+341
| | | | | | other minor fixes (NFC). llvm-svn: 325834
* Fix the build of the wasm backend.Benjamin Kramer2018-02-221-2/+2
| | | | | | | toString conflicts with llvm::toString here. Yay for overly generic function names. llvm-svn: 325833
* [InstrTypes] add frem and fneg with FMF creatorsSanjay Patel2018-02-221-0/+11
| | | | | | | | | The more popular opcodes were added at r325730, but we should have everything here for symmetry. I think both of these can be used in InstCombine already, but I'll make those changes as separate clean-ups for InstCombine. llvm-svn: 325832
* [DWARFv5] Turn an assert into a diagnostic. Hand-coded assembler filesPaul Robinson2018-02-229-48/+83
| | | | | | | | should not trigger assertions. Differential Revision: https://reviews.llvm.org/D43152 llvm-svn: 325831
* [ThinLTO/gold] Perform cache pruning when cache directory specifiedTeresa Johnson2018-02-222-3/+5
| | | | | | | | | | | | | | | Summary: As pointed out in the review for D37993, for consistency with other linkers, gold plugin should perform cache pruning whenever there is a cache directory specified, which will use the default cache policy. Reviewers: pcc Subscribers: llvm-commits, inglorion Differential Revision: https://reviews.llvm.org/D43389 llvm-svn: 325830
* [TargetLowering] Rename isCondCodeLegal to isCondCodeLegalOrCustom. Add real ↵Craig Topper2018-02-223-16/+20
| | | | | | | | | | | | | | | | isCondCodeLegal. Update callers to use one or the other. isCondCodeLegal internally checked Legal or Custom which is misleading. Though no targets set any cond code action to Custom today. So I've renamed isCondCodeLegal to isCondCodeLegalOrCustom and added a real isCondCodeLegal that only checks Legal. I've changed legalization code to use isCondCodeLegalOrCustom and left things reachable via DAG combine as isCondCodeLegal. I've also changed some places that called getCondCodeAction and compared to Legal to just use isCondCodeLegal. I'm looking at trying to keep SETCC all the way to isel for the AVX512 integer comparisons and I suspect I'll need to make some condition codes Custom to stop DAG combine from changing things post LegalizeOps. Prior to this only Expand stopped DAG combine, but that causes LegalizeOps to try to swap operands or invert rather than calling our Custom handler. Differential Revision: https://reviews.llvm.org/D43607 llvm-svn: 325829
* [PDB] Add missing override to silence buildbotsAaron Smith2018-02-221-1/+1
| | | | llvm-svn: 325828
* [X86] Make the subus special case in LowerVSETCC self containedCraig Topper2018-02-221-39/+49
| | | | | | | | | | Previously this code overrode the flags and opcode used by the later code in LowerVSETCC. This makes the code difficult to read and follow. This patch moves all the SUBUS code into its own function and makes it responsible for creating its own SDNodes on success. Differential Revision: https://reviews.llvm.org/D43530 llvm-svn: 325827
* [PDB] Fix buildbot failure from missing include for DIAEnumLineNumbersAaron Smith2018-02-221-0/+1
| | | | llvm-svn: 325826
* Revert "[DebugInfo][FastISel] Fix dropping dbg.value()"Sander de Smalen2018-02-223-61/+8
| | | | | | | | | This patch reverts r325440 and r325438 because it triggers an assertion in SelectionDAGBuilder.cpp. Also having debug enabled may unintentionally affect code-gen. The patch is reverted until we find a better solution. llvm-svn: 325825
* [PDB] Implement more find methods for PDB symbolsAaron Smith2018-02-226-0/+236
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Add additional find methods on PDB raw symbols. findChildrenByAddr() findChildrenByVA() findInlineFramesByAddr() findInlineFramesByVA() findInlineLines() findInlineLinesByAddr() findInlineLinesByRVA() findInlineLinesByVA() Reviewers: zturner, llvm-commits Reviewed By: zturner Differential Revision: https://reviews.llvm.org/D43637 llvm-svn: 325824
* [ThinLTO] Represent relative BF using a scaled representation .Easwaran Raman2018-02-223-16/+23
| | | | | | | | | | | | | | | Summary: The current integer representation of relative block frequency prevents representing relative block frequencies below 1. This change uses a 8 of the 29 bits to represent the decimal part by using a fixed scale of -8. Reviewers: tejohnson, davidxl Subscribers: mehdi_amini, inglorion, llvm-commits Differential Revision: https://reviews.llvm.org/D43520 llvm-svn: 325823
* [OpenMP] Limit reduction support for pragma 'distribute' when combined with ↵Carlo Bertolli2018-02-222-19/+107
| | | | | | | | | | | pragma 'simd' Differential Revision: https://reviews.llvm.org/D43513 This is a bug fix that removes the emission of reduction support for pragma 'distribute' when found alone or in combinations without simd. Pragma 'distribute' does not have a reduction clause, but when combined with pragma 'simd' we need to emit the support for simd's reduction clause as part of code generation for distribute. This guard is similar to the one used for reduction support earlier in the same code gen function. llvm-svn: 325822
* 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
OpenPOWER on IntegriCloud