- Feb 10, 2023
-
-
Valentin Clement authored
-
Marco Elver authored
For large projects it will be required to opt out entire subdirectories. In the absence of fine-grained control over the flags passed via the build system, introduce -fexperimental-sanitize-metadata-ignorelist=. The format is identical to other sanitizer ignore lists, and its effect will be to simply not instrument either functions or entire modules based on the rules in the ignore list file. Reviewed By: dvyukov Differential Revision: https://reviews.llvm.org/D143664
-
OCHyams authored
The intrinsics don't add anything to the tests and the tests are easier to debug without the additional noise. Some SSA value names have changed as a result of no longer visiting the intrinsics. Reviewed By: jryans Differential Revision: https://reviews.llvm.org/D143141
-
Max Kazantsev authored
Add tests combining assume on trip count divisibility (TV % VF) and minimum/maximum values (TC > N, TC < M). Patch by Alon Kom! Differential Revision: https://reviews.llvm.org/D143337
-
Benjamin Kramer authored
-
Tobias Hieta authored
I found a few Python files not using Python 3 syntax in the tree when trying to apply reformatting to them. This was converted with 2to3 and the changes seemed sane. Reviewed By: MaskRay, browneee Differential Revision: https://reviews.llvm.org/D143701
-
Siva Chandra Reddy authored
-
Mikhail Goncharov authored
-
chenglin.bi authored
Original code will cause crash when the load/store memory type is structure because isIndexedLoadLegal/isIndexedStore doesn't support struct type. So we limit the load/store memory type to integer. Origin commit message: When the latch block is different from header block, IVInc will be expanded in the latch loop. We can't generate the post index load/store this case. But if the IVInc only used in the loop, actually we still can use the post index load/store because when exit loop we don't care the last IVInc value. So, trying to hoist IVInc to help backend to generate more post index load/store. Fix #53625 Reviewed By: eopXD Differential Revision: https://reviews.llvm.org/D138636
-
Siva Chandra Reddy authored
Before this change, the test binaries were executed only if the deps changed. This change makes the test binaries run unconditionally. This is more in line with the rest of LLVM. Future patches will print test statistics etc., much like the rest of LLVM. Reviewed By: gchatelet Differential Revision: https://reviews.llvm.org/D143627
-
Matthias Springer authored
Support cases where a source tensor can be traced back to multiple possible tensor.empty ops. Differential Revision: https://reviews.llvm.org/D142130
-
Sandeep Kosuri authored
-
Max Kazantsev authored
Extract complex logic of Binary Operator's flag strengthening to a separate method in order to reuse it. Patch by Aleksandr Popov! Differential Revision: https://reviews.llvm.org/D143562 Reviewed By: mkazantsev
-
Chuanqi Xu authored
Close https://github.com/llvm/llvm-project/issues/59287 This is addressed in D137526 but I forgot to add a test for it.
-
Uday Bondhugula authored
Fold away divs and mods in affine maps exploiting operand info during canonicalization. This simplifies affine map applications such as the ones below: ``` // Simple ones. affine.for %i = 0 to 32 { affine.load %A[%i floordiv 32] affine.load %A[%i mod 32] affine.load %A[2 * %i floordiv 64] affine.load %A[(%i mod 16) floordiv 16] ... } // Others. affine.for %i = -8 to 32 { // Will be simplified %A[0]. affine.store %cst, %A[2 + (%i - 96) floordiv 64] : memref<64xf32> } ``` Reviewed By: springerm Differential Revision: https://reviews.llvm.org/D143456 -
Chuanqi Xu authored
I introduced an unused parameter due to an oversight during rebasing. Now the patch removes the parameter.
-
Jean Perier authored
There is a lot of Fortran code that takes advantage of F77 implicit interface to pass arguments with a different type than those from the subprogram definition (which is well defined if the storage and passing convention are the same or compatible). When the definition and calls are in different files, there is nothing special to do: the actual arguments are already used to compute the call interface. The trouble for lowering comes when the definition is in the same compilation unit (Semantics raises warning). Then, lowering will be provided with the interface from the definition to prepare the argument, and this leads to many ad-hoc handling (see builder.convertWithSemantics) in the current lowering to cope with the dummy/actual mismatches on a case by case basis. The current lowering to FIR is not even complete for all mismatch cases that can be found in the wild (see https://github.com/llvm/llvm-project/issues/60550), it is crashing or hitting asserts for many of the added tests. For HLFIR, instead of coping on a case by case basis, the call interface will be recomputed according to the actual arguments when calling an external procedure that can be called with an explicit interface. One extra case still has to be handled manually because it may happen in calls with explicit interfaces: passing a character procedure designator to a non character procedure dummy (and vice-versa) is widely accepted even with explicit interfaces (and flang semantic accepts it). Yet, this "mismatch" cannot be dealt with a simple fir.convert because character dummy procedure are passed with a different passing convention: an extra argument is hoisted for the result length (in FIR, there is no extra argument yet, but the MLIR func argument is a tuple<fir.boxproc, len>). Differential Revision: https://reviews.llvm.org/D143636
-
Christian Ulmann authored
This commit fixes a crash of the TBAA verification that happened due to accessing memory through invalid pointers. A DenseMap does not guarantee that pointers to its elements remain valid after additional elements are inserted. A testcase that caused this crash had more than 100 TBAA metadata operations and thus no test is added. Instead, there is now an assertion that ensures that the graph class is used correctly. Reviewed By: vzakhari Differential Revision: https://reviews.llvm.org/D143653
-
Pierre van Houtryve authored
RFC to add a way to ignore COPY instructions when pattern-matching MIR in GISel. - Add a new "GISelFlags" class to TableGen. Both `Pattern` and `PatFrags` defs can use it to alter matching behaviour. - Flags start at zero and are scoped: the setter returns a `SaveAndRestore` object so that when the current scope ends, the flags are restored to their previous values. This allows child patterns to modify the flags without affecting the parent pattern. - Child patterns always reuse the parent's pattern, but they can override its values. For more examples, see `GlobalISelEmitterFlags.td` tests. - [AMDGPU] Use the IgnoreCopies flag in BFI patterns, which are known to be bothered by cross-regbank copies. Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D136234 -
Pierre van Houtryve authored
RegBankSelect can insert G_UNMERGE_VALUES in a lot of places which left us with a lot of unmerge/merge pairs that could be simplified. These often got in the way of pattern matching and made codegen worse. This patch: - Makes the necessary changes to the merge/unmerge combines so they can run post RegBankSelect - Adds relevant unmerge combines to the list of RegBankSelect combines for AMDGPU - Updates some tablegen patterns that were missing explicit cross-regbank copies (V_BFI patterns were causing constant bus violations with this change). This seems to be mostly beneficial for code quality. Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D142192
-
Max Kazantsev authored
[Test] Add tests where we can replace IV check with invariant check basing on predicated backedge cond
-
wanglei authored
-
lizhijin authored
[SVE] Add intrinsics for logical/bitwise operations that explicitly undefine the result for inactive lanes This patch adds new intrinsics for logical/bitwise operations and changes the lowering for the following builtins to emit calls to the new aarch64.sve.###.u intrinsics. svand_x svand_n_x svorr_x svorr_n_x sveor_x sveor_n_x svbic_x svbic_n_x Reviewed By: paulwalker-arm Differential Revision: https://reviews.llvm.org/D143499
-
gonglingqin authored
Normally, the ISD::SELECT is lowered to maskeqz + masknez. This is inefficient when operands are constants that can be computed easily. To avoid that, override TargetLowering::convertSelectOfConstantsToMath. Differential Revision: https://reviews.llvm.org/D143621
-
Amara Emerson authored
-
Max Kazantsev authored
Based on https://discourse.llvm.org/t/rfc-inject-invariant-conditions-to-loops-to-enable-unswitching-and-constraint-elimination This transform attempts to handle the following loop: ``` for (...) { x = <some variant> if (x <u C1) {} else break; if (x <u C2) {} else break; } ``` Here `x` is some loop-variant value, and `C1` and `C2` are loop invariants. As we see, this loop has no invariant checks we can unswitch on. However, there is an invariant condition that can make the second check redundant. Specifically, it is `C1 <=u C2`. We can modify this code in the following way: ``` for (...) { x = <some variant> if (x <u C1) {} else break; if (C1 <=u C2) { /* no check is required */ } else { // do the check normally if (x <u C2) {} else break; } } ``` Now we have an invariant condition `C1 <=u C2` and can unswitch on it. This patch introduces the basic version of this transform, with some limitations, all of them seem liftable (but needs more work & testing): - All checks are `ult` condition; - All branches in question stay in loop if the said condition is true and leave it otherwise; - All in-loop branches are hot enough; There is also a room for improvement cost model. So far we evalutate the cost of unswitching this newly injected invariant branch the same as if we would unswitch on 2nd condition, which is not exactly precise (but also not grossly wrong). Differential Revision: https://reviews.llvm.org/D136233 Reviewed By: skatkov
-
Jonas Devlieghere authored
Hoist the code that creates a StructuredData dictionary from a diagnostic event into the DiagnosticEventData. This addresses Ismail's code review feedback from D143687. Differential revision: https://reviews.llvm.org/D143694
-
Mircea Trofin authored
-
Kai Luo authored
-
Yingchi Long authored
``` define i1 @src(i32 %A) { %mask1 = and i32 %A, 15 ; 0x0f %tst1 = icmp eq i32 %mask1, 3 ; 0x03 %mask2 = and i32 %A, 255 ; 0xff %tst2 = icmp eq i32 %mask2, 243; 0xf3 %res = or i1 %tst1, %tst2 ret i1 %res } ``` -> ``` define i1 @tgt(i32 %A) { %1 = and i32 %A, 15 %res = icmp eq i32 %1, 3 ret i1 %res } ``` Proof: https://alive2.llvm.org/ce/z/4AyvcE Assume that `(B & D) & (C ^ E) == 0`, and `(B & D) == D || (B & D) == B`, transforms: ``` (icmp ne (A & B), C) & (icmp ne (A & D), E) -> (icmp ne (A & (B&D)), (C&E)) ``` Fixes: https://github.com/llvm/llvm-project/issues/59680 Reviewed By: spatel, bcl5980 Differential Revision: https://reviews.llvm.org/D140666 -
Yingchi Long authored
Differential Revision: https://reviews.llvm.org/D142090
-
Dave Lee authored
-
Michael Buch authored
Revert "[lldb][DWARFASTParserClang] Correctly resolve imported namespaces during expression evaluation" This reverts commit 1ba6ec0b. Fails on linux buildbots. Differential Revision: https://reviews.llvm.org/D143398
-
Michael Buch authored
This reverts commit ccee9b78. This started failing on Linux buildbots. The executable wasn't generated correctly. Differential Revision: https://reviews.llvm.org/D143458
-
Chuanqi Xu authored
[C++20] [Modules] [ClangScanDeps] Enable to print make-style dependency file within P1689 format (4/4) Required in https://reviews.llvm.org/D137534. The build systems needs the information to know that "header X changed, scanning may have changed, so please rerun scanning". Although it is possible to get the information by running clang-scan-deps for the second time with make format, it is not user friendly clearly. Reviewed By: jansvoboda11 Differential Revision: https://reviews.llvm.org/D139168
-
Kai Luo authored
Some targets (like AIX) might not feature dwarf address section due to low dwarf version. Check before emitting one. Fixed DebugInfo unit test failures in https://lab.llvm.org/buildbot/#/builders/214/builds/5739. Reviewed By: qiucf Differential Revision: https://reviews.llvm.org/D143561
-
Mehdi Amini authored
-
Shengchen Kan authored
1. Make code clearer by separating the logic of setting bits from the logic of how a prefix is encoded 2. Extract common code into functions to avoid code duplication 3. Return a enum rather a boolean to ehance scalability and uniform the behavior of functions Reviewed By: pengfei, craig.topper Differential Revision: https://reviews.llvm.org/D143471
-
rkayaith authored
In some cases plain scalars are currently parsed with a trailing newline. In particular this shows up often when parsing JSON files, e.g. note the `\n` after `456` below: ``` $ cat test.yaml { "foo": 123, "bar": 456 } $ yaml-bench test.yaml -canonical %YAML 1.2 --- !!map { ? !!str "foo" : !!str "123", ? !!str "bar" : !!str "456\n", } ... ``` The trailing whitespace ends up causing the conversion of the scalar to int/bool/etc. to fail, causing the issue seen here: https://github.com/llvm/llvm-project/issues/15877 From reading the YAML spec (https://yaml.org/spec/1.2.2/#733-plain-style) it seems like plain scalars should never end with whitespace, so this change trims all trailing whitespace characters from the value (specifically `b-line-feed`, `b-carriage-return`, `s-space`, and `s-tab`). Reviewed By: scott.linder Differential Revision: https://reviews.llvm.org/D137118 -
Jie Fu authored
In file included from /data/jiefu/llvm-project/clang/unittests/Lex/ModuleDeclStateTest.cpp:22: /data/jiefu/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:1526:11: error: comparison of integers of different signs: 'const unsigned long' and 'const int' [-Werror,-Wsign-compare] if (lhs == rhs) { ~~~ ^ ~~~ /data/jiefu/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:1553:12: note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<unsigned long, int>' requested here return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs); ^ /data/jiefu/llvm-project/clang/unittests/Lex/ModuleDeclStateTest.cpp:124:3: note: in instantiation of function template specialization 'testing::internal::EqHelper::Compare<unsigned long, int, nullptr>' requested here EXPECT_EQ(Callback->importNamedModuleNum(), 0); ^ /data/jiefu/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:2027:54: note: expanded from macro 'EXPECT_EQ' EXPECT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2) ^ 1 error generated.
-