- Sep 27, 2020
-
-
Aaron Puchert authored
The previous attempt in d34c8c70 didn't help (the problem was missing indentation), and another issue was introduced by a51d51a0.
-
Fangrui Song authored
Delete an implied condition (E.NumIn <= CB.NumIn)
-
Simon Pilgrim authored
-
Russell Yanofsky authored
Previous description didn't actually state the effect the attribute has on thread safety analysis (causing analysis to assume the capability is held). Previous description was also ambiguous about (or slightly overstated) the noreturn assumption made by thread safety analysis, implying the assumption had to be true about the function's behavior in general, and not just its behavior in places where it's used. Stating the assumption specifically should avoid a perceived need to disable thread safety analysis in places where only asserting that a specific capability is held would be better. Reviewed By: aaronpuchert, vasild Differential Revision: https://reviews.llvm.org/D87629
-
Riccardo Bertossa authored
SAVE statement, according to 8.6.14, must apply to the same scoping unit, that excludes nested scoping units. For example, if the SAVE statement is found in a MODULE, the functions contained in that module should not inherit the SAVE attribute. I think that the code was doing this, failing the following source: ``` MODULE pippo SAVE CONTAINS PURE FUNCTION fft_stick_index( ) IMPLICIT NONE INTEGER :: fft_stick_index INTEGER :: mc !error: A pure subprogram may not have a variable with the SAVE attribute END FUNCTION END MODULE ``` Differential Revision: https://reviews.llvm.org/D88279
-
Simon Pilgrim authored
-
Florian Hahn authored
There appears to be a mis-compile with MemorySSA-backed DSE in combination with llvm.lifetime.end. It currently appears like DSE is doing the right thing and the llvm.lifetime.end markers are incorrect. The reverted patch uncovers the mis-compile. This patch temporarily switches back to the legacy DSE implementation, while we investigate. This reverts commit 9d172c8e.
-
Nico Weber authored
-
Jacques Pienaar authored
Was testing on case insensitive config :-/
-
Jacques Pienaar authored
-
- Sep 26, 2020
-
-
Jacques Pienaar authored
-
Simon Pilgrim authored
Many x86/x64 SSE tests codegen are the same so avoid duplication
-
Simon Pilgrim authored
If we're multiplying all elements of a vector by '0' or '1' then we can more efficiently perform this as a clearing mask (that is likely to further simplify to a shuffle blend). This was noticed when reviewing D87502 but seems to help idiv/irem by constant cases even more as '0'/'1' values are often used for 'passthrough' cases. Differential Revision: https://reviews.llvm.org/D88225
-
Simon Pilgrim authored
-
Serge Pavlov authored
The test `AST/const-fpfeatures-diag.c` requires setting strict FP semantics, so it fails on targets where support of such semantic is limited.
-
Paul C. Anagnostopoulos authored
-
Florian Hahn authored
When looking for memory defs killed by memory terminators the code currently incorrectly ignores the size argument of llvm.lifetime.end. This patch updates the code to use isMemTerminator and updates isMemTerminator to use isOverwrite() to make sure locations that are outside the range marked as dead by llvm.lifetime.end are not considered. Note that isOverwrite is only used for llvm.lifetime.end, because free-like functions make the whole underlying object dead.
-
Florian Hahn authored
llvm.lifetime.end accepts a size parameters to limit the size of the location marked as dead. Add a few tests with stores to locations after the part that has been marked as dead.
-
Serge Pavlov authored
The change implements evaluation of constant floating point expressions under non-default rounding modes. The main objective was to support evaluation of global variable initializers, where constant rounding mode may be specified by `#pragma STDC FENV_ROUND`. Differential Revision: https://reviews.llvm.org/D87822
-
Tyker authored
This pervent very poor optimization caused by a signle assume like https://godbolt.org/z/EK3oMh baseline flags: -O3 patched flags: -O3 -mllvm --enable-knowledge-retention Before the patch ``` Metric: compile_time Program baseline patched diff test-suite :: CTMark/tramp3d-v4/tramp3d-v4.test 20.72 29.74 43.5% test-suite :: CTMark/Bullet/bullet.test 24.39 24.91 2.2% test-suite :: CTMark/7zip/7zip-benchmark.test 37.39 38.06 1.8% test-suite :: CTMark/kimwitu++/kc.test 11.76 11.94 1.5% test-suite :: CTMark/sqlite3/sqlite3.test 12.94 12.91 -0.3% test-suite :: CTMark/SPASS/SPASS.test 11.72 11.70 -0.2% test-suite :: CTMark/lencod/lencod.test 16.12 16.10 -0.1% test-suite :: CTMark/ClamAV/clamscan.test 13.31 13.30 -0.1% test-suite :: CTMark/mafft/pairlocalalign.test 9.12 9.12 -0.1% test-suite :: CTMark/consumer-typeset/consumer-typeset.test 9.34 9.34 -0.1% Geomean difference 4.2% Metric: compiler_Kinst_count Program baseline patched diff test-suite :: CTMark/tramp3d-v4/tramp3d-v4.test 107576069.87 172886418.90 60.7% test-suite :: CTMark/Bullet/bullet.test 123291865.66 125457117.96 1.8% test-suite :: CTMark/kimwitu++/kc.test 56347884.64 57298544.14 1.7% test-suite :: CTMark/7zip/7zip-benchmark.test 180637699.58 183341656.57 1.5% test-suite :: CTMark/sqlite3/sqlite3.test 66723788.85 66664692.80 -0.1% test-suite :: CTMark/ClamAV/clamscan.test 69581500.56 69597863.92 0.0% test-suite :: CTMark/lencod/lencod.test 94236501.48 94216545.32 -0.0% test-suite :: CTMark/SPASS/SPASS.test 58516756.95 58505089.07 -0.0% test-suite :: CTMark/consumer-typeset/consumer-typeset.test 48832815.53 48841989.39 0.0% test-suite :: CTMark/mafft/pairlocalalign.test 49682720.53 49686324.34 0.0% Geomean difference 5.4% ``` After the patch ``` Metric: compile_time Program baseline patched diff test-suite :: CTMark/tramp3d-v4/tramp3d-v4.test 20.70 22.40 8.2% test-suite :: CTMark/7zip/7zip-benchmark.test 37.13 38.05 2.5% test-suite :: CTMark/Bullet/bullet.test 24.25 24.83 2.4% test-suite :: CTMark/kimwitu++/kc.test 11.69 11.94 2.2% test-suite :: CTMark/ClamAV/clamscan.test 13.19 13.36 1.3% test-suite :: CTMark/lencod/lencod.test 16.02 16.19 1.1% test-suite :: CTMark/consumer-typeset/consumer-typeset.test 9.29 9.36 0.7% test-suite :: CTMark/SPASS/SPASS.test 11.64 11.73 0.7% test-suite :: CTMark/mafft/pairlocalalign.test 9.10 9.15 0.5% test-suite :: CTMark/sqlite3/sqlite3.test 12.95 12.96 0.0% Geomean difference 1.9% Metric: compiler_Kinst_count Program baseline patched diff test-suite :: CTMark/tramp3d-v4/tramp3d-v4.test 107590933.61 114044834.72 6.0% test-suite :: CTMark/kimwitu++/kc.test 56344526.77 57235806.29 1.6% test-suite :: CTMark/Bullet/bullet.test 123291285.10 125128334.97 1.5% test-suite :: CTMark/7zip/7zip-benchmark.test 180641540.10 183155706.39 1.4% test-suite :: CTMark/sqlite3/sqlite3.test 66725619.22 66668713.92 -0.1% test-suite :: CTMark/SPASS/SPASS.test 58509029.85 58478704.75 -0.1% test-suite :: CTMark/consumer-typeset/consumer-typeset.test 48843711.23 48826894.68 -0.0% test-suite :: CTMark/lencod/lencod.test 94233305.79 94207544.23 -0.0% test-suite :: CTMark/ClamAV/clamscan.test 69587887.66 69603549.90 0.0% test-suite :: CTMark/mafft/pairlocalalign.test 49686968.65 49689291.04 0.0% Geomean difference 1.0% ``` Reviewed By: jdoerfert, efriedma Differential Revision: https://reviews.llvm.org/D86816
-
Simon Atanasyan authored
This is a fix for PR47630. The regression is caused by the D78011. After this change the code starts to call the `emitGlobalConstantLargeInt` even for constants which requires eight bytes to store. Differential revision: https://reviews.llvm.org/D88261
-
Qiu Chaofan authored
This is like FastMathFlagGuard in IR. Since we use SDAG instance to get values, it's with SelectionDAG. By creating a FlagInserter in current scope, all values created by getNode will get the flags if no Flags argument provided. In this patch, I applied it to floating point operations folding part in DAG combiner, and removed Flags passing to getNode to show its effect. Other places in DAG combiner and other helper methods similar to getNode also need this. They can be done in follow-up patches. Reviewed By: spatel Differential Revision: https://reviews.llvm.org/D87361
-
Dmitry Antipov authored
-
Dmitry Antipov authored
Differential Revision: https://reviews.llvm.org/D87187
-
Fangrui Song authored
-
John Demme authored
Cleanup and add methods which https://reviews.llvm.org/D86904 requires. Breaking up to lower review load. Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D88267
-
Shilei Tian authored
Previously for nowait target, CG emitted a function call to `__tgt_target_nowait`, etc. However, in OpenMP RTL, these functions just directly call the no-nowait version, which means nowait is not working as expected. OpenMP specification says a target is acutally a target task, which is an untied and detachable task. It is natural to go to the direction that generates a task for a nowait target. However, OpenMP task has a problem that it must be within to a parallel region; otherwise the task will be executed immediately. As a result, if we directly wrap to a regular task, the `target nowait` outside of a parallel region is still a synchronous version. In D77609, I added the support for unshackled task in OpenMP RTL. Basically, unshackled task is a task that is not bound to any parallel region. So all nowait target will be tranformed into an unshackled task. In order to distinguish from regular task, a new flag bit is set for unshackled task. This flag will be used by RTL for later process. Since all target tasks are allocated via `__kmpc_omp_target_task_alloc`, and in current `libomptarget`, `__kmpc_omp_target_task_alloc` just calls `__kmpc_omp_task_alloc`. Therefore, we can modify the flag in `__kmpc_omp_target_task_alloc` so that we don't need to modify the FE too much. If users choose to opt out the feature, they just need to use a RTL w/o support of unshackled threads. As a result, in this patch, the `target nowait` region is simply wrapped into a regular task. Later once we have RTL support for unshackled tasks, the wrapped tasks can be executed by unshackled threads w/o changes in the FE. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D78075
-
Amara Emerson authored
Even if the type is s8/s16, assigning to gpr is preferable with constants because worst case we can select via a constant pool load, and without cross-bank copies to the FPR bank more patterns can be imported later.
-
Arthur Eubanks authored
This matches the legacy PM pass by having one constructor use command line flags, and the other use parameters to the pass. This fixes all tests under Transforms/LowerTypeTests using NPM. Reviewed By: ychen, pcc Differential Revision: https://reviews.llvm.org/D87845
-
Amara Emerson authored
-
Fangrui Song authored
-
Evandro Menezes authored
Add the RISC-V Bullet core to the driver tests.
-
Michael Collison authored
Add the pipeline model for the RISC-V Bullet micro architecture. Co-authored-by:Evandro Menezes <evandro.menezes@sifive.com>
-
Alexander Shaposhnikov authored
This patch performs a minor cleanup of the class Slice: static methods and constructors which take a pointer but assume that it's not null now take the argument by reference. NFC. Test plan: make check-all Differential revision: https://reviews.llvm.org/D88320
-
Craig Topper authored
[IR] Improve the description for Constant::isNormalFP to list all things that are not normal instead of just denormal. NFC
-
Evandro Menezes authored
-
Juneyoung Lee authored
[LangRef] Clarify the behavior of memory access instructions when pointers/sizes aren't well-defined This is a patch to LangRef that clarifies the behavior of load/store/memset/memcpy/memmove when the pointers or sizes are not well-defined as well. MSan detects a case when e.g., only lower bits of address are garbage when `-msan-check-access-address` is enabled, and it does not directly conflict with this patch because a C program should not use a pointer with undef bits and reasonable optimizations do not convert a well-defined pointer into a pointer with undef bits. This patch contains a definition of a well-defined value as well. Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D87994
-
Craig Disselkoen authored
This commit fixes a regression (from LLVM 10 to LLVM 11 RC3) in the LLVM C API. Previously, commit 1ee6ec2b removed the mask operand from the ShuffleVector instruction, storing the mask data separately in the instruction instead; this reduced the number of operands of ShuffleVector from 3 to 2. AFAICT, this change unintentionally caused a regression in the LLVM C API. Specifically, it is no longer possible to get the mask of a ShuffleVector instruction through the C API. This patch introduces new functions which together allow a C API user to get the mask of a ShuffleVector instruction, restoring the functionality which was previously available through LLVMGetOperand(). This patch also adds tests for this change to the llvm-c-test executable, which involved adding support for InsertElement, ExtractElement, and ShuffleVector itself (as well as constant vectors) to echo.cpp. Previously, vector operations weren't tested at all in echo.ll. I also fixed some typos in comments and help-text nearby these changes, which I happened to spot while developing this patch. Since the typo fixes are technically unrelated other than being in the same files, I'm happy to take them out if you'd rather they not be included in the patch. Differential Revision: https://reviews.llvm.org/D88190
-
Layton Kifer authored
Simplify and improve readability. Differential Revision: https://reviews.llvm.org/D82269
-
Eli Friedman authored
The intrinsics don't have any pointer arguments, so "argmemonly" makes optimizations think they don't write to memory at all. Differential Revision: https://reviews.llvm.org/D88186
-