- Jul 06, 2020
-
-
Nicolas Vasilache authored
The UnrollVectorPattern is can be used in a programmable fashion by: ``` OwningRewritePatternList patterns; patterns.insert<UnrollVectorPattern<AddFOp>>(ArrayRef<int64_t>{2, 2}, ctx); patterns.insert<UnrollVectorPattern<vector::ContractionOp>>( ArrayRef<int64_t>{2, 2, 2}, ctx); ... applyPatternsAndFoldGreedily(getFunction(), patterns); ``` Differential revision: https://reviews.llvm.org/D83064 -
Esme-Yi authored
Summary: As Bugzilla-35090 reported, the rationale for using custom lowering SREM/UREM should no longer be true. At the IR level, the div-rem-pairs pass performs the transformation where the remainder is computed from the result of the division when both a required. We should now be able to lower these directly on P9. And the pass also fixed the problem that divide is in a different block than the remainder. This is a patch to remove redundant code and make SREM/UREM legal directly on P9. Reviewed By: lkail Differential Revision: https://reviews.llvm.org/D82145
-
Dmitri Gribenko authored
Summary: This feature was only used in two places, but contributed a non-trivial amount to the complexity of RecursiveASTVisitor, and was buggy (see my recent patches where I was fixing the bugs that I noticed). I don't think the convenience benefit of this feature is worth the complexity. Besides complexity, another issue with the current state of RecursiveASTVisitor is the non-uniformity in how it handles different AST nodes. All AST nodes follow a regular pattern, but operators are special -- and this special behavior not documented. Correct usage of RecursiveASTVisitor relies on shadowing member functions with specific names and signatures. Near misses don't cause any compile-time errors, incorrectly named or typed methods are just silently ignored. Therefore, predictability of RecursiveASTVisitor API is quite important. This change reduces the size of the `clang` binary by 38 KB (0.2%) in release mode, and by 7 MB (0.3%) in debug mode. The `clang-tidy` binary is reduced by 205 KB (0.3%) in release mode, and by 5 MB (0.4%) in debug mode. I don't think these code size improvements are significant enough to justify this change on its own (for me, the primary motivation is reducing code complexity), but they I think are a nice side-effect. Reviewers: rsmith, sammccall, ymandel, aaron.ballman Reviewed By: rsmith, sammccall, ymandel, aaron.ballman Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D82921
-
Dmitri Gribenko authored
Reviewers: eduucaldas, ymandel, rsmith Reviewed By: eduucaldas Subscribers: gribozavr2, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D82889
-
Dmitri Gribenko authored
Make RecursiveASTVisitor call WalkUpFrom for unary and binary operators in post-order traversal mode Reviewers: ymandel, eduucaldas, rsmith Reviewed By: eduucaldas, rsmith Subscribers: gribozavr2, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D82787
-
Dmitri Gribenko authored
Summary: How does RecursiveASTVisitor call the WalkUp callback for expressions? * In pre-order traversal mode, RecursiveASTVisitor calls the WalkUp callback from the default implementation of Traverse callbacks. * In post-order traversal mode when we don't have a DataRecursionQueue, RecursiveASTVisitor also calls the WalkUp callback from the default implementation of Traverse callbacks. * However, in post-order traversal mode when we have a DataRecursionQueue, RecursiveASTVisitor calls the WalkUp callback from PostVisitStmt. As a result, when the user overrides the Traverse callback, in pre-order traversal mode they never get the corresponding WalkUp callback. However in the post-order traversal mode the WalkUp callback is invoked or not depending on whether the data recursion optimization could be applied. I had to adjust the implementation of TraverseCXXForRangeStmt in the syntax tree builder to call the WalkUp method directly, as it was relying on this behavior. There is an existing test for this functionality and it prompted me to make this extra fix. In addition, I had to fix the default implementation implementation of RecursiveASTVisitor::TraverseSynOrSemInitListExpr to call WalkUpFrom in the same manner as the implementation generated by the DEF_TRAVERSE_STMT macro. Without this fix, the InitListExprIsPostOrderNoQueueVisitedTwice test was failing because WalkUpFromInitListExpr was never called. Reviewers: eduucaldas, ymandel Reviewed By: eduucaldas, ymandel Subscribers: gribozavr2, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D82486
-
Jay Foad authored
Use a simpler code sequence when the shift amount is known not to be zero modulo the bit width. Nothing much uses this until D77152 changes the translation of fshl and fshr intrinsics. Differential Revision: https://reviews.llvm.org/D82540
-
Jay Foad authored
Using a negation instead of a subtraction from a constant can save an instruction on some targets. Nothing much uses this until D77152 changes the translation of fshl and fshr intrinsics. Differential Revision: https://reviews.llvm.org/D82539
-
Kirstóf Umann authored
Since strong dependencies aren't user-facing (its hardly ever legal to disable them), lets enforce that they are hidden. Modeling checkers that aren't dependencies are of course not impacted, but there is only so much you can do against developers shooting themselves in the foot :^) I also made some changes to the test files, reversing the "test" package for, well, testing. Differential Revision: https://reviews.llvm.org/D81761
-
Sam McCall authored
-
Kai Nacke authored
Adds implementation of getMainExecutable() and is_local_impl() to Support/Unix/Path.inc. Both are needed to compile LLVM for z/OS. Reviewed By: hubert.reinterpretcast, emaste Differential Revision: https://reviews.llvm.org/D82544
-
Kai Nacke authored
This is needed to build LLVM on z/OS, as there is no header file which provides these constants. Reviewed By: hubert.reinterpretcast Differential Revision: https://reviews.llvm.org/D82368
-
Roman Lebedev authored
Compilers may evaluate call arguments in different order, which would result in different order of IR, which would break the tests. Spotted thanks to Dmitri Gribenko!
-
David Green authored
This expands the existing extend costs with a few extras for larger types than legal, which will usually be split under MVE. It also adds trunk support for the same thing. These should not have a large effect on many things, but makes the costs explicit and keeps a certain balance between the trunks and extends. Differential Revision: https://reviews.llvm.org/D82457
-
Sam McCall authored
Reviewers: hokein Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D83128
-
Roman Lebedev authored
Summary: Similar to D82961. Reviewers: bjope, cameron.mcinally, arsenm, jdoerfert Reviewed By: jdoerfert Subscribers: arphaman, wdng, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D82970
-
Roman Lebedev authored
Summary: I'm interested in taking the original C++ input, for which we currently are stuck with an alloca and producing roughly the lower IR, with neither an alloca nor a vector ops: https://godbolt.org/z/cRRWaJ For that, as intermediate step, i'd to somehow perform scalarization. As per @arsenmn suggestion, i'm trying to see if scalarizer can help me avoid writing a bicycle. I'm not sure if it's really intentional that variable insert is not handled currently. If it really is, and is supposed to stay that way (?), i guess i could guard it.. See [[ https://bugs.llvm.org/show_bug.cgi?id=46524 | PR46524 ]]. Reviewers: bjope, cameron.mcinally, arsenm, jdoerfert Reviewed By: jdoerfert Subscribers: arphaman, uabelho, wdng, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D82961
-
Roman Lebedev authored
Summary: It appears to be better IR-wise to aggressively scalarize it, rather than relying on gathering it, and leaving it as-is. Reviewers: jdoerfert, bjope, arsenm, cameron.mcinally Reviewed By: jdoerfert Subscribers: arphaman, wdng, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D83101
-
Roman Lebedev authored
Summary: As it can be clearly seen from the diff, this results in nicer IR. Reviewers: jdoerfert, arsenm, bjope, cameron.mcinally Reviewed By: jdoerfert Subscribers: arphaman, wdng, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D83102
-
Roman Lebedev authored
Summary: 1000 iteratons is still kinda a lot. Would it make sense to iteratively lower it, until it becomes `2`, with some delay inbetween in order to let users actually potentially encounter it? Reviewers: spatel, nikic, kuhar Reviewed By: nikic Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D83160
-
Stephan Herhut authored
Revert "Revert "Revert "[libcxx] Put clang::trivial_abi on std::unique_ptr, std::shared_ptr, and std::weak_ptr""" This reverts commit f706b01a.
-
David Green authored
This alters getMemoryOpCost to use the Base TargetTransformInfo version that includes some additional checks for whether extending loads are legal. This will generally have the effect of making <2 x ..> and some <4 x ..> loads/stores more expensive, which in turn should help favour larger vector factors. Notably it alters the cost of a <4 x half>, which with the current codegen will be expensive if it is not extended. Differential Revision: https://reviews.llvm.org/D82456
-
Bevin Hansson authored
-
Guillaume Chatelet authored
Differential Revision: https://reviews.llvm.org/D83192
-
Guillaume Chatelet authored
-
Pavel Labath authored
-
Kazushi (Jam) Marukawa authored
Summary: Change stack alignment from 64 bits to 128 bits to follow ABI correctly. And add a regression test for datalayout. Reviewers: simoll, k-ishizaka Reviewed By: simoll Subscribers: hiraditya, cfe-commits, llvm-commits Tags: #llvm, #ve, #clang Differential Revision: https://reviews.llvm.org/D83173
-
Pavel Labath authored
This applies the same logic we have for incomplete class bases and members to array element types.
-
Chuanqi Xu authored
User can own a version of coroutine_handle::address() whose return type is not void* by using template specialization for coroutine_handle<> for some promise_type. In this case, the codes may violate the capability with existing async C APIs that accepted a void* data parameter which was then passed back to the user-provided callback. Patch by ChuanqiXu Differential Revision: https://reviews.llvm.org/D82442
-
Petr Hosek authored
We make assumptions about what projects and runtimes are enabled when configuring our toolchain build, so we should enable those in the cache file as well rather than relying on those being set externally. Differential Revision: https://reviews.llvm.org/D81514
-
Joachim Protze authored
If the compilation fails, the test is marked as unsupported. -> This will never change for a specific version of gcc If the linking fails, the test is marked as expected to fail. -> This might change as LLVM/OpenMP implements the missing GOMP interface function Reviewed by: Hahnfeld Differential Revision: https://reviews.llvm.org/D83077
-
Joachim Protze authored
Fixes build with LIBOMP_OMPT_SUPPORT=off Reported by: Jason Edson Reviewed by: Hahnfeld Differential Revision: https://reviews.llvm.org/D83171
-
Fangrui Song authored
-
Nikita Popov authored
-
Fangrui Song authored
Making -g[no-]column-info opt out reduces the length of a typical CC1 command line. Additionally, in a non-debug compile, we won't see -dwarf-column-info.
-
Vy Nguyen authored
Revert "Revert "[libcxx] Put clang::trivial_abi on std::unique_ptr, std::shared_ptr, and std::weak_ptr"" This reverts commit dc13ac02. Rolling forward + fix typos and unused variables in tests Differential Revision: https://reviews.llvm.org/D82490
-
- Jul 05, 2020
-
-
David Green authored
Whether an instruction is deemed to have side effects in determined by whether it has a tblgen pattern that emits a single instruction. Because of the way a lot of the the vcvt instructions are specified either in dagtodag code or with patterns that emit multiple instructions, they don't get marked as not having side effects. This just marks them as not having side effects manually. It can help especially with instruction scheduling, to not create artificial barriers, but one of these tests also managed to produce fewer instructions. Differential Revision: https://reviews.llvm.org/D81639
-
Simon Pilgrim authored
Similar to the proposed generic code generated by D61129 - there's still some shuffle combining improvements to go before that patch is ready.
-
Benjamin Kramer authored
Found by asan.
-
Alexander Belyaev authored
-