- Jun 29, 2020
-
-
LLVM GN Syncbot authored
-
Guillaume Chatelet authored
Context: -------- There are places in LLVM where we need to pack typed fields into opaque values. For instance, the `XXXInst` classes in `llvm/include/llvm/IR/Instructions.h` that extract informations from `Value::SubclassData` via `getSubclassDataFromInstruction()`. The bit twiddling is done manually: this impairs readability and prevent consistent handling of out of range values (e.g. https://github.com/llvm/llvm-project/blob/435b458ad0a4630e6126246a6865748104ccad06/llvm/include/llvm/IR/Instructions.h#L564) More importantly, the bit pattern is scattered throughout the implementation making it hard to pack additionnal fields or check for overlapping bits. Design decisions: ----------------- The Bitfield structs are to be declared together so it is clear which bits are used or not. The code is designed with simplicity in mind, hence a few limitations: - Storage is limited to a single integer, - Enum values have to be `unsigned`, - Storage type has to be `unsigned`, - There are no automatic detection of overlapping fields (packed bitfield declaration should help though), - The interface is C like so `storage` needs to be passed in everytime (code is simpler and lifetime considerations more obvious) RFC: http://lists.llvm.org/pipermail/llvm-dev/2020-June/142196.html Differential Revision: https://reviews.llvm.org/D81580
-
Sebastian Neubauer authored
It simplifies getting generic argument types from intrinsics. Differential Revision: https://reviews.llvm.org/D81084
-
Sander de Smalen authored
This patch proposes a naming convention for operations that take a general predicate (and are thus predicated) that specifies what happens to the false lanes. Currently the _PRED suffix is used, which doesn't really say much other than that it takes a predicate. In some instances this means it has merging predication and in other cases it means zeroing-predication. This patch also changes the order of operands to AArch64ISD::DUP_MERGE_PASSTHRU, to pass the predicate as the first operand, which is in line with all other predicates nodes. It takes the passthru value as an explicit passthru value, which is always passed as the last operand. Reviewers: paulwalker-arm, cameron.mcinally, eli.friedman, dancgr, efriedma Reviewed By: paulwalker-arm Tags: #llvm Differential Revision: https://reviews.llvm.org/D81850
-
Guillaume Chatelet authored
This patch makes access to `this` as a `T` uniform accross the file. Differential Revision: https://reviews.llvm.org/D82648
-
John Brawn authored
Commit a945037e moved the printing of the "PLEASE submit a bug report" message to the crash handler, but that means we don't print it when forcing a crash using FORCE_CLANG_DIAGNOSTICS_CRASH. Fix this by adding a function to get the bug report message and printing it when forcing a crash. Differential Revision: https://reviews.llvm.org/D81672
-
Guillaume Chatelet authored
This patch is part of a series to introduce an Alignment type. See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html See this patch for the introduction of the type: https://reviews.llvm.org/D64790 Differential Revision: https://reviews.llvm.org/D82743
-
Guillaume Chatelet authored
This patch is part of a series to introduce an Alignment type. See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html See this patch for the introduction of the type: https://reviews.llvm.org/D64790 Differential Revision: https://reviews.llvm.org/D82752
-
Simon Pilgrim authored
If a constant is only allsignbits in the demanded/active bits, then sign extend it to an allsignbits bool pattern for OR/XOR ops. This also requires SimplifyDemandedBits XOR handling to be modified to call ShrinkDemandedConstant on any (non-NOT) XOR pattern to account for non-splat cases. Next step towards fixing PR45808 - with this patch we now get a <-1,-1,0,0> v4i64 constant instead of <1,1,0,0>. Differential Revision: https://reviews.llvm.org/D82257
-
AndreyChurbanov authored
Differential Revision: https://reviews.llvm.org/D82301
-
Cullen Rhodes authored
Reviewers: sdesmalen, kmclaughlin, efriedma, david-arm, fpetrogalli Reviewed By: sdesmalen, fpetrogalli Differential Revision: https://reviews.llvm.org/D82391
-
Kerry McLaughlin authored
Summary: performPostLD1Combine will introduce either a LD1LANEpost or LD1DUPpost node, which will cause selection failure if the return type is a scalable vector. Reviewers: sdesmalen, c-rhodes, efriedma Reviewed By: efriedma Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, danielkiss, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D82670
-
LLVM GN Syncbot authored
-
Dmitri Gribenko authored
Summary: Previously, AST Matchers tests were using a custom way to run a test with a specific C++ standard version. I'm migrating them to a shared infrastructure to specify a Clang target from libClangTesting. I'm also changing tests for AST Matchers to run in multiple language standards versions, and under multiple triples that have different behavior with regards to templates. To keep the size of the patch manageable, in this patch I'm only migrating one file to get the process started and get feedback on this approach. One caveat is that increasing the number of test configuration does significantly increase the runtime of AST Matchers tests. On my machine, the test runtime increases from 2.0 to 6.0s. I think it is worth the improved test coverage. Reviewers: jdoerfert, ymandel Reviewed By: ymandel Subscribers: gribozavr2, jfb, sstefan1, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D82179
-
Simon Pilgrim authored
Pre-commit for D82257, this adds a DemandedElts arg to ShrinkDemandedConstant/targetShrinkDemandedConstant which will allow future patches to (optionally) add vector support.
-
Joachim Protze authored
Reviewed by: runlieb Differential Revision: https://reviews.llvm.org/D82452
-
Dmitri Gribenko authored
Summary: These tests show a bug: post-order traversal introduces an extra call to WalkUp*, that is not present in pre-order traversal. I'm fixing this bug in a follow-up commit. Reviewers: ymandel, eduucaldas Reviewed By: ymandel, eduucaldas Subscribers: gribozavr2, mgorny, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D82485
-
Tobias Gysi authored
Summary: The patch makes the index type lowering of the GPU to NVVM/ROCDL conversion configurable. It introduces a pass option that controls the bitwidth used when lowering index computations and uses the LowerToLLVMOptions structure to control the Standard to LLVM lowering. This commit fixes a use-after-free bug introduced by the reverted commit d10b1a38. It implements the following changes: - Added a getDefaultOptions method to the LowerToLLVMOptions struct that returns a reference to statically allocated default options. - Use the getDefaultOptions method to provide default LowerToLLVMOptions (instead of an initializer list). - Added comments to clarify the required lifetime of the LowerToLLVMOptions Reviewed By: ftynse Differential Revision: https://reviews.llvm.org/D82475
-
Alex Zinenko authored
`llvm.mlir.constant` was originally introduced as an LLVM dialect counterpart to `std.constant`. As such, it was supporting "function pointer" constants derived from the symbol name. This is different from `std.constant` that allows for creation of a "function" constant since MLIR, unlike LLVM IR, supports this. Later, `llvm.mlir.addressof` was introduced as an Op that obtains a constant pointer to a global in the LLVM dialect. It naturally extends to functions (in LLVM IR, functions are globals) and should be used for defining "function pointer" values instead. Fixes PR46344. Differential Revision: https://reviews.llvm.org/D82667
-
Georgy Komarov authored
SHT_GROUP sections contain a reference to a symbol indicating their "signature" symbol. The symbol table containing this symbol is referred to by the group section's sh_link field. If llvm-objcopy is instructed to remove the symbol table, it will emit an error. This fixes https://bugs.llvm.org/show_bug.cgi?id=46153. Reviewed By: jhenderson, Higuoxing Differential Revision: https://reviews.llvm.org/D82274
-
Guillaume Chatelet authored
`ShAmt / 8` can be a non power of two, this can lead to an invalid alignment. context: https://reviews.llvm.org/D41350#inline-749165 Differential Revision: https://reviews.llvm.org/D82565
-
Nathan James authored
This reverts commit 37cc4fa2. More investigation needed
-
Frederik Gossen authored
When the origin of a shape is an extent tensor the operation `get_extent` can be lowered directly to `extract_element`. This choice circumvents the necessity to materialize the shape in memory. Differential Revision: https://reviews.llvm.org/D82645
-
Frederik Gossen authored
When the shape is derived from a tensor argument the shape extent can be derived directly from that tensor with `std.dim`. This lowering pattern circumvents the necessity to materialize the shape in memory. Differential Revision: https://reviews.llvm.org/D82644
-
Nathan James authored
Added some sanity checks to figure out the cause of a (seemingly unrelated) test failure on mac. These can be removed should no issues arise on that platform again.
-
LLVM GN Syncbot authored
-
Xing GUO authored
Before this patch, the diagnostic message is printed to `errs()` directly, which makes it difficult to use `FailedWithMessage()` in unit testing. In this patch, we add a custom error handler for YAMLParser, which helps collect diagnostic messages and make it easy to use `FailedWithMessage()` to check error messages. Reviewed By: jhenderson, MaskRay Differential Revision: https://reviews.llvm.org/D82630
-
Alex Zinenko authored
The error message in the `std.constant` verifier for function-typed constants had the name of the undefined function hardcoded to `bar`. Report the actual name instead. Differential Revision: https://reviews.llvm.org/D82666
-
Alex Zinenko authored
This test largely predates MLIR testing guidelines. Update it to match the guidelines. In particular, avoid pattern-matching SSA value names, avoid unnecessary CHECK-NEXT, relax assumptions about the form of SSA names. Value-returning operations are still matched agaist _any_ name in order to check that the operation indeed produces values. Differential Revision: https://reviews.llvm.org/D82656
-
Kadir Cetinkaya authored
Reviewers: hokein, sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D82701
-
Nico Weber authored
This reverts commit b9306fd0 and follow-up 42a51587. It seems to build check-clang-tools on macOS, see comments on https://reviews.llvm.org/D82188
-
Fady Ghanim authored
Summary: Modified the OMPBuilderCBHelpers in the following ways: - Moved location of class definition and deleted all constructors - Moved OpenMP-specific address allocation of local variables - Moved threadprivate variable creation for the current thread Reviewers: jdoerfert Subscribers: yaxunl, guansong, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D79676
-
Sergey Dmitriev authored
Summary: Tidy up some CallGraph-related code in preparation for D82572. Reviewers: jdoerfert Reviewed By: jdoerfert Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D82686
-
Nikita Popov authored
Avoid changing this test if blocks get merged.
-
Nikita Popov authored
-
Craig Topper authored
Previously we inferred it if sse4.2 ended up being enabled after all feature processing. But writing -march=nehalem -mno-sse4.2 should have popcnt enabled.
-
cgyurgyik authored
splits it into two by using the value of the first byte to determine the length of the first string. Reviewed-by: PaulkaToast, Differential Revision: https://reviews.llvm.org/D82427 Summary: [libc] Since only one input is given, it is necessary to split the string into two containers so that they can be compared for the purposes of this fuzz test. This is done in the following manner: 1. Take the value of the first byte; this is size1. (Credits to @PaulkaToast for this idea). 2. size2 is the value of size - size1. 3. Copy the characters to new containers, data1 and data2 with corresponding sizes. 4. Add a null terminator to the first container, and verify the second container has a null terminator. 5. Verify output of strcmp. A simpler alternative considered was simply splitting the input data into two, but this means the two strings are always within +- 1 character of each other. This above implementation avoids this. ninja c...
-
Roman Lebedev authored
While InstCombine trivially converts that `srem` into a `urem`, it might happen later than wanted. SCEV should recognize this natively.
-
Xun Li authored
Summary: If we ever assign co_await to a temporary variable, such as foo(co_await expr), we generate AST that looks like this: MaterializedTemporaryExpr(CoawaitExpr(...)). MaterializedTemporaryExpr would emit an intrinsics that marks the lifetime start of the temporary storage. However such temporary storage will not be used until co_await is ready to write the result. Marking the lifetime start way too early causes extra storage to be put in the coroutine frame instead of the stack. As you can see from https://godbolt.org/z/zVx_eB, the frame generated for get_big_object2 is 12K, which contains a big_object object unnecessarily. After this patch, the frame size for get_big_object2 is now only 8K. There are still room for improvements, in particular, GCC has a 4K frame for this function. But that's a separate problem and not addressed in this patch. The basic idea of this patch is during CoroSplit, look for every local variable in the coroutine created through AllocaInst, identify all the lifetime start/end markers and the use of the variables, and sink the lifetime.start maker to the places as close to the first-ever use as possible. Reviewers: lewissbaker, modocache, junparser Reviewed By: junparser Subscribers: hiraditya, llvm-commits, rsmith, ChuanqiXu, cfe-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D82314
-
Sanjay Patel authored
-