- Apr 17, 2022
-
-
Peter Klausler authored
Adds flang/include/flang/Common/log2-visit.h, which defines a Fortran::common::visit() template function that is a drop-in replacement for std::visit(). Modifies most use sites in the front-end and runtime to use common::visit(). The C++ standard mandates that std::visit() have O(1) execution time, which forces implementations to build dispatch tables. This new common::visit() is O(log2 N) in the number of alternatives in a variant<>, but that N tends to be small and so this change produces a fairly significant improvement in compiler build memory requirements, a 5-10% improvement in compiler build time, and a small improvement in compiler execution time. Building with -DFLANG_USE_STD_VISIT causes common::visit() to be an alias for std::visit(). Calls to common::visit() with multiple variant arguments are referred to std::visit(), pending further work. This change is enabled only for GCC builds with GCC >= 9; an earlier attempt (D122441) ran into bugs in so...
-
Craig Topper authored
Calling hasOneUse can be expensive on nodes with multiple results. Especially when some results are Chains. By checking the opcode first, we can avoid walking the uses if it isn't an interesting node, and thus avoid calling hasOneUse on a node that might have many uses. Found by profiling the IR given in D123857. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D123881
-
Lang Hames authored
BaseLayer was originally written as an IRCompileLayer, but there was no need for this restriction. Using IRLayer gives clients more flexibility in choosing the underlying layer.
-
Andrew Litteken authored
Issue: https://github.com/llvm/llvm-project/issues/54430 For incoming values of phi nodes added to an outlined function to accommodate different exit paths in the function, when a value is a constant that is passed into the outlined function as an argument, we find the corresponding value in the first extracted function used to fill the overall outlined function. When this value is an argument, the corresponding value used will be the old value, prior to outlining. This patch maintains a mapping from these values to arguments, and uses this mapping to update the added phi node accordingly. Reviewers: paquette Recommit of d6eb480a Differential Revision: https://reviews.llvm.org/D122206
-
eop Chen authored
-
Valentin Clement authored
This patch takes advantage of the Commutative trait on operation to remove identical commutative operations where the operands are swapped. The second operation below can be removed since `arith.addi` is commutative. ``` %1 = arith.addi %a, %b : i32 %2 = arith.addi %b, %a : i32 ``` Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D123492
-
Nico Weber authored
-
- Apr 16, 2022
-
-
Aaron Ballman authored
This reverts commit aed923b1. It causes some buildbot test failures.
-
Aaron Ballman authored
This reverts commit 2a404cdf. It didn't address the built bot failures. https://lab.llvm.org/buildbot/#/builders/171/builds/13231 https://lab.llvm.org/buildbot/#/builders/186/builds/5520
-
Nathan James authored
Adds a flag to `ClangTidyContext` that is used to indicate to checks that fixes will only be applied one at a time. This is to indicate to checks that each fix emitted should not depend on any other fixes emitted across the translation unit. I've currently implemented the `IncludeInserter`, `LoopConvertCheck` and `PreferMemberInitializerCheck` to use these support these modes. Reasoning behind this is in use cases like `clangd` it's only possible to apply one fix at a time. For include inserter checks, the include is only added once for the first diagnostic that requires it, this will result in subsequent fixes not having the included needed. A similar issue is seen in the `PreferMemberInitializerCheck` where the `:` will only be added for the first member that needs fixing. Fixes emitted in `StandaloneDiagsMode` will likely result in malformed code if they are applied all together, conversely fixes currently emitted may result in malformed c...
-
Vitaly Buka authored
Revert "Extend support for std::move etc to also cover std::as_const and" Revert "Update test to handle opaque pointers flag flip." It crashes on libcxx tests https://lab.llvm.org/buildbot/#/builders/85/builds/8174 This reverts commit fc309010. This reverts commit a571f82a. This reverts commit 64c045e2.
-
Mehdi Amini authored
-
Mehdi Amini authored
-
River Riddle authored
This helps to prevent tsan failures when users inadvertantly mutate the context in a non-safe way. Differential Revision: https://reviews.llvm.org/D112021
-
chenglin.bi authored
X%C to the equivalent of X-X/C*C is not always fastest path if there is no SDIV pair exist. So check target have faster for srem only first. Add AArch64 faster path for SREM only pow2 case. Fix https://github.com/llvm/llvm-project/issues/54649 Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D122968
-
Fangrui Song authored
-
Peter Klausler authored
When an error occurs in a formatted sequential output statement and no output was ever emitted, don't emit a blank record. This matches the error case behavior of other Fortran compilers. Differential Revision: https://reviews.llvm.org/D123734
-
Jun Zhang authored
Signed-off-by:Jun Zhang <jun@junz.org>
-
Peter Klausler authored
The x%KIND inquiry needs to be supported when 'x' is itself a complex part reference or a type parameter inquiry. Differential Revision: https://reviews.llvm.org/D123733
-
Peter Klausler authored
A POINTER attribute statement is allowed to add the POINTER attribute to a procedure entity that has already been declared, e.g. with an INTERFACE block. Differential Revision: https://reviews.llvm.org/D123732
-
Fangrui Song authored
Clang now matches GCC in the two cases. D109981 fixed the second case though it did not call out the effect.
-
Peter Klausler authored
f18 was emitting a warning about short character actual arguments to subprograms and statement functions; every other compiler considers this case to be an error. Differential Revision: https://reviews.llvm.org/D123731
-
Fangrui Song authored
-
Weining Lu authored
-
Peter Klausler authored
A predicate expression made ENDFILE statements significant only for sequential files, but it's applicable to formatted stream output as well. Differential Revision: https://reviews.llvm.org/D123730
-
Shilei Tian authored
As suggested in D120290. Reviewed By: ABataev Differential Revision: https://reviews.llvm.org/D123862
-
Joseph Huber authored
Summary: A previous patch had some linter warnings that should've been addressed.
-
Chris Bieneman authored
*fingers crossed*
-
Mogball authored
-
Mehdi Amini authored
-
Mehdi Amini authored
-
Craig Topper authored
Most of insertelement constant folding is blocked if the vector type is scalable. I believe we can make an exception for inserting null into an all zeros vector. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D123413
-
Mogball authored
LICM is refactored into a utility that is application on any region. The implementation is moved to Transform/Utils.
-
Joseph Huber authored
The previous patch introduced the offloading binary format so we can store some metada along with the binary image. This patch introduces using this inside the linker wrapper and Clang instead of the previous method that embedded the metadata in the section name. Differential Revision: https://reviews.llvm.org/D122683
-
Joseph Huber authored
Summary: The changes in D122987 ensures that the offloading sections always have the SHF_EXCLUDE flag. This means that we do not need to manually strip these sections for ELF or COFF targets.
-
Matt Arsenault authored
Error on some of these other fields, since tracking down test cases for all of these at once is exhausting.
-
Matt Arsenault authored
-
Craig Topper authored
Checking opcode is cheap. hasOneUse might not be if the node has multiple results. By checking the opcode we can rule out nodes with multiple results we aren't interested in.
-
Stella Stamenova authored
This reverts commit 3131f808. This commit broke the Windows mlir bot: https://lab.llvm.org/buildbot/#/builders/13/builds/19745
-
Craig Topper authored
Checking the opcode is cheap, counting the number of uses is not.
-