- Mar 25, 2021
-
-
Craig Topper authored
-
Yolanda Chen authored
Add lld CSPGO (Contex-Sensitive PGO) options for COFF target. Reference the ELF options from https://reviews.llvm.org/D56675 Reviewed By: tejohnson Differential Revision: https://reviews.llvm.org/D98763
-
Christopher Di Bella authored
The test wasn't previously testing this concept, but its base. Differential Revision: https://reviews.llvm.org/D99306
-
Chuanqi Xu authored
Summary: Add -fno-split-stack and rename CC1 option from `-split-stacks` to `-fsplit-stack`. Test Plan: check-all Differential Revision: https://reviews.llvm.org/D99245
-
Amara Emerson authored
This may occur when swifterror codegen in the translator generates these, but we shouldn't try to handle them since they should have regclasses anyway. rdar://75784009 Differential Revision: https://reviews.llvm.org/D99287
-
Serge Pavlov authored
Differential Revision: https://reviews.llvm.org/D98929
-
Craig Topper authored
This implements various idioms using ctlz/cttz like Log2, Log2_Ceil, findFirstSetBit, etc. Some of these demonstrate that we fail to use clzw because the idiom breaks the isel patterns we use. The isel pattern we use is (add (cttz (and X, 0xffffffff)), -32). Some of the idioms cause the constant on the add to be different.
-
Mehdi Amini authored
Define a `NoTerminator` traits that allows operations with a single block region to not provide a terminator In particular for Graph Regions, the terminator needs is just a historical artifact of the generalization of MLIR from CFG region. Operations like Module don't need a terminator, and before Module migrated to be an operation with region there wasn't any needed. To validate the feature, the ModuleOp is migrated to use this trait and the ModuleTerminator operation is deleted. This patch is likely to break clients, if you're in this case: - you may iterate on a ModuleOp with `getBody()->without_terminator()`, the solution is simple: just remove the ->without_terminator! - you created a builder with `Builder::atBlockTerminator(module_body)`, just use `Builder::atBlockEnd(module_body)` instead. - you were handling ModuleTerminator: it isn't needed anymore. - for generic code, a `Block::mayNotHaveTerminator()` may be used. Differential Revision: https://reviews.llvm.org/D98468
-
Craig Topper authored
We already created a DebugLoc at the top of the function. We can just use that one.
-
Fred Riss authored
The objc_debug_isa_class_mask magic value that the objc runtime vends is now initialized using a static initializer instead of a constant value. The runtime plugin itself will be initialized before the value is computed and as a result, the cache will get the wrong value. Making the creation of the NonPointerIsaCache fully lazy fixes this.
-
Jonas Devlieghere authored
-
Fangrui Song authored
-
Jianzhou Zhao authored
-
Fangrui Song authored
Noticed by Khem Raj
-
Eric Schweitz authored
Before the conversion to LLVM-IR dialect and ultimately LLVM IR, FIR is partially rewritten into a codegen form. This patch adds that pass, the fircg dialect, and the small set of Ops in the fircg (sub) dialect. Fircg is not part of the FIR dialect and should never be used outside of the (closed) conversion to LLVM IR. Authors: Eric Schweitz, Jean Perier, Rajan Walia, et.al. Differential Revision: https://reviews.llvm.org/D98063
-
Nathan Chancellor authored
GCC's name for this symbol is _mcount, which the Linux kernel expects in a few different place: $ echo 'int main(void) { return 0; }' | riscv32-linux-gcc -c -pg -o tmp.o -x c - $ llvm-objdump -dr tmp.o | grep mcount 0000000c: R_RISCV_CALL _mcount $ echo 'int main(void) { return 0; }' | riscv64-linux-gcc -c -pg -o tmp.o -x c - $ llvm-objdump -dr tmp.o | grep mcount 000000000000000c: R_RISCV_CALL _mcount $ echo 'int main(void) { return 0; }' | clang -c -pg -o tmp.o --target=riscv32-linux-gnu -x c - $ llvm-objdump -dr tmp.o | grep mcount 0000000a: R_RISCV_CALL_PLT mcount $ echo 'int main(void) { return 0; }' | clang -c -pg -o tmp.o --target=riscv64-linux-gnu -x c - $ llvm-objdump -dr tmp.o | grep mcount 000000000000000a: R_RISCV_CALL_PLT mcount Set MCountName to "_mcount" in RISCVTargetInfo then prevent it from getting overridden in certain OSTargetInfo constructors. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D98881 Signed-off-by:Nathan Chancellor <nathan@kernel.org>
-
Zequan Wu authored
-
Philip Reames authored
Split from D95815 to reduce patch size. Isn't (yet) used for anything, only the client side is wired up.
-
Giorgis Georgakoudis authored
Relates to: https://reviews.llvm.org/D97107
-
Rob Suderman authored
Lowering of bitwise_not to linalg dialect using a xor operation with a constant of all-bits-one. Differential Revision: https://reviews.llvm.org/D99221
-
Jianzhou Zhao authored
This is a part of https://reviews.llvm.org/D95835. Reviewed By: morehouse Differential Revision: https://reviews.llvm.org/D99295
-
Philip Reames authored
This implements a subset of the initial set of inference rules proposed in the llvm-dev thread "RFC: Decomposing deref(N) into deref(N) + nofree". The nolias one got moved to a separate review as there was some concerns raised which require further discussion. Differential Revision: https://reviews.llvm.org/D99135
-
Matt Morehouse authored
This reverts commit 63f73c3e due to breakage on aarch64 without TBI.
-
Wenlei He authored
With cost-benefit analysis for inlining, we bypass the cost-threshold by returning inline result from call analyzer early. However the cost and threshold are still available from call analyzer, and when cost is actually higher than threshold, we incorrect set the reason. The change makes the decision from cost-benefit analysis explicit. It's mostly NFC, except that it allows the priority-based sample loader inliner used by CSSPGO to use cost-benefit heuristic. Differential Revision: https://reviews.llvm.org/D99302
-
Yuanfang Chen authored
``` Warn when a function pointer is cast to an incompatible function pointer. In a cast involving function types with a variable argument list only the types of initial arguments that are provided are considered. Any parameter of pointer-type matches any other pointer-type. Any benign differences in integral types are ignored, like int vs. long on ILP32 targets. Likewise type qualifiers are ignored. The function type void (*) (void) is special and matches everything, which can be used to suppress this warning. In a cast involving pointer to member types this warning warns whenever the type cast is changing the pointer to member type. This warning is enabled by -Wextra. ``` Reviewed By: rsmith Differential Revision: https://reviews.llvm.org/D97831
-
Kazu Hirata authored
This patch enables the cost-benefit-analysis-based inliner by default if we have instrumentation profile. - SPEC CPU 2017 shows a 0.4% improvement. - An internal large benchmark shows a 0.9% reduction in the cycle count along with 14.6% reduction in the number of call instructions executed. Differential Revision: https://reviews.llvm.org/D98213
-
jasonliu authored
[libc++] Match declaration for non-member function std::swap(std::packaged_task) with what standard specify Standard specifies: ``` template<class R, class... ArgTypes> void swap(packaged_task<R(ArgTypes...)>& x, packaged_task<R(ArgTypes...)>& y) noexcept; ``` Differential Revision: https://reviews.llvm.org/D99102
-
Fangrui Song authored
This reverts commit aae84b8e. The chromium goma folks want to use a Debian sysroot without lib/x86_64-linux-gnu to perform `clang -c` but no link action. The previous commit has removed D.getVFS().exists check to make such usage work.
-
Fangrui Song authored
Not only can this save unneeded filesystem stats, it can make `clang --sysroot=/path/to/debian-sysroot -c a.cc` work (get `-internal-isystem $sysroot/usr/include/x86_64-linux-gnu`) even without `lib/x86_64-linux-gnu/`. This should make thakis happy.
-
Lei Zhang authored
For such op chains, we can create new linalg.fill ops with the result type of the linalg.tensor_reshape op. Differential Revision: https://reviews.llvm.org/D99116
-
Lei Zhang authored
init tensor operands also has indexing map and generally follow the same constraints we expect for non-init-tensor operands. Differential Revision: https://reviews.llvm.org/D99115
-
Lei Zhang authored
This commit exposes an option to the pattern FoldWithProducerReshapeOpByExpansion to allow folding unit dim reshapes. This gives callers more fine-grained controls. Differential Revision: https://reviews.llvm.org/D99114
-
Lei Zhang authored
This identifies a pattern where the producer affine min/max op is bound to a dimension/symbol that is used as a standalone expression in the consumer affine op's map. In that case the producer affine min/max op can be merged into its consumer. For example, a pattern like the following: ``` %0 = affine.min affine_map<()[s0] -> (s0 + 16, s0 * 8)> ()[%sym1] %1 = affine.min affine_map<(d0)[s0] -> (s0 + 4, d0)> (%0)[%sym2] ``` Can be turned into: ``` %1 = affine.min affine_map< ()[s0, s1] -> (s0 + 4, s1 + 16, s1 * 8)> ()[%sym2, %sym1] ``` Differential Revision: https://reviews.llvm.org/D99016 -
Lei Zhang authored
If there are multiple identical expressions in an affine min/max op's map, we can just keep one. Differential Revision: https://reviews.llvm.org/D99015
-
Lei Zhang authored
Until now Linalg fusion only allow fusing producers whose operands are all permutation indexing maps. It's easier to deduce the subtensor/subview but it is an unnecessary constraint, as in tiling we have more advanced logic to deduce the subranges even when the operand is not of permutation indexing maps, e.g., the input operand for convolution ops. This patch uses the logic on tiling side to deduce subranges for fusion. This enables fusing convolution with its consumer ops when possible. Along the way, we are now generating proper affine.min ops to guard against size boundaries, if we cannot be certain they won't be out of bounds. Differential Revision: https://reviews.llvm.org/D99014
-
Lei Zhang authored
This is a preparation step to reuse makeTiledShapes in tensor fusion. Along the way, did some lightweight cleanups. Differential Revision: https://reviews.llvm.org/D99013
-
jasonliu authored
This path would unblock the build of libc++ library on AIX: 1. Add _AIX guard for _LIBCPP_HAS_THREAD_API_PTHREAD 2. Use uselocale to actually take the locale setting into account. 3. extract_mtime and extract_atime mod needed for AIX. As stat structure on AIX uses internal structure st_timespec to store time for binary compatibility reason. So we need to convert it back to timespec here. 4. Do not build cxa_thread_atexit.cpp for libcxxabi on AIX. Differential Revision: https://reviews.llvm.org/D97558
-
Sanjay Patel authored
This is similar to the select logic just ahead of the new code. Min/max choose exactly one value from the inputs, so if both of those are a power-of-2, then the result must be a power-of-2. This might help with D98152, but we likely still need other pieces of the puzzle to avoid regressions. The change in PatternMatch.h is needed to build with clang. It's possible there is a better way to deal with the 'const' incompatibities. Differential Revision: https://reviews.llvm.org/D99276
-
Jacques Pienaar authored
This avoided some conversion overhead on a model in TypeUniquer when converting from ArrayRef -> TypeRange. Differential Revision: https://reviews.llvm.org/D99300
-
Martin Storsjö authored
Including xlocinfo.h is a bit of a layering violation; locale.h is the C library header we should use, while xlocinfo.h is essentially part of the MS C++ library. Including xlocinfo.h brings in yvals.h, which brings in yvals_core.h, which defines the MS STL's version support macros, overriding what libc++'s <version> had defined. Instead just include locale.h, and provide the few defines we need for locale categories manually. Differential Revision: https://reviews.llvm.org/D99213
-