- Apr 18, 2022
-
-
Mehdi Amini authored
This reverts commit daabcf5f. This patch still had on-going discussion that should be closed before committing.
-
Johannes Doerfert authored
When we run the CGSCC pass we should only invest time on the SCC. We can initialize AAs with information from the module slice but we should not update those AAs. We make an exception for are call site of the SCC as they are helpful providing information for the SCC. Minor modifications to pointer privatization allow us to perform it even in the CGSCC pass, similar to ArgumentPromotion.
-
Daniil Kovalev authored
Opaque pointers are enabled by default since D123300, so test IR should be regenerated correspondingly. Differential Revision: https://reviews.llvm.org/D123842
-
- Apr 17, 2022
-
-
Lang Hames authored
On some platforms _ZTIi may not be present (see discussion at https://reviews.llvm.org/rG43acef48d38e). We don't need this symbol for the test to work, so just add -phony-externals to the testcase to suppress the error.
-
Andrew Savonichev authored
ptxas fails to parse such syntax: mov.u64 %rd1, ($str); fatal : Parsing error near '$str': syntax error A new MCAsmInfo option was added because InParens parameter of MCExpr::print is not sufficient to disable parens completely. MCExpr::print resets it to false for a recursive call in case of unary or binary expressions. Targets that require parens around identifiers that start with '$' should always pass MCAsmInfo to MCExpr::print. Therefore 'operator<<(raw_ostream &, MCExpr&)' should be avoided because it calls MCExpr::print with nullptr MAI. Differential Revision: https://reviews.llvm.org/D123702 -
Uday Bondhugula authored
The generic form of the op is too verbose and in some cases not readable. On pass failure, ops have been so far printed in generic form to provide a (stronger) guarantee that the IR print succeeds. However, in a large number of pass failure cases, the IR is still valid and the custom printers for the ops will succeed. In fact, readability is highly desirable post pass failure. This revision provides an option to print ops in their custom/pretty-printed form on IR failure -- this option is unsafe and there is no guarantee it will succeed. It's disabled by default and can be turned on only if needed. Differential Revision: https://reviews.llvm.org/D123893
-
Christudasan Devadasan authored
Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D123666
-
Bill Wendling authored
A randomized structure needs to use a designated or default initializer. Using a non-designated initializer will result in values being assigned to the wrong fields. Differential Revision: https://reviews.llvm.org/D123763
-
hsmahesha authored
Fix indentation within the lit test - agpr-copy-no-free-registers.ll. Reviewed By: rampitec Differential Revision: https://reviews.llvm.org/D123809
-
Jacques Pienaar authored
-
Lang Hames authored
It's idiomatic to require that plugins (especially platform plugins) be installed to handle special edge kinds. If the plugins are not installed and an object is loaded that uses one of the special edge kinds then we want to error out rather than asserting.
-
Saleem Abdulrasool authored
This adjusts the path iteration - `paths` is a null-terminated sequence of C strings, creating an array from a single contiguous buffer. We would previously continue to iterate indefinitely as we did not check if we had encountered the terminator. Found by inspection.
-
Jonathan Wakely authored
This makes it a little easier to reuse the libc++ tests for another std::lib (specifically libstdc++). The regex_error::what() strings are different in other implementations, so should be tested with LIBCPP_ASSERT so that those checks are skipped for other implementations. The value of ECMAScript constant is non-zero in other implementations, and conditionally for libc++, so adjust the preprocessor condition for that too. Reviewed By: ldionne, #libc, philnik, Mordante Spies: Mordante, philnik, libcxx-commits Differential Revision: https://reviews.llvm.org/D122574
-
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.
-