summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [InstSimplify] Teach SimplifyMulInst to recognize vectors of i1 as And. Not ↵Craig Topper2017-04-062-1/+12
| | | | | | just scalar i1. llvm-svn: 299665
* [Hexagon] Change the vector scaling for vector offsetsKrzysztof Parzyszek2017-04-0610-397/+456
| | | | | | | Keep full offset value on MI-level instructions, but have it scaled down in the MC-level instructions. llvm-svn: 299664
* [FIX] Fix ScheduleTreeOptimizer::optimizeMatMulPatternRoman Gareev2017-04-061-1/+1
| | | | | | Use new values of the dimensions during their permutation. llvm-svn: 299663
* Restore the initial ordering of dimensions before applying the pattern matchingRoman Gareev2017-04-062-1/+162
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dimensions of band nodes can be implicitly permuted by the algorithm applied during the schedule generation. For example, in case of the following matrix-matrix multiplication, for (i = 0; i < 1024; i++) for (k = 0; k < 1024; k++) for (j = 0; j < 1024; j++) C[i][j] += A[i][k] * B[k][j]; it can produce the following schedule tree domain: "{ Stmt_for_body6[i0, i1, i2] : 0 <= i0 <= 1023 and 0 <= i1 <= 1023 and 0 <= i2 <= 1023 }" child: schedule: "[{ Stmt_for_body6[i0, i1, i2] -> [(i0)] }, { Stmt_for_body6[i0, i1, i2] -> [(i1)] }, { Stmt_for_body6[i0, i1, i2] -> [(i2)] }]" permutable: 1 coincident: [ 1, 1, 0 ] The current implementation of the pattern matching optimizations relies on the initial ordering of dimensions. Otherwise, it can produce the miscompilation (e.g., [1]). This patch helps to restore the initial ordering of dimensions by recreating the band node when the corresponding conditions are satisfied. Refs.: [1] - https://bugs.llvm.org/show_bug.cgi?id=32500 Reviewed-by: Michael Kruse <llvm@meinersbur.de> Differential Revision: https://reviews.llvm.org/D31741 llvm-svn: 299662
* [TSan] Adjust expectation for check_analyze.shCraig Topper2017-04-061-9/+3
| | | | | | | | r299658 fixed a case where InstCombine was replicating instructions instead of combining. Fixing this reduced the number of pushes and pops in the __tsan_read and __tsan_write functions. Adjust the expectations to account for this after talking to Dmitry Vyukov. llvm-svn: 299661
* [ADT] Add a generic breadth-first-search graph iterator.Davide Italiano2017-04-063-0/+240
| | | | | | | | This will be used in LCSSA to speed up the canonicalization. Differential Revision: https://reviews.llvm.org/D31694 llvm-svn: 299660
* [AMDGPU] Eliminate barrier if workgroup size is not greater than wavefront sizeStanislav Mekhanoshin2017-04-063-1/+42
| | | | | | | | | | If a workgroup size is known to be not greater than wavefront size the s_barrier instruction is not needed since all threads are guarantied to come to the same point at the same time. Differential Revision: https://reviews.llvm.org/D31731 llvm-svn: 299659
* [InstCombine] Fix a case where we weren't checking that an instruction had a ↵Craig Topper2017-04-061-6/+9
| | | | | | single use resulting in extra instructions being created. llvm-svn: 299658
* [clang-tidy] Temporarily disable a test-case that does not work on windows.Gabor Horvath2017-04-061-8/+9
| | | | llvm-svn: 299657
* Revert "Restore Missing awk regex tests. Thanks to dexonsmith for noticing, ↵Mehdi Amini2017-04-061-8/+9
| | | | | | | | and proposing this as https://reviews.llvm.org/D16541" This reverts commit r299652, 32bits MacOS is broken. llvm-svn: 299656
* Revert r299635 because it exposed a latent bug.James Henderson2017-04-0613-143/+18
| | | | llvm-svn: 299655
* [AMDGPU] Resubmit SDWA peephole: enable by defaultSam Kolton2017-04-0644-440/+613
| | | | | | | | | | Reviewers: vpykhtin, rampitec, arsenm Subscribers: qcolombet, kzhuravl, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye Differential Revision: https://reviews.llvm.org/D31671 llvm-svn: 299654
* [analyzer] Reland r299544 "Add a modular constraint system to the CloneDetector"Artem Dergachev2017-04-065-662/+789
| | | | | | | | | | | | | | | | | | | | | | | | | | | Hopefully fix crashes by unshadowing the variable. Original commit message: A big part of the clone detection code is functionality for filtering clones and clone groups based on different criteria. So far this filtering process was hardcoded into the CloneDetector class, which made it hard to understand and, ultimately, to extend. This patch splits the CloneDetector's logic into a sequence of reusable constraints that are used for filtering clone groups. These constraints can be turned on and off and reodreder at will, and new constraints are easy to implement if necessary. Unit tests are added for the new constraint interface. This is a refactoring patch - no functional change intended. Patch by Raphael Isemann! Differential Revision: https://reviews.llvm.org/D23418 llvm-svn: 299653
* Restore Missing awk regex tests. Thanks to dexonsmith for noticing, and ↵Marshall Clow2017-04-061-9/+8
| | | | | | proposing this as https://reviews.llvm.org/D16541 llvm-svn: 299652
* [clang-tidy] Update docs and help messageAlexander Kornienko2017-04-062-5/+8
| | | | llvm-svn: 299651
* Avoid the -Wdocumentation-unknown-command warning in Clang's C API docsAlex Lorenz2017-04-061-3/+3
| | | | | | rdar://20441985 llvm-svn: 299650
* [clang-tidy] Add FormatStyle configuration option.Alexander Kornienko2017-04-066-34/+48
| | | | llvm-svn: 299649
* [ObjC++] Conversions from specialized to non-specialized Objective-C genericAlex Lorenz2017-04-062-3/+44
| | | | | | | | | | | | | | | | | | | object types should be preferred over conversions to other object pointers This change ensures that Clang will select the correct overload for the following code sample: void overload(Base *b); void overload(Derived *d); void test(Base<Base *> b) { overload(b); // Select overload(Base *), not overload(Derived *) } rdar://20124827 Differential Revision: https://reviews.llvm.org/D31597 llvm-svn: 299648
* [SelectionDAG] NFC patch removing a redundant check.Jonas Paulsson2017-04-061-8/+4
| | | | | | | | | Since the BUILD_VECTOR has already been checked by isBuildVectorOfConstantSDNodes() in SelectionDAG::getNode() for a SIGN_EXTEND_INREG, it can be assumed that Op is always either undef or a ConstantSDNode, and Ops.size() will always equal VT.getVectorNumElements(). llvm-svn: 299647
* Fix lambda to block conversion in C++17 by avoiding copy elision for theAlex Lorenz2017-04-065-7/+50
| | | | | | | | | | | | | | | | lambda capture used by the created block The commit r288866 introduced guaranteed copy elision to C++ 17. This unfortunately broke the lambda to block conversion in C++17 (the compiler crashes when performing IRGen). This commit fixes the conversion by avoiding copy elision for the capture that captures the lambda that's used in the block created by the lambda to block conversion process. rdar://31385153 Differential Revision: https://reviews.llvm.org/D31669 llvm-svn: 299646
* Attempt to fix build bots after r299638.Gabor Horvath2017-04-061-2/+2
| | | | llvm-svn: 299645
* [XRay][compiler-rt] Remove unused local variableDean Michael Berris2017-04-061-2/+1
| | | | | | | | The local was only referenced in assertions. Follow-up to D31345. llvm-svn: 299644
* [Sema] Retarget test to a specific platform for consistent datasizesSimon Dardis2017-04-061-1/+1
| | | | | | | | Attempt to satisfy llvm-clang-x86_64-expensive-checks-win by targeting x86_64-apple-darwin10 for Sema/vector-ops.c. The underlying failure is due to datatype differences between platforms. llvm-svn: 299643
* Wdocumentation fixSimon Pilgrim2017-04-061-3/+3
| | | | llvm-svn: 299642
* [Sema] Extend GetSignedVectorType to deal with non ExtVector typesSimon Dardis2017-04-062-18/+145
| | | | | | | | | | | | | This improves some error messages which would otherwise refer to ext_vector_type types in contexts where there are no such types. Factored out from D25866 at reviewer's request. Reviewers: bruno Differential Revision: https://reviews.llvm.org/D31667 llvm-svn: 299641
* [X86][MMX] Test showing failure to create MMX non-temporal storeSimon Pilgrim2017-04-061-7/+26
| | | | llvm-svn: 299640
* PR16106: Correct the docs to reflect the actual behavior of the interface.Vassil Vassilev2017-04-061-2/+2
| | | | llvm-svn: 299639
* [clang-tidy] Check for forwarding reference overload in constructors.Gabor Horvath2017-04-068-0/+385
| | | | | | | | Patch by András Leitereg! Differential Revision: https://reviews.llvm.org/D30547 llvm-svn: 299638
* [globalisel][tablegen] Move <Target>InstructionSelector declarations to ↵Daniel Sanders2017-04-0610-153/+120
| | | | | | | | | | | | | | | | anonymous namespaces Summary: This resolves the issue of tablegen-erated includes in the headers for non-GlobalISel builds in a simpler way than before. Reviewers: qcolombet, ab Reviewed By: ab Subscribers: igorb, ab, mgorny, dberris, rovka, llvm-commits, kristof.beyls Differential Revision: https://reviews.llvm.org/D30998 llvm-svn: 299637
* [ELF] Remove unnecessary cast and fix comments. NFC.James Henderson2017-04-061-7/+7
| | | | llvm-svn: 299636
* [ELF] Pad x86 executable sections with 0xcc int3 instructionsJames Henderson2017-04-0613-18/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Executable sections should not be padded with zero by default. On some architectures, 0x00 is the start of a valid instruction sequence, so can confuse disassembly between InputSections (and indeed the start of the next InputSection in some situations). Further, in the case of misjumps into padding, padding may start to be executed silently. On x86, the "0xcc" byte represents the int3 trap instruction. It is a single byte long so can serve well as padding. This change switches x86 (and x86_64) to use this value for padding in executable sections, if no linker script directive overrides it. It also puts the behaviour into place making it easy to change the behaviour of other targets when desired. I do not know the relevant instruction sequences for trap instructions on other targets however, so somebody should add this separately. Because the old behaviour simply wrote padding in the whole section before overwriting most of it, this change also modifies the padding algorithm to write padding only where needed. This in turn has caused a small behaviour change with regards to what values are written via Fill commands in linker scripts, bringing it into line with ld.bfd. The fill value is now written starting from the end of the previous block, which means that it always starts from the first byte of the fill, whereas the old behaviour meant that the padding sometimes started mid-way through the fill value. See the test changes for more details. Reviewed by: ruiu Differential Revision: https://reviews.llvm.org/D30886 Bugzilla: http://bugs.llvm.org/show_bug.cgi?id=32227 llvm-svn: 299635
* [ARM] Remove a dead ADD during the creation of TBBsDavid Green2017-04-062-1/+166
| | | | | | | | | During the optimisation of jump tables in the constant island pass, an extra ADD could be left over, now dead but not removed. Differential Revision: https://reviews.llvm.org/D31389 llvm-svn: 299634
* [Polly] [ScheduleOptimizer] Prevent incorrect tile size computationSiddharth Bhat2017-04-062-0/+245
| | | | | | | | | | | | | | | | | Because Polly exposes parameters that directly influence tile size calculations, one can setup situations like divide-by-zero. Check against a possible divide-by-zero in getMacroKernelParams and return early. Also assert at the end of getMacroKernelParams that the block sizes computed for matrices are positive (>= 1). Tags: #polly Differential Revision: https://reviews.llvm.org/D31708 llvm-svn: 299633
* Try to fix MAC buildbot after r299630Maxim Ostapenko2017-04-062-5/+7
| | | | llvm-svn: 299632
* Try to fix windows buildbot after r299630Maxim Ostapenko2017-04-061-1/+1
| | | | llvm-svn: 299631
* [lsan] Avoid segfaults during threads destruction under high loadMaxim Ostapenko2017-04-065-12/+37
| | | | | | | | | | | | | | | | | This patch addresses two issues: * It turned out that suspended thread may have dtls->dtv_size == kDestroyedThread (-1) and LSan wrongly assumes that DTV is available. This leads to SEGV when LSan tries to iterate through DTV that is invalid. * In some rare cases GetRegistersAndSP can fail with errno 3 (ESRCH). In this case LSan assumes that the whole stack of a given thread is available. This is wrong because ESRCH can indicate that suspended thread was destroyed and its stack was unmapped. This patch properly handles ESRCH from GetRegistersAndSP in order to avoid invalid accesses to already unpapped threads stack. Differential Revision: https://reviews.llvm.org/D30818 llvm-svn: 299630
* [XRay] [compiler-rt] Unwriting FDR mode buffers when functions are short.Dean Michael Berris2017-04-063-7/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: "short" is defined as an xray flag, and buffer rewinding happens for both exits and tail exits. I've made the choice to seek backwards finding pairs of FunctionEntry, TailExit record pairs and erasing them if the FunctionEntry occurred before exit from the currently exiting function. This is a compromise so that we don't skip logging tail calls if the function that they call into takes longer our duration. This works by counting the consecutive function and function entry, tail exit pairs that proceed the current point in the buffer. The buffer is rewound to check whether these entry points happened recently enough to be erased. It is still possible we will omit them if they call into a child function that is not instrumented which calls a fast grandchild that is instrumented before doing other processing. Reviewers: pelikan, dberris Reviewed By: dberris Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D31345 llvm-svn: 299629
* [Builtins] Fix div0 error in udivsi3Weiming Zhao2017-04-061-12/+14
| | | | | | | | | | | | | | Summary: Need to save `lr` before bl to aeabi_div0 Reviewers: rengolin, compnerd Reviewed By: compnerd Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D31716 llvm-svn: 299628
* [InstSimplify] Add test cases for mixing add/sub i1 with xor of i1. Seems we ↵Craig Topper2017-04-061-0/+42
| | | | | | can simplify in one direction but not the other. llvm-svn: 299627
* [InstSimplify] Teach SimplifyAddInst and SimplifySubInst that vectors of i1 ↵Craig Topper2017-04-062-2/+38
| | | | | | can be treated as Xor too. llvm-svn: 299626
* [libc++] Respect Windows Store app CRT restrictionsShoaib Meenai2017-04-062-0/+12
| | | | | | | | | | | | | Some CRT APIs are unavailable for Windows Store apps [1]. Detect when we're targeting the Windows Store and don't try to refer to non-existent CRT functions in that case. (This would otherwise lead to a compile error when using the libc++ headers and compiling for Windows Store.) [1] https://docs.microsoft.com/en-us/cpp/cppcx/crt-functions-not-supported-in-universal-windows-platform-apps Differential Revision: https://reviews.llvm.org/D31737 llvm-svn: 299625
* [XRay][docs] Fix hyperlink to XRay docDean Michael Berris2017-04-061-3/+2
| | | | llvm-svn: 299624
* [Orc] Add missing header include for r299611.Lang Hames2017-04-061-0/+1
| | | | llvm-svn: 299623
* Revert accidental commit of r299619.Craig Topper2017-04-061-15/+31
| | | | llvm-svn: 299622
* Revert accidental commit of r299618Craig Topper2017-04-061-3/+0
| | | | llvm-svn: 299621
* [IR] Add commutable matchers for Add and Mul to go with the logic operations ↵Craig Topper2017-04-061-0/+16
| | | | | | that are already present. NFC llvm-svn: 299620
* barCraig Topper2017-04-061-31/+15
| | | | llvm-svn: 299619
* fooCraig Topper2017-04-061-0/+3
| | | | llvm-svn: 299618
* Update to isl-0.18-417-gb9e7334Tobias Grosser2017-04-0613-413/+425
| | | | | | This is a regular maintenance update. llvm-svn: 299617
* [XRay] - Fix spelling error to test commit access.Keith Wyss2017-04-061-1/+1
| | | | | | Just a spelling change in a comment intended to test svn commit access. llvm-svn: 299616
OpenPOWER on IntegriCloud