- Jun 01, 2020
-
-
James Henderson authored
This will ensure that nothing can ever start parsing data from a future sequence and part-read data will be returned as 0 instead. Reviewed by: aprantl, labath Differential Revision: https://reviews.llvm.org/D80796
-
Raphael Isemann authored
Summary: ClangExpressionSourceCode has different ways to wrap the user expression based on which context the expression is executed in. For example, if we're in a C++ member function we put the expression inside a fake member function of a fake class to make the evaluation possible. Similar things are done for Objective-C instance/static methods. There is also a default wrapping where we put the expression in a normal function just to make it possible to execute it. The way we currently define which kind of wrapping the expression needs is based on the `wrapping_language` we keep passing to the ClangExpressionSourceCode instance. We repurposed the language type enum for that variable to distinguish the cases above with the following mapping: * language = C_plus_plus -> member function wrapping * language = ObjC -> instance/static method wrapping (`is_static` distinguished between those two). * language = C -> normal function wrapping * all other cases like C_plus_plus11, Haskell etc. make our class a no-op that does mostly nothing. That mapping is currently not documented and just confusing as the `language` is unrelated to the expression language (and in the ClangUserExpression we even pretend that it *is* the actual language, but luckily never used it for anything). Some of the code in ClangExpressionSourceCode is also obviously thinking that this is the actual language of the expression as it checks for non-existent cases such as `ObjC_plus_plus` which is not part of the mapping. This patch makes a new enum to describe the four cases above (with instance/static Objective-C methods now being their own case). It also make that enum just a member of ClangExpressionSourceCode instead of having to pass the same value to the class repeatedly. This gets also rid of all the switch-case-checks for 'unknown' language such as C_plus_plus11 as this is no longer necessary. Reviewers: labath, JDevlieghere Reviewed By: labath Subscribers: abidh Differential Revision: https://reviews.llvm.org/D80793
-
Sanjay Patel authored
This is effectively reverting rGbfdc2552664d to avoid test churn while we figure out a better way forward. We at least salvage the warning on name conflict from that patch though. If we change the default string again, we may want to mass update tests at the same time. Alternatively, we could live with the poor naming if we change -instnamer. This also adds a test to LLVM as suggested in the post-commit review. There's a clang test that is also affected. That seems like a layering violation, but I have not looked at fixing that yet. Differential Revision: https://reviews.llvm.org/D80584
-
James Henderson authored
The debug_line_invalid.test test case was previously using the interpreted line table dumping to identify which opcodes have been parsed. This change moves to looking for the expected opcodes explicitly. This is probably a little clearer and also allows for testing some cases that wouldn't be easily identifiable from the interpreted table. Reviewed by: MaskRay Differential Revision: https://reviews.llvm.org/D80795
-
Simon Pilgrim authored
They are implicitly included in TargetFrameLowering.h and only ever used in TargetFrameLowering override methods.
-
Simon Pilgrim authored
-
Igor Kudrin authored
For most tables, we already use commas in headers. This set of patches unifies dumping the remaining ones. Differential Revision: https://reviews.llvm.org/D80806
-
Igor Kudrin authored
For most tables, we already use commas in headers. This set of patches unifies dumping the remaining ones. Differential Revision: https://reviews.llvm.org/D80806
-
Igor Kudrin authored
For most tables, we already use commas in headers. This set of patches unifies dumping the remaining ones. Differential Revision: https://reviews.llvm.org/D80806
-
Georgii Rymar authored
Partially reverts feee9864. Add explicit braces to a different place to fix "error: add explicit braces to avoid dangling else [-Werror,-Wdangling-else]"
-
Georgii Rymar authored
Should fix the BB (http://lab.llvm.org:8011/builders/clang-ppc64le-rhel/builds/3907/steps/build%20stage%201/logs/stdio): llvm-readobj/ELFDumper.cpp:4708:5: error: add explicit braces to avoid dangling else [-Werror,-Wdangling-else] else ^
-
Ehud Katz authored
This is a reimplementation of the `orderNodes` function, as the old implementation didn't take into account all cases. The new implementation uses SCCs instead of Loops to take account of irreducible loops. Fix PR41509 Differential Revision: https://reviews.llvm.org/D79037
-
Georgii Rymar authored
This improves the next points for broken hash tables: 1) Use reportUniqueWarning to prevent duplication when --hash-table and --elf-hash-histogram are used together. 2) Dump nbuckets and nchain fields. It is often possible to dump them even when the table itself goes past the EOF etc. Differential revision: https://reviews.llvm.org/D80373
-
Tim Northover authored
When a stack offset was too big to materialize in a single instruction, we were trying to do it in stages: adds xD, sp, #imm adds xD, xD, #imm Unfortunately, if xD is xzr then the second instruction doesn't exist and wouldn't do what was needed if it did. Instead we can use a temporary register for all but the last addition.
-
Djordje Todorovic authored
After the D70350, the retainedTypes: isn't being used for the purpose of call site debug info for extern calls, so it is safe to delete it from IR representation. We are also adding a test to ensure the subprogram isn't stored within the retainedTypes: from corresponding DICompileUnit. Differential Revision: https://reviews.llvm.org/D80369
-
Nathan James authored
Force the unittests on c++ code for matchers to specify the correct standard. Reviewed By: gribozavr2 Differential Revision: https://reviews.llvm.org/D80884
-
serge-sans-paille authored
Relying on the find method implies a roundtrip to the iterator world, which is not costless because iterator creation involves a few check to ensure the iterator is in a valid position (through the SmallPtrSetIteratorImpl::AdvanceIfNotValid method). It turns out that the result of SmallPtrSetImpl::find_imp is either valid or the EndPointer, so there's no need to go through that abstraction, and the compiler cannot guess it. Differential Revision: https://reviews.llvm.org/D80708
-
serge-sans-paille authored
Use internal_memcpy instead. Differential Revision: https://reviews.llvm.org/D80732
-
Chen Zheng authored
-
Li Rong Yi authored
Summary: Exploit vabsd* for for absolute difference of vectors on P9, for example: void foo (char *restrict p, char *restrict q, char *restrict t) { for (int i = 0; i < 16; i++) t[i] = abs (p[i] - q[i]); } this case should be matched to the HW instruction vabsdub. Reviewed By: steven.zhang Differential Revision: https://reviews.llvm.org/D80271
-
Nico Weber authored
-
Matt Arsenault authored
-
Fangrui Song authored
-
- May 31, 2020
-
-
Kirstóf Umann authored
-
Hubert Tong authored
This patch replaces a `std::string` local used for a concatentation with a `Twine` where the string was being passed into call.
-
Hubert Tong authored
Summary: This patch moves the setting of `LD_PRELOAD` "inwards" to avoid issues where the built library needs to be loaded with the dynamic linker that was configured with the build (and cannot, for example, be loaded by the dynamic linker associated with the `env` utility). Reviewed By: vitalybuka, nemanjai, jsji Differential Revision: https://reviews.llvm.org/D79695
-
Craig Topper authored
Previously we walked the users of any vector binop looking for more binops with the same opcode or phis that eventually ended up in a reduction. While this is simple it also means visiting the same nodes many times since we'll do a forward walk for each BinaryOperator in the chain. It was also far more general than what we have tests for or expect to see. This patch replaces the algorithm with a new method that starts at extract elements looking for a horizontal reduction. Once we find a reduction we walk through backwards through phis and adds to collect leaves that we can consider for rewriting. We only consider single use adds and phis. Except for a special case if the Add is used by a phi that forms a loop back to the Add. Including other single use Adds to support unrolled loops. Ultimately, I want to narrow the Adds, Phis, and final reduction based on the partial reduction we're doing. I still haven't figured out exactly what that looks like yet. But restricting the types of graphs we expect to handle seemed like a good first step. As does having all the leaves and the reduction at once. Differential Revision: https://reviews.llvm.org/D79971
-
Simon Pilgrim authored
-
Simon Pilgrim authored
This matches what we do for the full sized vector ops at the start of combineX86ShufflesRecursively, and helps getFauxShuffleMask extract more INSERT_SUBVECTOR patterns.
-
Chris Lattner authored
-
Nathan James authored
Motivated by [[ https://bugs.llvm.org/show_bug.cgi?id=46141 | clang-tidy crashed for unknown command line argument. ]] Reviewed By: aaron.ballman, thakis Differential Revision: https://reviews.llvm.org/D80879
-
Nathan James authored
This reverts commit f23ddbe3.
-
Sanjay Patel authored
The script was changes with: https://github.com/llvm/llvm-project/commit/bfdc2552664d6f0bb332a9c6a115877020f3c1df
-
Nathan James authored
Summary: Motivated by [[ https://bugs.llvm.org/show_bug.cgi?id=46141 | clang-tidy crashed for unknown command line argument. ]] Reviewers: aaron.ballman, alexfh Reviewed By: aaron.ballman Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D80879
-
Matt Arsenault authored
I inverted the mask when I ported to the new form of G_PTRMASK in 8bc03d21. I don't think this really broke anything, since G_VASTART isn't handled for types with an alignment higher than the stack alignment.
-
Sanjay Patel authored
As discussed in PR45951: https://bugs.llvm.org/show_bug.cgi?id=45951 There's a potential name collision between update_test_checks.py and -instnamer and/or manually-generated IR test files because all of them try to use the variable name that should never be used: "tmp". This patch proposes to reduce the odds of collision and adds a warning if we detect the problem. This will cause regression test churn when regenerating CHECK lines on existing files. Differential Revision: https://reviews.llvm.org/D80584
-
Sanjay Patel authored
-
Simon Pilgrim authored
As suggested on D79987.
-
Sanjay Patel authored
Goes with proposal in D80885. This is adapted from the InstCombine tests that were added for D50992 But these should be adjusted further to provide more interesting scenarios for x86-specific codegen. Eg, vector types/sizes will have different costs depending on ISA attributes. We also need to add tests that include a load of the scalar variable and add tests that include extra uses of the insert to further exercise the cost model.
-
Simon Pilgrim authored
Try to prevent future node creation issues (as detailed in PR45974) by making the SelectionDAG reference const, so it can still be used for analysis, but not node creation.
-