- Aug 10, 2020
-
-
Vitaly Buka authored
-
Gousemoodhin Nadaf authored
In the handleIntToFloatConversion() function, 6th parameter is ConvertFloat, 7th parameter is ConvertInt. Reviewed By: njames93, xbolva00 Differential Revision: https://reviews.llvm.org/D85568
-
Craig Topper authored
Test case seems to work so I guess whatever lead to it being commented out with a FIXME has been fixed.
-
Piotr Sobczak authored
Fix 64-bit copy to SCC by restricting the pattern resulting in such a copy to subtargets supporting 64-bit scalar compare, and mapping the copy to S_CMP_LG_U64. Before introducing the S_CSELECT pattern with explicit SCC (0045786f), there was no need for handling 64-bit copy to SCC ($scc = COPY sreg_64). The proposed handling to read only the low bits was however based on a false premise that it is only one bit that matters, while in fact the copy source might be a vector of booleans and all bits need to be considered. The practical problem of mapping the 64-bit copy to SCC is that the natural instruction to use (S_CMP_LG_U64) is not available on old hardware. Fix it by restricting the problematic pattern to subtargets supporting the instruction (hasScalarCompareEq64). Differential Revision: https://reviews.llvm.org/D85207
-
Florian Hahn authored
This should fix a bunch of buildbot failures.
-
Florian Hahn authored
Making use of undef is not safe if the simplification result is not used to replace all uses of the result. This leads to problems in NewGVN, which does not replace all uses in the IR directly. See PR33165 for more details. This patch adds an option to SimplifyQuery to disable the use of undef. Note that I've only guarded uses if isa<UndefValue>/m_Undef where SimplifyQuery is currently available. If we agree on the general direction, I'll update the remaining uses. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D84792
-
- Aug 09, 2020
-
-
Florian Hahn authored
The selected cast must properly dominate the Builder's IP, so we cannot re-use the cast, if it matches the builder's IP.
-
Aditya Kumar authored
Add support for (if enabled) splitting cold functions into a separate section in order to further boost locality of hot code. Authored by: rjf (Ruijie Fang) Reviewed by: hiraditya,rcorcs,vsk Differential Revision: https://reviews.llvm.org/D85331
-
Dávid Bolvanský authored
-
Dávid Bolvanský authored
-
Sanjay Patel authored
This patch was adjusted to match the most basic pattern that starts with an insertelement (so there's no extract created here). Hopefully, that removes any concern about interfering with other passes. Ie, the transform should almost always be profitable. We could make an argument that this could be part of canonicalization, but we conservatively try not to create vector ops from scalar ops in passes like instcombine. If the transform is not profitable, the backend should be able to re-scalarize the load. Differential Revision: https://reviews.llvm.org/D81766
-
Florian Hahn authored
Currently the SCEVExpander tries to re-use existing casts, even if they are not exactly at the insertion point it was asked to create the cast. To do so in some case, it creates a new cast at the insertion point and updates all users to use the new cast. This behavior is problematic, because it changes the IR outside of the instructions created during the expansion. Therefore we cannot completely undo all changes made during expansion. This re-use should be only an extra optimization, so only using the new cast in the expanded instructions should not be a correctness issue. There are many cases equivalent instructions are created during expansion. This patch also adjusts findInsertPointAfter to skip instructions inserted during expansion. This enables re-using existing casts without the renaming any uses, by picking a better insertion point. Reviewed By: efriedma, lebedev.ri Differential Revision: https://reviews.llvm.org/D84399
-
Michał Górny authored
Reuse LLVM's CMakeLists.txt for gtest/gmock instead of reinventing them in Polly. This fixes a lot of linking errors due to not linking LLVMSupport in for me. Differential Revision: https://reviews.llvm.org/D85280
-
Dávid Bolvanský authored
-
David Green authored
This adds patterns for v16i16's vecreduce, using all the existing code to go via an i32 VADDV/VMLAV and truncating the result. Differential Revision: https://reviews.llvm.org/D85452
-
David Green authored
This allows vecreduce_add in loops so that we can tailpredicate them. Differential Revision: https://reviews.llvm.org/D85454
-
David Green authored
This formats some of the MVE patterns, and adds a missing Predicates = [HasMVEInt] to some VRHADD patterns I noticed as going through. Although I don't believe NEON would ever use the patterns (as it would use ADDL and VSHRN instead) they should ideally be predicated on having MVE instructions.
-
Georgii Rymar authored
It adds the proper warnings reporting and updates the mips-reginfo.test to remove using of the precompiled binary. Differential revision: https://reviews.llvm.org/D85511
-
Georgii Rymar authored
This patch does the following: 1) Removes mips-options.test and the corresponding Inputs/mips-options.elf-mips64el binary: This is a test that checks that --dynamic-table is able to print the DT_MIPS_OPTIONS tag. We are testing it in dynamic-tags-machine-specific.test already. (https://github.com/llvm/llvm-project/blob/master/llvm/test/tools/llvm-readobj/ELF/dynamic-tags-machine-specific.test#L235) 2) Removes mips-rld-map-rel.test and the corresponding Inputs/mips-rld-map-rel.elf-mipsel binary. This is a test that checks that --dynamic-table is able to print the DT_MIPS_RLD_MAP_REL tag. We are testing it in dynamic-tags-machine-specific.test already. (https://github.com/llvm/llvm-project/blob/master/llvm/test/tools/llvm-readobj/ELF/dynamic-tags-machine-specific.test#L257) 3) Removes ppc64-glink.test test and the corresponding Inputs/ppc64.exe binary. This is a test that checks that --dynamic-table is able to print the DT_PPC64_GLINK tag. We are testing it in dynamic-tags-machine-specific.test already. (https://github.com/llvm/llvm-project/blob/master/llvm/test/tools/llvm-readobj/ELF/dynamic-tags-machine-specific.test#L337) Differential revision: https://reviews.llvm.org/D85515
-
Craig Topper authored
These all seem to be handled by tablegen pattern imports.
-
Uday Bondhugula authored
Fix misleading diagnostic error in affine.yield verifier + a clang-tidy fix. Differential Revision: https://reviews.llvm.org/D85587
-
Craig Topper authored
[DAGCombiner] Teach SimplifySetCC SETUGE X, SINTMIN -> SETLT X, 0 and SETULE X, SINTMAX -> SETGT X, -1. These aren't the canonical forms we'd get from InstCombine, but we do have X86 tests for them. Recognizing them is pretty cheap. While there make use of APInt:isSignedMinValue/isSignedMaxValue instead of creating a new APInt to compare with. Also use SelectionDAG::getAllOnesConstant helper to hide the all ones APInt creation.
-
Craig Topper authored
-
Vitaly Buka authored
This reverts commit 5fd49911. GUIDs don't match.
-
Vitaly Buka authored
This directly covers generateParamAccessSummary
-
Vitaly Buka authored
-
Fangrui Song authored
-
weihe authored
Implemented the `llvm-profdata overlap` feature for sample profiles. It reports weighted //similarity// and unweighted //overlap// metrics at program and function level for two input profiles. Similarity metrics are symmetric with regards to the order of two input profiles. By default, the tool only reports program-level summary. Users can look into function-level details via additional options `--function`, `--similarity-cutoff`, and `--value-cutoff`. The similarity metrics are designed as follows: * Program-level summary * Whole program profile similarity is an aggregate over function-level similarity `FS`: `PS = sum(FS(A) * avg_weight(A))` for all function `A`. * Whole program sample overlap: `PSO = common_samples / total_samples`. * Function overlap: `FO = #common_function / #total_function`. * Hot-function overlap: `HFO = #common_hot_function / #total_hot_function`. * Hot-block overlap: `HBO = #common_hot_block / #total_hot_block`. * Function-level details * Function-level similarity is an aggregate over line/block-level similarities `BS` of all sample lines/blocks in the function, weighted by the closeness of the function's weights in two profiles: `FS = sum(BS(i)) * (1 - weight_distance(A))`. * Function-level sample overlap: `FSO = common_samples / total_samples` for samples in the function. Reviewed By: wenlei, hoyFB, wmi Differential Revision: https://reviews.llvm.org/D83852 -
Petr Hosek authored
This reverts commit ccbc1485 which is still failing on the Windows MLIR bots.
-
Petr Hosek authored
Rather than handling zlib handling manually, use find_package from CMake to find zlib properly. Use this to normalize the LLVM_ENABLE_ZLIB, HAVE_ZLIB, HAVE_ZLIB_H. Furthermore, require zlib if LLVM_ENABLE_ZLIB is set to YES, which requires the distributor to explicitly select whether zlib is enabled or not. This simplifies the CMake handling and usage in the rest of the tooling. This is a reland of abb00753 with all followup changes and fixes that should address issues that were reported in PR44780. Differential Revision: https://reviews.llvm.org/D79219
-
Brad Smith authored
-
Thomas Lively authored
Fixes PR47040, in which an assertion was improperly triggered during FastISel's address computation. The issue was that an `Address` set to be relative to the FrameIndex with offset zero was incorrectly considered to have an unset base. When the left hand side of an add set the Address to be 0 off the FrameIndex, the right side would not detect that the Address base had already been set and could try to set the Address to be relative to a register instead, triggering an assertion. This patch fixes the issue by explicitly tracking whether an `Address` has been set rather than interpreting an offset of zero to mean the `Address` has not been set. Differential Revision: https://reviews.llvm.org/D85581
-
Brad Smith authored
-
Brad Smith authored
-
Vincent Zhao authored
This diff attempts to resolve the TODO in `getOpIndexSet` (formerly known as `getInstIndexSet`), which states "Add support to handle IfInsts surronding `op`". Major changes in this diff: 1. Overload `getIndexSet`. The overloaded version considers both `AffineForOp` and `AffineIfOp`. 2. The `getInstIndexSet` is updated accordingly: its name is changed to `getOpIndexSet` and its implementation is based on a new API `getIVs` instead of `getLoopIVs`. 3. Add `addAffineIfOpDomain` to `FlatAffineConstraints`, which extracts new constraints from the integer set of `AffineIfOp` and merges it to the current constraint system. 4. Update how a `Value` is determined as dim or symbol for `ValuePositionMap` in `buildDimAndSymbolPositionMaps`. Differential Revision: https://reviews.llvm.org/D84698
-
Craig Topper authored
This was blocking isTypeLegal call so that we could do a particular transform on illegal types before type legalization. But the we create a target specific node using that type. We shouldn't do that if the type isn't legal. So I think we should just always make sure the type is legal. I suspect that in order to get the condition VT to not be a vector of i1 we already completed type legalization anyway so this probably doesn't matter much in practice.
-
Roman Lebedev authored
It is not enough to replace all uses of users of the function with undef, the users, we only drop instruction users, so they may stick around. Let's try different approach - first drop bodies for all the functions we will drop, which should take care of blockaddress issue the previous rewrite was dealing with; then, after dropping *all* such bodies, replace remaining uses with undef (thus all the uses are either outside of functions, or are in kept functions) and then finally drop functions. This seems to work, and passes the *existing* test coverage, but it is possible that a new issue will be discovered later :) A new (previously crashing) test added.
-
Dávid Bolvanský authored
-
Craig Topper authored
-
Craig Topper authored
We currently fail to match this.
-