summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* [SLP] simplify type check for reductionshostassocSanjay Patel2021-01-131-3/+3
| | | | | | This is NFC-intended. The 'valid' call allows int/FP/pointers for other parts of SLP. The difference here is that we can't reduce pointers.
* [Hexagon] Improve legalizing of ISD::SETCC resultKrzysztof Parzyszek2021-01-131-14/+28
|
* [flang] Fix classification of shape inquiries in specification exprspeter klausler2021-01-1321-383/+562
| | | | | | | | | | | | | | | | | | In some contexts, including the motivating case of determining whether the expressions that define the shape of a variable are "constant expressions" in the sense of the Fortran standard, expression rewriting via Fold() is not necessary, and should not be required. The inquiry intrinsics LBOUND, UBOUND, and SIZE work correctly now in specification expressions and are classified correctly as being constant expressions (or not). Getting this right led to a fair amount of API clean-up as a consequence, including the folding of shapes and TypeAndShape objects, and new APIs for shapes that do not fold for those cases where folding isn't needed. Further, the symbol-testing predicate APIs in Evaluate/tools.h now all resolve any associations of their symbols and work transparently on use-, host-, and construct-association symbols; the tools used to resolve those associations have been defined and documented more precisely, and their clients adjusted as needed. Differential Revision: https://reviews.llvm.org/D94561
* [gn build] Port 60fda8ebb6dshapeLLVM GN Syncbot2021-01-131-0/+1
|
* [ARM] Add a pass that re-arranges blocks when there is a backwards WLS branchSam Tebbs2021-01-136-0/+581
| | | | | | Blocks can be laid out such that a t2WhileLoopStart branches backwards. This is forbidden by the architecture and so it fails to be converted into a low-overhead loop. This new pass checks for these cases and moves the target block, fixing any fall-through that would then be broken. Differential Revision: https://reviews.llvm.org/D92385
* [DAG] visitVECTOR_SHUFFLE - use all_of to check for all-undef shuffle mask. ↵Simon Pilgrim2021-01-131-5/+1
| | | | NFCI.
* [X86][AVX] Add test for another 'reverse HADD' pattern mentioned in PR41813Simon Pilgrim2021-01-131-0/+32
|
* [X86][SSE] canonicalizeShuffleMaskWithHorizOp - simplify ↵Simon Pilgrim2021-01-132-108/+75
| | | | | | | | shuffle(HOP(HOP(X,Y),HOP(Z,W))) style chains. See if we can remove the shuffle by resorting a HOP chain so that the HOP args are pre-shuffled. This initial version just handles (the most common) v4i32/v4f32 hadd/hsub reduction patterns - future work can extend this to v8i16 types plus PACK chains (2f64 HADD/HSUB should already be handled in the half-lane combine code later on).
* [dsymutil] Warn on timestmap mismatch between object file and debug mapJonas Devlieghere2021-01-137-11/+38
| | | | | | | | | | This re-lands e5553b9a6ab9 with two small fixes to the tests: - Don't touch the source directory in debug-map-parsing.test but instead copy everything over in a temporary directory in timestamp-mismatch.test. - Don't redirect stderr to stdout to avoid the output getting intertwined in extern-alias.test.
* [IROutliner] Adapting to hoisted bitcasts in CodeExtractorAndrew Litteken2021-01-132-3/+121
| | | | | | | | | | | | | | | | | | | | | | | | | In commit 700d2417d8281ea56dfd7ac72d1a1473d03d2d59 the CodeExtractor was updated so that bitcasts that have lifetime markers that beginning outside of the region are deduplicated outside the region and are not used as an output. This caused a discrepancy in the IROutliner, where in these cases there were arguments added to the aggregate function that were not needed causing assertion errors. The IROutliner queries the CodeExtractor twice to determine the inputs and outputs, before and after `findAllocas` is called with the same ValueSet for the outputs causing the duplication. This has been fixed with a dummy ValueSet for the first call. However, the additional bitcasts prevent us from using the same similarity relationships that were previously defined by the IR Similarity Analysis Pass. In these cases, we check whether the initial version of the region being analyzed for outlining is still the same as it was previously. If it is not, i.e. because of the additional bitcast instructions from the CodeExtractor, we discard the region. Reviewers: yroux Differential Revision: https://reviews.llvm.org/D94303
* [clangd] Remove some old CodeCompletion options that are never (un)set. NFCSam McCall2021-01-133-25/+7
|
* [clangd] Remove "decision-forest-base" experimental flag.Utkarsh Saxena2021-01-131-9/+0
| | | | | | | | The value of this flag can only be fine tuned by using A/B testing on large user base. We do not expect individual users to use and fine tune this flag. Differential Revision: https://reviews.llvm.org/D94513
* [InstCombine] Fold select -> and/or using impliesPoisonNikita Popov2021-01-132-11/+10
| | | | | | | | | | | | We can fold a ? b : false to a & b if is_poison(b) implies that is_poison(a), at which point we're able to reuse all the usual fold on ands. In particular, this covers the very common case of icmp X, C && icmp X, C'. The same applies to ors. This currently only has an effect if the -instcombine-unsafe-select-transform=0 option is set. Differential Revision: https://reviews.llvm.org/D94550
* [SLP] add reduction test for FMF; NFCSanjay Patel2021-01-131-0/+52
|
* [clangd] Avoid reallocating buffers for each message read:Sam McCall2021-01-131-26/+30
| | | | | | | | - reuse std::string we read messages into - when reading line-wise, use SmallVector<128> and read in chunks of 128 (this affects headers, which are short, and tests, which don't matter) Differential Revision: https://reviews.llvm.org/D93653
* [clangd] Explicitly avoid background-indexing the same file twice.Sam McCall2021-01-134-22/+91
| | | | | | | | | | | | | | | | | This used to implicitly never happen due to only discovering each CDB once. We may want to carefully support reindexing one day, but we need to do it carefully (tricky tradeoffs) and it would need further support in background indexer. Making this explicit here rather than just turning off rebroadcast in background index for a few reasons: - allows *new* files in the same CDB to be indexed - relying on bugs-at-a-distance cancelling each other out is bound to bite us - gets us closer to actually supporting reindexing, which requires similar tracking Differential Revision: https://reviews.llvm.org/D94503
* [OpenMP] Fix hierarchical barrierTerry Wilmarth2021-01-132-6/+12
| | | | | | | | | | | | | | | | Hierarchical barrier is an experimental barrier algorithm that uses aspects of machine hierarchy to define the barrier tree structure. This patch fixes offset calculation in hierarchical barrier. The offset is used to store info on a flag about sleeping threads waiting on a location stored in the flag. This commit also fixes a potential deadlock in hierarchical barrier when using infinite blocktime by adjusting the offset value of leaf kids so that it matches the value of leaf state. It also adds testing of default barriers with infinite blocktime, and also tests hierarchical barrier algorithm with both default and infinite blocktime. Patch by Terry Wilmarth and Nawrin Sultana. Differential Revision: https://reviews.llvm.org/D94241
* [OpenMP] Add documentation for error messages and release notesJoseph Huber2021-01-132-2/+116
| | | | | | | | Add extra information to the runtime page describing the error messages and add information to the release notes for clang 12.0 Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D94562
* [Frontend] Add pragma align natural and sort out pragma pack stack effectXiangling Liao2021-01-1320-54/+830
| | | | | | | | - Implemente the natural align for XL on AIX - Sort out pragma pack stack effect - Add -fxl-pragma-stack option to enable XL on AIX pragma stack effect Differential Revision: https://reviews.llvm.org/D87702
* [lld][WebAssembly] Fix for TLS + --relocatableSam Clegg2021-01-135-5/+35
| | | | | | | | | | | | | | When running in `-r/--relocatable` we output relocations but the new TLS relocations type was missing from `ObjFile::calcNewAddend` causing this combination of inputs/flags to crash the linker. Also avoid creating tls variables in relocatable mode. These variables are only needed when linking final executables. Fixes: https://github.com/emscripten-core/emscripten/issues/12934 Fixes: PR48506 Differential Revision: https://reviews.llvm.org/D93554
* [AArch64][GlobalISel] Add support for FCONSTANT of FP128 typeMuhammad Asif Manzoor2021-01-134-15/+35
| | | | | | | | | Add support for G_FCONSTANT of FP128 (Quadruple precision) type. It replaces the constant by emitting a load with a constant pool entry. Reviewed By: aemerson Differential Revision: https://reviews.llvm.org/D94437
* [NFC][RISCV] Add double type in RISC-V V CodeGen test cases for RV32.Hsiangkai Wang2021-01-1333-3010/+14646
| | | | Differential Revision: https://reviews.llvm.org/D94584
* GlobalISel: Do not set observer of MachineIRBuilder in LegalizerHelperMatt Arsenault2021-01-136-53/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes double printing of insertion debug messages in the legalizer. Try to cleanup usage of observers. Currently the use of observers is pretty hard to follow and it's not clear what is responsible for them. Observers are referenced in 3 places: 1. In the MachineFunction 2. In the MachineIRBuilder 3. In the LegalizerHelper The observers in the MachineFunction and MachineIRBuilder are both called only on insertions, and are redundant with each other. The source of the double printing was the same observer was added to both the MachineFunction, and the MachineIRBuilder. One of these references needs to be removed. Arguably observers in general should be fully removed from one or the other, but it may be useful to have a local observer in the MachineIRBuilder that is not added to the function's observers. Alternatively, the wrapper observer could manage a local observer in one place. The LegalizerHelper only ever calls the observer on changing/changed instructions, and never insertions. Logically these are two different types of observers, for changes and for insertions. Additionally, some places used the GISelObserverWrapper when they only needed a single observer they could use directly. Setting the observer in the LegalizerHelper constructor is not flexible enough if the LegalizerHelper is constructed anywhere outside the one used by the legalizer. AMDGPU calls the LegalizerHelper in RegBankSelect, and needs to use a local observer to apply the regbank to newly created instructions. Currently it accomplishes this by constructing a local MachineIRBuilder. I'm trying to move the MachineIRBuilder to be owned/maintained by the RegBankSelect pass itself, but the locally constructed LegalizerHelper would reset the observer. Mips also has a special case use of the LegalizationArtifactCombiner in applyMappingImpl; I think we do need to run the artifact combiner during RegBankSelect, but in a more consistent way outside of applyMappingImpl.
* [AArch64] Attempt to sink mul operandsNicholas Guy2021-01-132-0/+223
| | | | | | | | Following on from D91255, this patch is responsible for sinking relevant mul operands to the same block so that umull/smull instructions can be correctly generated by the mul combine implemented in the aforementioned patch. Differential revision: https://reviews.llvm.org/D91271
* [clangd] Split out a base class for delegating GlobalCompilationDatabases. NFCSam McCall2021-01-133-40/+59
| | | | This prepares for adding another delegatable method (blockUntilIdle) to GCDB.
* [mlir][linalg] Use attributes in named ops' indexing mapsLei Zhang2021-01-133-44/+290
| | | | | | | | | | | | | | | | This commit adds support for parsing attribute uses in indexing maps. These attribute uses are represented as affine symbols in the resultant indexing maps because we can only know their concrete value (which are coming from op attributes and are constants) for specific op instances. The `indxing_maps()` calls are synthesized to read these attributes and create affine constants to replace the placeholder affine symbols and simplify. Depends on D94240 Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D94335
* [X86] Add tests for rv_marker lowering.Florian Hahn2021-01-131-0/+175
| | | | Precommit tests for D94597.
* [OpenCL] Improve OpenCL operator testsSven van Haastregt2021-01-133-2/+14
| | | | | | | | | | Extend testing of increment/decrement operators and make sure these operators are tested in only one dedicated test file. Rename logical-ops.cl to operators.cl, as it was already containing more than just logical operators. Add testing for the remainder operator on floating point types.
* [libc] Refresh benchmark progress bar when needed.Guillaume Chatelet2021-01-131-3/+8
|
* [X86] canonicalizeShuffleMaskWithHorizOp - minor refactor to support ↵Simon Pilgrim2021-01-131-15/+22
| | | | | | | | multiple src ops. NFCI. canonicalizeShuffleMaskWithHorizOp currently only supports shuffles with 1 or 2 sources, but PR41813 will require us to support higher numbers of sources. This patch just generalizes the initial setup stages to ensure all src ops are the same type and opcode and then will continue to early out if we have more than 2 sources.
* [Tests] Added test for memcpy loop idiom recognizationDávid Bolvanský2021-01-131-0/+106
|
* Revert "Hwasan InitPrctl check for error using internal_iserror"Nico Weber2021-01-131-6/+4
| | | | | This reverts commit 1854594b80b444dc21b830b51e53e05d38fc7d60. See https://reviews.llvm.org/D94425#2495621
* [ValueTracking] Fix one s/dyn_cast/dyn_cast_or_null/Markus Lavin2021-01-132-2/+7
| | | | | | | Handle if Constant::getAggregateElement() returns nullptr in canCreateUndefOrPoison(). Differential Revision: https://reviews.llvm.org/D94494
* [SVE][CodeGen] CTLZ, CTTZ & CTPOP operations (predicates)Kerry McLaughlin2021-01-132-0/+150
| | | | | | | | | | | Canonicalise the following operations in getNode() for predicate types: - CTLZ(Pred) -> bitwise_NOT(Pred) - CTTZ(Pred) -> bitwise_NOT(Pred) - CTPOP(Pred) -> Pred Reviewed By: david-arm Differential Revision: https://reviews.llvm.org/D94428
* Revert "[dsymutil] Warn on timestmap mismatch between object file and debug map"David Zarzycki2021-01-136-27/+8
| | | | | | | This reverts commit e5553b9a6ab9f02f382a31cc5117b52c3bfaf77a. Tests are not allowed to modify the source. Please figure out a way to use %t rather than dynamically modifying the inputs.
* Fix build errors after ceb9379a9Nathan James2021-01-131-1/+1
| | | | | | | | | | For some reason some builds dont like the arrow operator access. using the deref then access should fix the issue. /home/buildbots/ppc64le-flang-mlir-rhel-test/ppc64le-flang-rhel-clang-build/llvm-project/llvm/include/llvm/ADT/iterator.h:171:34: error: taking the address of a temporary object of type 'llvm::StringRef' [-Waddress-of-temporary] PointerT operator->() { return &static_cast<DerivedT *>(this)->operator*(); } ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/buildbots/ppc64le-flang-mlir-rhel-test/ppc64le-flang-rhel-clang-build/llvm-project/llvm/include/llvm/ADT/StringExtras.h:387:13: note: in instantiation of member function 'llvm::iterator_facade_base<llvm::mapped_iterator<mlir::tblgen::TypeParameter *, (lambda at /home/buildbots/ppc64le-flang-mlir-rhel-test/ppc64le-flang-rhel-clang-build/llvm-project/mlir/tools/mlir-tblgen/TypeDefGen.cpp:414:19), llvm::StringRef>, std::random_access_iterator_tag, llvm::StringRef, long, llvm::StringRef *, llvm::StringRef &>::operator->' requested here Len += I->size();
* [LTO] Add test to ensure objc-arc-contract is executed.Florian Hahn2021-01-131-0/+13
| | | | This test adds additional test coverage for upcoming refactorings.
* [ADT] Fix join_impl using the wrong size when calculating total lengthNathan James2021-01-131-1/+4
| | | | | | Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D83305
* Hwasan InitPrctl check for error using internal_iserrorMatthew Malcomson2021-01-131-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | When adding this function in https://reviews.llvm.org/D68794 I did not notice that internal_prctl has the API of the syscall to prctl rather than the API of the glibc (posix) wrapper. This means that the error return value is not necessarily -1 and that errno is not set by the call. For InitPrctl this means that the checks do not catch running on a kernel *without* the required ABI (not caught since I only tested this function correctly enables the ABI when it exists). This commit updates the two calls which check for an error condition to use `internal_iserror`. That function sets a provided integer to an equivalent errno value and returns a boolean to indicate success or not. Tested by running on a kernel that has this ABI and on one that does not. Verified that running on the kernel without this ABI the current code prints the provided error message and does not attempt to run the program. Verified that running on the kernel with this ABI the current code does not print an error message and turns on the ABI. All tests done on an AArch64 Linux machine. Reviewed By: eugenis Differential Revision: https://reviews.llvm.org/D94425
* [SVE] Add ISel pattern for addvlCullen Rhodes2021-01-138-28/+20
| | | | | | Reviewed By: cameron.mcinally Differential Revision: https://reviews.llvm.org/D94504
* [X86][AVX] combineVectorSignBitsTruncation - limit AVX512 truncations to ↵Simon Pilgrim2021-01-133-17/+106
| | | | | | 128-bits (PR48727) rG73a44f437bf1 result in 256-bit packss/packus ops with additional shuffles that shuffle combining can sometimes try to convert back into a truncation.
* [AArch64][SVE] Remove chains of unnecessary SVE reinterpret intrinsicsJoe Ellis2021-01-132-11/+95
| | | | | | | | | | | | | | | | | | | | | | | | | This commit extends SVEIntrinsicOpts::optimizeConvertFromSVBool to identify and remove longer chains of redundant SVE reintepret intrinsics. For example, the following chain of redundant SVE reinterprets is now recognised as redundant: %a = <vscale x 2 x i1> %1 = <vscale x 16 x i1> @llvm.aarch64.sve.convert.to.svbool(<vscale x 2 x i1> %a) %2 = <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool(<vscale x 16 x i1> %1) %3 = <vscale x 16 x i1> @llvm.aarch64.sve.convert.to.svbool(<vscale x 4 x i1> %2) %4 = <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool(<vscale x 16 x i1> %3) %5 = <vscale x 16 x i1> @llvm.aarch64.sve.convert.to.svbool(<vscale x 4 x i1> %4) %6 = <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool(<vscale x 16 x i1> %5) ret <vscale x 2 x i1> %6 and will be replaced with: ret <vscale x 2 x i1> %a Eliminating these can sometimes mean emitting fewer unnecessary loads/stores when lowering to assembly. Differential Revision: https://reviews.llvm.org/D94074
* [NFC][InstructionCost] Use InstructionCost in ↵David Sherwood2021-01-131-4/+4
| | | | | | | | | | | | | | | Transforms/Scalar/RewriteStatepointsForGC.cpp In places where we calculate costs using TTI.getXXXCost() interfaces I have changed the code to use InstructionCost instead of unsigned. The change is non functional since InstructionCost behaves in the same way as an integer for valid costs. Currently the getXXXCost() functions used in this file do not return invalid costs. See this patch for the introduction of the type: https://reviews.llvm.org/D91174 See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2020-November/146408.html Differential revision: https://reviews.llvm.org/D94484
* [LTO] Replace anonymous namespace with static functions (NFC).Florian Hahn2021-01-131-16/+15
| | | | | | | | | | Only class declarations should be inside anonymous namespaces (https://llvm.org/docs/CodingStandards.html#anonymous-namespaces) Instead of using a anonymous namespace, just mark the functions in it as static (some of them already were). This simplifies the diff for D94486.
* [clang][driver] Restore the original help text for `-I`Andrzej Warzynski2021-01-132-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | The help text for `-I` was recently expanded in [1]. The expanded version focuses on explaining the semantics of `-I` in Clang. We are now in the process of adding support for `-I` in Flang and this new description is incompatible with the semantics of `-I` in Flang. This was brought up in this review: * https://reviews.llvm.org/D93453 This patch reverts the original change in Options.td. This way the help text for `-I` remains generic enough so that it applies to both Clang and Flang. The expanded description of `-I` from [1] is moved to the `DocBrief` field for `-I`. This field is prioritised over the help text when generating ClangCommandLineReference.rst, so the user facing documentation for Clang retains the expanded description: * https://clang.llvm.org/docs/ClangCommandLineReference.html `DocBrief` fields are currently not used in Flang. As requested in the reviews, the help text and the expanded description are slightly refined. [1] Commit: 8dd4e3ceb804a58bcf25e6856fc6fde5e1995a66 Differential Revision: https://reviews.llvm.org/D94169
* [obj2yaml,yaml2obj] - Refine how we set/dump the sh_entsize field.Georgii Rymar2021-01-139-125/+143
| | | | | | | | | | This reuses the code from yaml2obj (moves it to ELFYAML.h). With it we can set the `sh_entsize` in a single place in `obj2yaml`. Note that it also fixes a bug of `yaml2obj`: we do not set the `sh_entsize` field for the `SHT_ARM_EXIDX` section properly. Differential revision: https://reviews.llvm.org/D93858
* [ARM] Update isVMOVNOriginalMask to handle single input shuffle vectorsDavid Green2021-01-132-99/+22
| | | | | | | | | The isVMOVNOriginalMask was previously only checking for two input shuffles that could be better expanded as vmovn nodes. This expands that to single input shuffles that will later be legalized to multiple vectors. Differential Revision: https://reviews.llvm.org/D94189
* [llvm-readelf/obj] - Add support of multiple SHT_SYMTAB_SHNDX sections.Georgii Rymar2021-01-1313-96/+593
| | | | | | | | | | | | | | | | | Currently we don't support multiple SHT_SYMTAB_SHNDX sections and the DT_SYMTAB_SHNDX tag currently. This patch implements it and fixes the https://bugs.llvm.org/show_bug.cgi?id=43991. I had to introduce the `struct DataRegion` to ELF.h, it is used to represent a region that might have no known size. It is needed, because we don't know the size of the extended section indices table when it is located via DT_SYMTAB_SHNDX. In this case we still want to validate that we don't read past the end of the file. Differential revision: https://reviews.llvm.org/D92923
* [ARM] Additional tests for different interleaving patterns. NFCDavid Green2021-01-134-6/+525
|
* [Verifier] Add tied-ness verification to statepoint intsructionSerguei Katkov2021-01-132-0/+46
| | | | | | | Reviewers: reames, dantrushin Reviewed By: reames, dantrushin Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D94483