- Jan 24, 2021
-
-
Jeroen Dobbelaere authored
This is a fix for https://bugs.llvm.org/show_bug.cgi?id=39282. Compared to D90104, this version is based on part of the full restrict patched (D68484) and uses the `@llvm.experimental.noalias.scope.decl` intrinsic to track the location where !noalias and !alias.scope scopes have been introduced. This allows us to only duplicate the scopes that are really needed. Notes: - it also includes changes and tests from D90104 Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D92887
-
Lang Hames authored
Patch by Shivam Gupta. Thanks Shivam! Differential Revision: https://reviews.llvm.org/D92280
-
Jon Chesterfield authored
[libomptarget][nvptx] Replace cuda atomic primitives with clang intrinsics Tested by diff of IR generated for target_impl.cu before and after. NFC. Part of removing deviceRTL build time dependency on cuda SDK. Reviewed By: tianshilei1992 Differential Revision: https://reviews.llvm.org/D95294
-
Nikita Popov authored
This is similar to D94106, but for the isGuaranteedToTransferExecutionToSuccessor() helper. We should not assume that readonly functions will return, as this is only true for mustprogress functions (in which case we already infer willreturn). As with the DCE change, for now continue assuming that readonly intrinsics will return, as not all target intrinsics have been annotated yet. Differential Revision: https://reviews.llvm.org/D95288
-
Craig Topper authored
[RISCV] Make the code in MatchSLLIUW ignore the lower bits of the AND mask where the shift has guaranteed zeros. This avoids being dependent on SimplifyDemandedBits having cleared those bits. It could make sense to teach SimplifyDemandedBits to keep all lower bits 1 in an AND mask when possible. This could be implemented with slli+srli in the general case rather than needing to materialize the constant.
-
Lang Hames authored
Previously FDE field names were used, but the fixup kind used for a field can vary based on the pointer encoding. This change will improve readability / maintainability when EH-frame support is added to JITLink/ELF.
-
Ben Shi authored
Reviewed By: dylanmckay Differential Revision: https://reviews.llvm.org/D90678
-
Michael Kruse authored
Address the compiler warning OMPIRBuilder.cpp:1232:27: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Wsign-compare]
-
Michael Kruse authored
The tileLoops method implements the code generation part of the tile directive introduced in OpenMP 5.1. It takes a list of loops forming a loop nest, tiles it, and returns the CanonicalLoopInfo representing the generated loops. The implementation takes n CanonicalLoopInfos, n tile size Values and returns 2*n new CanonicalLoopInfos. The input CanonicalLoopInfos are invalidated and BBs not reused in the new loop nest removed from the function. In a modified version of D76342, I was able to correctly compile and execute a tiled loop nest. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D92974
-
Craig Topper authored
-
Zbigniew Sarbinowski authored
Defining PATH_MAX to _XOPEN_PATH_MAX which is the closest macro available on z/OS. Note that this value is 1024 which is 4 times smaller from same macro on Linux. Reviewed By: #libc, ldionne, hubert.reinterpretcast Differential Revision: https://reviews.llvm.org/D92110
-
Craig Topper authored
-
Craig Topper authored
The sro/slo instructions ignore extra bits in the shift amount, so we can ignore the mask just like we do for sll, srl, and sra.
-
Craig Topper authored
We try to do this during DAG combine with SimplifyDemandedBits, but it fails if there are multiple nodes using the AND. For example, multiple shifts using the same shift amount.
-
Jon Chesterfield authored
[libomptarget][amdgpu][nfc] Update comments Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D95295
-
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 wrappers. Differential Revision: https://reviews.llvm.org/D95283
-
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
-