- Jan 04, 2022
-
-
LLVM GN Syncbot authored
-
Stanislav Gatev authored
This is part of the implementation of the dataflow analysis framework. See "[RFC] A dataflow analysis framework for Clang AST" on cfe-dev. Reviewed-by: xazax.hun Differential Revision: https://reviews.llvm.org/D116368
-
Nikita Popov authored
Indirect inline asm operands may require the materialization of a memory access according to the pointer element type. As this will no longer be available with opaque pointers, we require it to be explicitly annotated using the elementtype attribute, for example: define void @test(i32* %p, i32 %x) { call void asm "addl $1, $0", "=*rm,r"(i32* elementtype(i32) %p, i32 %x) ret void } This patch only includes the LangRef change and Verifier updates to allow adding the elementtype attribute in this position. It does not yet enforce this, as this will require changes on the clang side (and test updates) first. Something I'm a bit unsure about is whether we really need the elementtype for all indirect constraints, rather than only indirect register constraints. I think indirect memory constraints might not strictly need it (though the backend code is written in a way that does require it). I think it's okay to just make this a general requirement though, as this means we don't need to carefully deal with multiple or alternative constraints. In addition, I believe that MemorySanitizer benefits from having the element type even in cases where it may not be strictly necessary for normal lowering (https://github.com/llvm/llvm-project/blob/cd2b050fa4995b75b9c36fae16c0d9f105b67585/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp#L4066). Differential Revision: https://reviews.llvm.org/D116531 -
Nikita Popov authored
Fix a build warning.
-
Nikita Popov authored
Currently, the code in TargetLoweringObjectFile only assigns @init_array section type to plain .init_array sections, but not prioritized sections like .init_array.00001. This is inconsistent with the interpretation in the AsmParser (see https://github.com/llvm/llvm-project/blob/791523bae6153b13bb41ba05c9fc89e502cc4a1a/llvm/lib/MC/MCParser/ELFAsmParser.cpp#L621-L632) and upcoming expectations in LLD (see https://github.com/rust-lang/rust/issues/92181 for context). This patch assigns @init_array section type to all sections with an .init_array prefix. The same is done for .fini_array and .preinit_array as well. With that, the logic matches the AsmParser. Differential Revision: https://reviews.llvm.org/D116528
-
Nikita Popov authored
Global ctor evaluation currently models memory as a map from Constant* to Constant*. For this to be correct, it is required that there is only a single Constant* referencing a given memory location. The Evaluator tries to ensure this by imposing certain limitations that could result in ambiguities (by limiting types, casts and GEP formats), but ultimately still fails, as can be seen in PR51879. The approach is fundamentally fragile and will get more so with opaque pointers. My original thought was to instead store memory for each global as an offset => value representation. However, we also need to make sure that we can actually rematerialize the modified global initializer into a Constant in the end, which may not be possible if we allow arbitrary writes. What this patch does instead is to represent globals as a MutableValue, which is either a Constant* or a MutableAggregate*. The mutable aggregate exists to allow efficient mutation of individual aggregate elements, as mutating an element on a Constant would require interning a new constant. When a write to the Constant* is made, it is converted into a MutableAggregate* as needed. I believe this should make the evaluator more robust, compatible with opaque pointers, and a bit simpler as well. Fixes https://github.com/llvm/llvm-project/issues/51221. Differential Revision: https://reviews.llvm.org/D115530
-
Marek Kurdej authored
Fixes https://github.com/llvm/llvm-project/issues/27146. Fixes https://github.com/llvm/llvm-project/issues/52943. Before: ``` namespace ns { void foo() { std::variant<int, double> v; std::visit(overloaded{[](auto &&) -> int (*)[] { return nullptr; }}, v); } } // namespace ns int break_me() { int x = 42; return int{[x = x]() { return x; }()}; } ``` got formatted as: ``` namespace ns { void foo() { std::variant<int, double> v; std::visit(overloaded{[](auto &&) -> int (*)[] { return nullptr; } } // namespace ns , v); } } // namespace ns int break_me() { int x = 42; return int{[x = x](){return x; } () } ; } ``` Reviewed By: HazardyKnusperkeks, owenpan Differential Revision: https://reviews.llvm.org/D116553
-
Markus Böck authored
Exporting a llvm.landingpad operation with the cleanup flag set is currently ignored by the export code. Differential Revision: https://reviews.llvm.org/D116565
-
Nicolas Vasilache authored
By default, the listeners do nothing unless linked in. This revision allows the "Perf" and "Intel" Jit event listeners to be used. The "OProfile" event listener is not enabled at this time, the associated library structure is not well-isolated. Differential Revision: https://reviews.llvm.org/D116552
-
Jim Lin authored
-
Mikael Holmen authored
-
Ben Shi authored
This reverts commit 57232613. There are failures as reported in https://lab.llvm.org/buildbot#builders/16/builds/21638 https://lab.llvm.org/buildbot#builders/104/builds/5394
-
Freddy Ye authored
These two intrinsics are documented o SDM and intrinsic guide. Reviewed By: pengfei Differential Revision: https://reviews.llvm.org/D116325
-
Ben Shi authored
Reviewed By: aykevl Differential Revision: https://reviews.llvm.org/D115593
-
Jim Lin authored
-
Chuanqi Xu authored
The inlined llvm.coro.id should contain the function it refers to. The modifed test would caused the compiler crash under O2. See issue52912 for example.
-
Uday Bondhugula authored
NFC. Fix unused variable warning in PDLToPDLInterp.cpp. Differential Revision: https://reviews.llvm.org/D116571
-
Stanislav Funiak authored
This diff adds support to printing a Value when it is null. We encounter this situation when debugging the PDL bytcode execution (where a null Value is perfectly valid). Currently, the AsmPrinter crashes (with an assert in a cast) when it encounters such Value. We follow the same format used in other printed entities (e.g., null attribute). Reviewed By: mehdi_amini, bondhugula Differential Revision: https://reviews.llvm.org/D116084
-
Stanislav Funiak authored
Presently the result type verification checks if the type is used by a `pdl::OperationOp` inside the matcher. This is unnecessarily restrictive; the type could come from a `pdl::OperandOp or `pdl::OperandsOp` and still be inferrable. Reviewed By: rriddle, Mogball Differential Revision: https://reviews.llvm.org/D116083
-
Stanislav Funiak authored
This diff adds an integration test to multi-root PDL matching. It consists of two subtests: 1) A 1-layer perceptron with split forward / backward operations. 2) A 2-layer perceptron with fused forward / backward operations. These tests use a collection of hand-written patterns and TensorFlow operations to be matched. The first test has a DAG / SSA dominant resulting match; the second does not and is therefore stored in a graph region. This diff also includes two bug fixes: 1) Mark the pdl_interp dialect as a dependent in the TestPDLByteCodePass. This is needed, because we create ops from that dialect as a part of the PDL-to-PDLInterp lowering. 2) Fix of the starting index in the liveness range for the ForEach operations (bug exposed by the integration test). Reviewed By: Mogball Differential Revision: https://reviews.llvm.org/D116082
-
Stanislav Funiak authored
The tree merging of pattern predicates places the predicates in an unordered set. When the predicates are sorted, they are taken in the set order, not the insertion order. This results in nondeterministic behavior. One solution to this problem would be to use `SetVector`. However, the value `SetVector` does not provide a `find` function for fast O(1) lookups and stores the predicates twice -- once in the set and once in the vector, which is undesirable, because we store patternToAnswer in each predicate. A simpler solution is to store the tie breaking ID (which follows the insertion order), and use this ID to break any ties when comparing predicates. Reviewed By: Mogball Differential Revision: https://reviews.llvm.org/D116081
-
Stanislav Funiak authored
When the original version of multi-root patterns was reviewed, several improvements were made to the pdl_interp operations during the review process. Specifically, the "get users of a value at the specified operand index" was split up into "get users" and "compare the users' operands with that value". The iterative execution was also cleaned up to `pdl_interp.foreach`. However, the positions in the pdl-to-pdl_interp lowering were not similarly refactored. This introduced several problems, including hard-to-detect bugs in the lowering and duplicate evaluation of `pdl_interp.get_users`. This diff cleans up the positions. The "upward" `OperationPosition` was split-out into `UsersPosition` and `ForEachPosition`, and the operand comparison was replaced with a simple predicate. In the process, I fixed three bugs: 1. When multiple roots were had the same connector (i.e., a node that they shared with a subtree at the previously visited root), we would generate a single foreach loop rather than one foreach loop for each such root. The reason for this is that such connectors shared the position. The solution for this is to add root index as an id to the newly introduced `ForEachPosition`. 2. Previously, we would use `pdl_interp.get_operands` indiscriminately, whether or not the operand was variadic. We now correctly detect variadic operands and insert `pdl_interp.get_operand` when needed. 3. In certain corner cases, we would trigger the "connector has not been traversed yet" assertion. This was caused by not inserting the values during the upward traversal correctly. This has now been fixed. Reviewed By: Mogball Differential Revision: https://reviews.llvm.org/D116080
-
Jim Lin authored
Let all file header have the same style. NFC.
-
Fangrui Song authored
-
Dave Lee authored
-
Markus Böck authored
The result value of a llvm.invoke operation is currently not mapped to the corresponding llvm::Value* when exporting to LLVM IR. This leads to any later operations using the result to crash as it receives a nullptr. Differential Revision: https://reviews.llvm.org/D116564
-
Nicolas Vasilache authored
-
Björn Schäpers authored
This reverts commit 25f63791. Differential Revision: https://reviews.llvm.org/D115061
-
Björn Schäpers authored
Differential Revision: https://reviews.llvm.org/D115069
-
Björn Schäpers authored
* Give I[1] and I[-1] a name: - Easier to understand - Easier to debug (since you don't go through operator[] everytime) * TheLine->First != TheLine->Last follows since last is a l brace and first isn't. * Factor the check for is(tok::l_brace) out. * Drop else after return. Differential Revision: https://reviews.llvm.org/D115060
-
Markus Böck authored
In the post commit discussion of https://reviews.llvm.org/D116484 it was concluded that `--no-as-needed` should not be ignored. `--as-needed` stays ignored as it is already the default behaviour on COFF, which cannot be changed.
-
Kazu Hirata authored
gcc issues warnings on copy constructors that do not explicitly initialize the base class.
-
Louis Dionne authored
We don't cross-compile to 32 bits in the CI anymore.
-
Louis Dionne authored
-
John Ericson authored
In D116472 we created conditionally defined variables for the tools to unbreak the legacy build where they are in `llvm/tools`. The runtimes are not tools, so that flexibility doesn't matter. Still, it might be nice to define (unconditionally) and use the variable for the runtimes simply to make the code a bit clearer and document what is going on. Also, consistently put project dirs at the beginning, not end of `CMAKE_MODULE_PATH`. This ensures they will properly shadow similarly named stuff that happens to be later on the path. Reviewed By: mstorsjo, #libunwind, #libc, #libc_abi, ldionne Differential Revision: https://reviews.llvm.org/D116477
-
LLVM GN Syncbot authored
-
ksyx authored
This commit resolves GitHub issue #45895 (Bugzilla #46550), to add or remove empty line between definition blocks including namespaces, classes, structs, enums and functions. Reviewed By: MyDeveloperDay, curdeius, HazardyKnusperkeks Differential Revision: https://reviews.llvm.org/D116314
-
G. Pery authored
My team has a vendetta against lines ending with an open parenthesis, thought it might be useful for others too
😊 Reviewed By: HazardyKnusperkeks, curdeius Differential Revision: https://reviews.llvm.org/D116170 -
Philip Reames authored
This reverts commit 9bd22595. Seeing some bot failures which look plausibly connected. Revert while investigating/waiting for bots to stablize. e.g. https://lab.llvm.org/buildbot#builders/36/builds/15933
-