summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert "[XRay][compiler-rt] Use a hand-written circular buffer in BufferQueue"Dean Michael Berris2017-10-033-88/+32
| | | | | | This reverts r314766 (rL314766). Unit tests fail in multiple bots. llvm-svn: 314786
* [clang-tidy] Fixed a small code example in docs. NFC.Gabor Horvath2017-10-031-1/+1
| | | | llvm-svn: 314785
* [CodeGen] Fix propagation of TBAA info for atomic accessesIvan A. Kosarev2017-10-031-4/+4
| | | | | | | | | | | | | This patch fixes clang to propagate complete TBAA information for atomic accesses and not just the final access types. Prepared against D38456 and requires it to be committed first. This is part of D37826 reworked to be a separate patch to simplify review. Differential Revision: https://reviews.llvm.org/D38460 llvm-svn: 314784
* [WebAssembly] MC: Support for init_array and fini_arraySam Clegg2017-10-032-3/+101
| | | | | | Differential Revision: https://reviews.llvm.org/D37757 llvm-svn: 314783
* [llvm-cov] Hide files with no coverage from the index when filtering by nameSean Eveson2017-10-038-12/+30
| | | | | | Differential Revision: https://reviews.llvm.org/D38457 llvm-svn: 314782
* [DebugInfo] Handle endianness when moving debug info for split integer ↵Bjorn Pettersson2017-10-032-2/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | values (reapplied) Summary: Take the target's endianness into account when splitting the debug information in DAGTypeLegalizer::SetExpandedInteger. This patch fixes so that, for big-endian targets, the fragment expression corresponding to the high part of a split integer value is placed at offset 0, in order to correctly represent the memory address order. I have attached a PPC32 reproducer where the resulting DWARF pieces for a 64-bit integer were incorrectly reversed. Original patch was reverted due to using -stop-after=isel in the test case (but that is only working when AMDGPU target is included in the llc build). The test case has now been updated to use -stop-before=expand-isel-pseudos instead. Patch by: dstenb Reviewers: JDevlieghere, aprantl, dblaikie Reviewed By: JDevlieghere, aprantl, dblaikie Subscribers: nemanjai Differential Revision: https://reviews.llvm.org/D38172 llvm-svn: 314781
* [CodeGen] Introduce generic TBAA access descriptorsIvan A. Kosarev2017-10-037-83/+82
| | | | | | | | | | | | | With this patch we implement a concept of TBAA access descriptors that are capable of representing both scalar and struct-path accesses in a generic way. This is part of D37826 reworked to be a separate patch to simplify review. Differential Revision: https://reviews.llvm.org/D38456 llvm-svn: 314780
* [ARM] Use new assembler diags for ARMOliver Stannard2017-10-0343-2134/+2465
| | | | | | | | | | | | | | | This converts the ARM AsmParser to use the new assembly matcher error reporting mechanism, which allows errors to be reported for multiple instruction encodings when it is ambiguous which one the user intended to use. By itself this doesn't improve many error messages, because we don't have diagnostic text for most operand types, but as we add that then this will allow more of those diagnostic strings to be used when they are relevant. Differential revision: https://reviews.llvm.org/D31530 llvm-svn: 314779
* Remove unused variable. NFCI.Simon Pilgrim2017-10-031-1/+0
| | | | llvm-svn: 314778
* [X86][SSE] Add support for shuffle combining from PACKSS/PACKUSSimon Pilgrim2017-10-032-16/+8
| | | | | | Mentioned in D38472 llvm-svn: 314777
* [X86][SSE] Add support for PACKSS/PACKUS constant foldingSimon Pilgrim2017-10-034-68/+133
| | | | | | Pulled out of D38472 llvm-svn: 314776
* [MiSched] - Simplify ProcResEntry accessJaved Absar2017-10-031-6/+8
| | | | | | | Reviewed by: @MatzeB Differential Revision: https://reviews.llvm.org/D38447 llvm-svn: 314775
* [Assembler] Report multiple near misses for invalid instructionsOliver Stannard2017-10-033-66/+320
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current table-generated assembly instruction matcher returns a 64-bit error code when matching fails. Since multiple instruction encodings with the same mnemonic can fail for different reasons, it uses some heuristics to decide which message is important. This heuristic does not work well for targets that have many encodings with the same mnemonic but different operands, or which have different versions of instructions controlled by subtarget features, as it is hard to know which encoding the user was intending to use. Instead of trying to improve the heuristic in the table-generated matcher, this patch changes it to report a list of near-miss encodings. This list contains an entry for each encoding with the correct mnemonic, but with exactly one thing preventing it from being valid. This thing could be a single invalid operand, a missing target feature or a failed target-specific validation function. The target-specific assembly parser can then report an error message giving multiple options for instruction variants that the user may have been trying to use. For example, I am working on a patch to use this for ARM, which can give this error for an invalid instruction for ARMv6-M: <stdin>:8:3: error: invalid instruction, multiple near-miss encodings found adds r0, r1, #0x8 ^ <stdin>:8:3: note: for one encoding: instruction requires: thumb2 adds r0, r1, #0x8 ^ <stdin>:8:16: note: for one encoding: expected an integer in range [0, 7] adds r0, r1, #0x8 ^ <stdin>:8:16: note: for one encoding: expected a register in range [r0, r7] adds r0, r1, #0x8 ^ This also allows the target-specific assembly parser to apply its own heuristics to suppress some errors. For example, the error "instruction requires: arm-mode" is never going to be useful when targeting an M-profile architecture (which does not have ARM mode). This patch just adds the target-independent mechanism for doing this, all targets still use the old mechanism. I've added a bit in the AsmParser tablegen class to allow targets to switch to this new mechanism. To use this, the target-specific assembly parser will have to be modified for the change in signature of MatchInstructionImpl, and to report errors based on the list of near-misses. Differential revision: https://reviews.llvm.org/D27620 llvm-svn: 314774
* ISel type legalization: add debug messages. NFCI.Sjoerd Meijer2017-10-032-168/+197
| | | | | | | | | | This adds some more debug messages to the type legalizer and functions like PromoteNode, ExpandNode, ExpandLibCall in an attempt to make the debug messages a little bit more informative and useful. Differential Revision: https://reviews.llvm.org/D38450 llvm-svn: 314773
* [llvm-readobj][RISCV] Pretty-print RISCV e_flagsAlex Bradbury2017-10-032-0/+17
| | | | llvm-svn: 314772
* [RISCV] Add missed test case for r314770Alex Bradbury2017-10-032-0/+19
| | | | | | | Differential Revision: https://reviews.llvm.org/D38311 Patch by https://reviews.llvm.org/D38311 llvm-svn: 314771
* [RISCV] Parse RISC-V eflags in ObjectYAMLAlex Bradbury2017-10-031-0/+8
| | | | | | | Differential Revision: https://reviews.llvm.org/D38311 Patch by Chih-Mao Chen. llvm-svn: 314770
* [trivial] fix format, NFCHiroshi Inoue2017-10-031-1/+1
| | | | llvm-svn: 314769
* [ObjectYAML] Handle SHF_COMPRESSEDShoaib Meenai2017-10-032-0/+29
| | | | | | | | | This was previously being silently dropped by obj2yaml and caused parsing errors with yaml2obj. Differential Revision: https://reviews.llvm.org/D38490 llvm-svn: 314768
* [X86] Provide the LSDA pointer with RIP relative addressing if necessaryMartin Storsjo2017-10-033-6/+8
| | | | | | | | | | | | | This makes sure the LSDA pointer isn't truncated to 32 bit. Make LowerINTRINSIC_WO_CHAIN a member function instead of a static function, so that it can use the getGlobalWrapperKind method. This solves the second half of the issues mentioned in PR34720. Differential Revision: https://reviews.llvm.org/D38343 llvm-svn: 314767
* [XRay][compiler-rt] Use a hand-written circular buffer in BufferQueueDean Michael Berris2017-10-033-32/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This change removes the dependency on using a std::deque<...> for the storage of the buffers in the buffer queue. We instead implement a fixed-size circular buffer that's resilient to exhaustion, and preserves the semantics of the BufferQueue. We're moving away from using std::deque<...> for two reasons: - We want to remove dependencies on the STL for data structures. - We want the data structure we use to not require re-allocation in the normal course of operation. The internal implementation of the buffer queue uses heap-allocated arrays that are initialized once when the BufferQueue is created, and re-uses slots in the buffer array as buffers are returned in order. We also change the lock used in the implementation to a spinlock instead of a blocking mutex. We reason that since the release operations now take very little time in the critical section, that a spinlock would be appropriate. This change is related to D38073. Reviewers: dblaikie, kpw, pelikan Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D38119 llvm-svn: 314766
* fixup: use UNUSED, restore alignment for cache-line friendliness, and report ↵Dean Michael Berris2017-10-031-6/+13
| | | | | | on errors found when pthread_create_key fails llvm-svn: 314765
* [XRay][compiler-rt] Use pthread for initializing thread-local dataDean Michael Berris2017-10-031-36/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: We avoid using C++11's thread_local keyword on non-trivially destructible objects because it may introduce deadlocks when the C++ runtime registers destructors calling std::malloc(...). The deadlock may happen when the allocator implementation is itself XRay instrumented. To avoid having to call malloc(...) and free(...) in particular, we use pthread_once, pthread_create_key, and pthread_setspecific to instead manually register the cleanup implementation we want. The code this replaces used an RAII type that implements the cleanup functionality in the destructor, that was then initialized as a function-local thread_local object. While it works in usual situations, unfortunately it breaks when using a malloc implementation that itself is XRay-instrumented. Reviewers: dblaikie, kpw, pelikan Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D38073 llvm-svn: 314764
* [Lint] Avoid failed assertion by fetching the proper pointer typeMikael Holmen2017-10-034-11/+50
| | | | | | | | | | | | | | | | | | | | | Summary: When checking if a constant expression is a noop cast we fetched the IntPtrType by doing DL->getIntPtrType(V->getType())). However, there can be cases where V doesn't return a pointer, and then getIntPtrType() triggers an assertion. Now we pass DataLayout to isNoopCast so the method itself can determine what the IntPtrType is. Reviewers: arsenm Reviewed By: arsenm Subscribers: wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D37894 llvm-svn: 314763
* [InstCombine] Change a bunch of methods to take APInts by reference instead ↵Craig Topper2017-10-032-134/+134
| | | | | | | | of pointer. This allows us to remove a bunch of dereferences and only have a few dereferences at the call sites. llvm-svn: 314762
* [InstCombine] Replace an equality compare of two APInt pointers with a ↵Craig Topper2017-10-031-1/+1
| | | | | | | | compare of the APInts themselves. Apparently this works by virtue of the fact that the pointers are pointers to the APInts stored inside of the ConstantInt objects. But I really don't think we should be relying on that. llvm-svn: 314761
* [Legalizer] Add support for G_OR NarrowScalar.Quentin Colombet2017-10-033-11/+93
| | | | | | | | | | | | | | Legalize bitwise OR: A = BinOp<Ty> B, C into: B1, ..., BN = G_UNMERGE_VALUES B C1, ..., CN = G_UNMERGE_VALUES C A1 = BinOp<Ty/N> B1, C2 ... AN = BinOp<Ty/N> BN, CN A = G_MERGE_VALUES A1, ..., AN llvm-svn: 314760
* lldCommon depends on intrinsics_gen, due to llvm/CodeGen/CommandFlags.hNAKAMURA Takumi2017-10-031-0/+7
| | | | llvm-svn: 314759
* [X86] Add AVX512 check lines to the cost model truncate test.Craig Topper2017-10-031-0/+13
| | | | llvm-svn: 314758
* Rewrite a function so that it doesn't use pointers to pointers. NFC.Rui Ueyama2017-10-031-12/+13
| | | | | | | | Previous code was a bit puzzling because of its use of pointers. In this patch, we pass a vector and its offsets, instead of pointers to vector elements. llvm-svn: 314756
* Fix test suite misconfiguration on OS XEric Fiselier2017-10-031-2/+2
| | | | llvm-svn: 314755
* R34811: Allow visibilities other than 'default' for VisibleNoLinkage entities.Richard Smith2017-10-032-2/+15
| | | | llvm-svn: 314754
* Add parens around the boolean condition of one of the added asserts in ↵Faisal Vali2017-10-031-2/+2
| | | | | | | | | | | | | | | r314747 ... ... in the hopes of teaching the bots the gift of silence ;) For quick reference: https://reviews.llvm.org/rL314747 llvm-svn: 314753
* [ubsan] Skip alignment checks which are folded awayVedant Kumar2017-10-032-3/+16
| | | | | | | | | | | | Don't emit alignment checks which the IR constant folder throws away. I've tested this out on X86FastISel.cpp. While this doesn't decrease end-to-end compile-time significantly, it results in 122 fewer type checks (1% reduction) overall, without adding any real complexity. Differential Revision: https://reviews.llvm.org/D37544 llvm-svn: 314752
* [ubsan] Save the result of getLLVMContext. NFC.Vedant Kumar2017-10-031-6/+6
| | | | llvm-svn: 314751
* [ubsan] Add helpers to decide when null/vptr checks are required. NFC.Vedant Kumar2017-10-032-8/+21
| | | | llvm-svn: 314750
* [ubsan] Save a ptrtoint when emitting alignment checksVedant Kumar2017-10-032-7/+11
| | | | | | | The alignment check emits a ptrtoint instruction which can be reused in the call to the diagnostic handler. llvm-svn: 314749
* Remove an assertion I added from the refactoring of pasteTokens ↵Faisal Vali2017-10-031-4/+0
| | | | | | | | | | | | (https://reviews.llvm.org/rL314747). - it made the bots v angry! I'm not exactly sure why the assertion doesn't hold - if anyone has any insight - would appreciate it. Thanks! llvm-svn: 314748
* [NFC] Refactor PasteTokens so that it can be passed the Token Stream and ↵Faisal Vali2017-10-032-46/+89
| | | | | | | | | | | | | | Index to start concatenating at. In passing: - change the name of the function to pasteTokens c/w coding standards - rename CurToken to CurTokenIdx (since it is not the token, but the index) - add doxygen comments to document some of pasteTokens' functionality - use parameter names different from the data member names. This will be useful for implementing __VA_OPT__ (https://reviews.llvm.org/D35782#inline-322587) llvm-svn: 314747
* Add a comment.Rui Ueyama2017-10-031-1/+2
| | | | llvm-svn: 314746
* LTO: Improve error reporting when adding a cache entry.Peter Collingbourne2017-10-031-4/+6
| | | | | | | | Move error handling code next to the code that returns the error, and change the error message in order to distinguish it from a similar error message elsewhere in this file. llvm-svn: 314745
* SparseSolver: Rename getOrInitValueState to getValueState, matching what ↵Daniel Berlin2017-10-032-9/+9
| | | | | | SCCP calls it llvm-svn: 314744
* [clang-cl] Claim ignored /O[12xd] argumentsReid Kleckner2017-10-032-20/+23
| | | | | | Fixes PR34809 llvm-svn: 314743
* AMDGPU: Remove global isGCN predicatesMatt Arsenault2017-10-0319-442/+466
| | | | | | | | | | | | | | These are problematic because they apply to everything, and can easily clobber whatever more specific predicate you are trying to add to a function. Currently instructions use SubtargetPredicate/PredicateControl to apply this to patterns applied to an instruction definition, but not to free standing Pats. Add a wrapper around Pat so the special PredicateControls requirements can be appended to the final predicate list like how Mips does it. llvm-svn: 314742
* [InstSimplify] teach SimplifySelectInst() to fold more vector selectsHaicheng Wu2017-10-023-0/+17
| | | | | | | | | | | | Call ConstantFoldSelectInstruction() to fold cases like below select <2 x i1><i1 true, i1 false>, <2 x i8> <i8 0, i8 1>, <2 x i8> <i8 2, i8 3> All operands are constants and the condition has mixed true and false conditions. Differential Revision: https://reviews.llvm.org/D38369 llvm-svn: 314741
* [PassManager] Retire cl::opt that have been set for a while. NFCI.Davide Italiano2017-10-024-36/+24
| | | | llvm-svn: 314740
* [PowerPC] Revert r314666.Tim Shen2017-10-022-75/+2
| | | | | | | | | See https://reviews.llvm.org/D38172. I tried to XFAIL it, but sometimes XPASS triggers the bot. Simply revert it. llvm-svn: 314739
* Build fix: don't try to link in lldConfigHans Wennborg2017-10-022-2/+0
| | | | | | Config was removed in r314719. llvm-svn: 314736
* Improve test runner output for broken configurations.Eric Fiselier2017-10-022-6/+16
| | | | | | | | | | | | | Previously LIT would often fail while attempting to set up/configure the test compiler; normally when attempting to dump the builtin macros. This sort of failure provided no useful information about what went wrong with the compiler, making the actual issues hard --- if not impossible --- to debug easily. This patch changes the LIT configuration to report the failure explicitly, including the failed compile command and the stdout/stderr output. llvm-svn: 314735
* Template the sparse propagation solver instead of using void pointersDaniel Berlin2017-10-022-35/+46
| | | | | | | | | | | | | | Summary: This avoids using void * as the type of the lattice value and ugly casts needed to make that happen. (If folks want to use references, etc, they can use a reference_wrapper). Reviewers: davide, mssimpso Subscribers: sanjoy, llvm-commits Differential Revision: https://reviews.llvm.org/D38476 llvm-svn: 314734
OpenPOWER on IntegriCloud