- Jan 24, 2021
-
-
Stella Laurenzo authored
* Adds a flag to MlirOperationState to enable result type inference using the InferTypeOpInterface. * I chose this level of implementation for a couple of reasons: a) In the creation flow is naturally where generated and custom builder code will be invoking such a thing b) it is a bit more efficient to share the data structure and unpacking vs having a standalone entry-point c) we can always decide to expose more of these interfaces with first-class APIs, but that doesn't preclude that we will always want to use this one in this way (and less API surface area for common things is better for API stability and evolution). * I struggled to find an appropriate way to test it since we don't link the test dialect into anything CAPI accessible at present. I opted instead for one of the simplest ops I found in a regular dialect which implements the interface. * This does not do any trait-based type selection. That will be left to generated tablegen wrapper...
-
Roman Lebedev authored
[NFC][SimplifyCFG] Extract CloneInstructionsIntoPredecessorBlockAndUpdateSSAUses() out of PerformBranchToCommonDestFolding() To be used in PerformValueComparisonIntoPredecessorFolding()
-
Roman Lebedev authored
-
Roman Lebedev authored
[NFC][SimplifyCFG] Extract PerformValueComparisonIntoPredecessorFolding() out of FoldValueComparisonIntoPredecessors() Less nested code is much easier to follow and modify.
-
Nikita Popov authored
Add an intrinsic type class to represent the llvm.experimental.noalias.scope.decl intrinsic, to make code working with it a bit nicer by hiding the metadata extraction from view.
-
Arthur Eubanks authored
This is controlled by the ENABLE_EXPERIMENTAL_NEW_PASS_MANAGER CMake flag. https://lists.llvm.org/pipermail/llvm-dev/2021-January/147993.html Reviewed By: ychen, asbirlea Differential Revision: https://reviews.llvm.org/D95254
-
Arthur Eubanks authored
The new PM inliner does not delete dead calls.
-
Jon Chesterfield authored
[libomptarget][cuda] Call v2 functions explicitly rtl.cpp calls functions like cuMemFree that are replaced by a macro in cuda.h with cuMemFree_v2. This patch changes the source to use the v2 names consistently. See also D95104, D95155 for the idea. Alternatives are to use a mixture, e.g. call the macro names and explictly dlopen the _v2 names, or to keep the current status where the symbols are replaced by macros in both files Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D95274
-
Nikita Popov authored
In both cases, optimization is prevented because "br X == C || X == C2" is converted into a switch. In one case loop rotation is blocked, in the other vectorization.
-
Nikita Popov authored
-
Shilei Tian authored
D94700 removed the static library so we no longer need to pass `-llibomptarget-nvptx` to `nvlink`. Since the bitcode library is the only device runtime for now, instead of emitting a warning when it is not found, an error should be raised. We also set a new option `libomptarget-nvptx-bc-path` to let user choose which bitcode library is being used. Reviewed By: JonChesterfield Differential Revision: https://reviews.llvm.org/D95161
-
Kazu Hirata authored
This reverts commit cc7a2382. The X86WinEHState.cpp hunk seems to break certain builds.
-
Mark de Wever authored
During the review of D91986 it has been discovered the in C++11 deprecated `throw()` exception specification has been removed in C++20. Removed the part of the test code using this feature.
-
Florian Hahn authored
This patch adds a new InstModificationIRStrategy to mutate flags/options for instructions. For example, it may add or remove nuw/nsw flags from add, mul, sub, shl instructions or change the predicate for icmp instructions. Subtle changes such as those mentioned above should lead to a more interesting range of inputs. The presence or absence of overflow flags can expose subtle bugs, for example. Reviewed By: bogner Differential Revision: https://reviews.llvm.org/D94905
-
Michael Kruse authored
ZoneAlgorithms's computePHI relies on being provided with consistent a schedule to compute the statement prodecessors of a statement containing PHINodes. Otherwise unexpected results such as PHI nodes with multiple predecessors can occur which would result in problems in the algorithms expecting consistent data. In the added test case, statement instances are scrubbed from the SCoP their execution would result in undefined behavior (Due to a nsw overflow). As already being undefined behavior in LLVM-IR, neither AssumedContext nor InvalidContext are updated, giving computePHI no means to avoid these cases. Intoduce a new SCoP property, the DefinedBehaviorContext, that among the runtime-checked conditions, also tracks the assumptions not needing a runtime check, in particular those affecting the assumed control flow. This replaces the manual combination of the 3 other contexts that was already done in computePHI and setNewAccessRelation. Curr...
-
Michael Kruse authored
-
Michael Kruse authored
-
Michael Kruse authored
This simplifies the access relations.
-
Kazu Hirata authored
-
Kazu Hirata authored
-
Kazu Hirata authored
LoopUtils.h needs ICFLoopSafetyInfo but relies on a forward declaration of ICFLoopSafetyInfo in IVDescriptors.h. This patch adds a forward declaration right in LoopUtils.h. While we are at it, this patch removes the one in IVDescriptors.h, where it is unnecessary.
-
Florian Hahn authored
Some utilities used by InstCombine, like SimplifyLibCalls, may add new instructions and replace the uses of a call, but return nullptr because the inserted call produces multiple results. Previously, the replaced library calls would get removed by InstCombine's deleter, but after 29207707 this may not happen, if the willreturn attribute is missing. As a work-around, update replaceInstUsesWith to set MadeIRChange, if it replaces any uses. This catches the cases where it is used as replacer by utilities used by InstCombine and seems useful in general; updating uses will modify the IR. This fixes an expensive-check failure when replacing @__sinpif/@__cospifi with @__sincospif_sret.
-
Mark de Wever authored
Implements parts of: - P0898R3 Standard Library Concepts - P1754 Rename concepts to standard_case for C++20, while we still can Reviewed By: ldionne, miscco, #libc Differential Revision: https://reviews.llvm.org/D91004
-
Dan Liew authored
In that change I forgot to update the call to `AsanThread::ThreadStart()` in `asan_win.cpp`.
-
Ben Shi authored
Reviewed By: dylanmckay Differential Revision: https://reviews.llvm.org/D93976
-
Sanjay Patel authored
As shown in the test diffs, we could miscompile by propagating flags that did not exist in the original code. The flags required for fmin/fmax reductions will be fixed in a follow-up patch.
-
Sanjay Patel authored
-
Florian Hahn authored
With the addition of the `willreturn` attribute, functions that may not return (e.g. due to an infinite loop) are well defined, if they are not marked as `willreturn`. This patch updates `wouldInstructionBeTriviallyDead` to not consider calls that may not return as dead. This patch still provides an escape hatch for intrinsics, which are still assumed as willreturn unconditionally. It will be removed once all intrinsics definitions have been reviewed and updated. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D94106
-
- Jan 23, 2021
-
-
Ben Shi authored
Reviewed By: dylanmckay Differential Revision: https://reviews.llvm.org/D89047
-
Pedro Tammela authored
NFC
-
Pedro Tammela authored
This patch adds the integer handling typemaps and the typemap for string returning functions. The integer handling typemaps overrides SWIG's own typemaps to distinct the handling of integers from floating point. The typemap for string returning functions is a port of Python's typemap. Differential Revision: https://reviews.llvm.org/D94937
-
LLVM GN Syncbot authored
-
Ayke van Laethem authored
This reverts commit 2325157c. Unfortunately this commit produces linker errors on some builds: http://lab.llvm.org:8011/#/builders/57/builds/3704 http://lab.llvm.org:8011/#/builders/112/builds/3216 http://lab.llvm.org:8011/#/builders/121/builds/3900
-
Roman Lebedev authored
[SimplifyCFG] Change 'LoopHeaders' to be ArrayRef<WeakVH>, not a naked set, thus avoiding dangling pointers If i change it to AssertingVH instead, a number of existing tests fail, which means we don't consistently remove from the set when deleting blocks, which means newly-created blocks may happen to appear in that set if they happen to occupy the same memory chunk as did some block that was in the set originally. There are many places where we delete blocks, and while we could probably consistently delete from LoopHeaders when deleting a block in transforms located in SimplifyCFG.cpp itself, transforms located elsewhere (Local.cpp/BasicBlockUtils.cpp) also may delete blocks, and it doesn't seem good to teach them to deal with it. Since we at most only ever delete from LoopHeaders, let's just delegate to WeakVH to do that automatically. But to be honest, personally, i'm not sure that the idea behind LoopHeaders is sound.
-
LLVM GN Syncbot authored
-
Ayke van Laethem authored
This change adds an AssemblerInvocation class, similar to the CompilerInvocation class. It can be used to invoke cc1as directly. The project I'm working on wants to compile Clang and use it as a static library. For that to work, there must be a way to invoke the assembler programmatically, using the same arguments as you would otherwise pass to cc1as. Differential Revision: https://reviews.llvm.org/D63852
-
Nikita Popov authored
LSR should be dropping nowrap flags when adding new postinc users.
-
Florian Hahn authored
The target features are obtained as a list of features/attributes. Instead of storing them in a single string, store the vector. This matches lto::Config's behavior and simplifies the transition to lto::backend(). Reviewed By: tejohnson Differential Revision: https://reviews.llvm.org/D95224
-
Jeroen Dobbelaere authored
Insert a llvm.experimental.noalias.scope.decl intrinsic that identifies where a noalias argument was inlined. This patch includes some refactorings from D90104. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D93040
-
Simon Pilgrim authored
Avoid string copies and fix clang-tidy warning.
-