- Dec 07, 2022
-
-
Hanhan Wang authored
This revision adapts the pattern in LinAlg to work on DPS interface, and adds it to canonicalization patterns of tensor dialect. The InsertSliceOp is skipped in the pattern because it has its own logic about folding tensor.cast ops. Reviewed By: pifon2a Differential Revision: https://reviews.llvm.org/D139375
-
Kevin Gleason authored
Currently, assemblyFormat `custom<A>($a) custom<B>($b)` has different spacing if used for Ops vs Attrs/Types. Ops insert a space if needed before the custom directive, while attributes and types do not. This leads to the following two patterns in attributes / types: ``` # 1. Whitespace literal let assemblyFormat = "... ` ` custom<A>($a)" # 2. Custom printer code includes spacing void printB(...) { printer << ' ' << b; } ``` Moving this spacing into the generated code allows for some cleanup in mlir and improves the consistency of custom directives. Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D138235 -
Jonas Paulsson authored
The clang test that emits assembly needs this line as well.
-
Felipe de Azevedo Piovezan authored
When a new function "NewF" is created with instructions extracted from another function "OldF", the CodeExtractor only preserves debug line/column of the extracted instructions. However: 1. Any inlinedAt nodes are dropped. 2. The scope chain is replaced with a single node, the Subprogram of NewF. Both of these are incorrect: most of the debug metadata from the original instructions should be preserved. We only need to update the Subprogram found at the scope of the last node of the inline chain; this Subprogram used to be OldF but now should be NewF. Differential Revision: https://reviews.llvm.org/D139217
-
Fangrui Song authored
The repeated instructions make the file long and difficult to read. Simplify them with .irp directives. Reviewed By: #libunwind, compnerd Differential Revision: https://reviews.llvm.org/D139368
-
Adrian Prantl authored
-
Jonas Paulsson authored
On SystemZ, the vector ABI changes depending on the presence of hardware vector support. Therefore, each binary compiled with a visible vector ABI (e.g. one that calls an external function with a vector argument) should be marked with a .gnu_attribute describing this. Reviewed By: uweigand Differential Revision: https://reviews.llvm.org/D105067
-
David Goldman authored
And make use of this from clangd's CodeComplete and IncludeFixer, although currently they are both restricted only to #include symbols. Differential Revision: https://reviews.llvm.org/D128677
-
David Goldman authored
The IncludeDirective contains both Include (the current behavior) and Import, which we can use in the future to provide #import suggestions for Objective-C files/symbols. Differential Revision: https://reviews.llvm.org/D128457
-
Sanjay Patel authored
((zext BoolX) + (zext BoolY)) >> 1 --> zext (BoolX && BoolY) https://alive2.llvm.org/ce/z/LvZFKj This was noted as a missing fold in D138814.
-
Sanjay Patel authored
This pattern came up in D138814.
-
Craig Topper authored
With C extension, li with a 6 bit immediate followed by slli is 4 bytes. The lui+addi(w) sequence is at least 6 bytes. The two sequences probably have similar execution latency. The exception being if the target supports lui+addi(w) macrofusion. Since the execution latency is probably the same I didn't restrict this to C extension. Reviewed By: reames Differential Revision: https://reviews.llvm.org/D139135
-
Mircea Trofin authored
This reverts commit 8abe7b11. Added the missing cast which was causing a build problem on certain compilers.
-
Peter Rong authored
This diff fixes issue https://github.com/llvm/llvm-project/issues/59317 We should check if bitwidth is lower than the shift amount before we subtract them to avoid unsigned overflow. Reviewed By: dmgreen Differential Revision: https://reviews.llvm.org/D139238
-
Krzysztof Parzyszek authored
This applies to GetEnv and FindInEnvPath.
-
Roman Lebedev authored
This is still not working for me: ``` -- Configuring done CMake Error: install(EXPORT "LLVMExports" ...) includes target "omptarget.rtl.amdgpu" which requires target "elf_common" that is not in any export set. CMake Error: install(EXPORT "LLVMExports" ...) includes target "omptarget.rtl.cuda" which requires target "elf_common" that is not in any export set. CMake Error: install(EXPORT "LLVMExports" ...) includes target "omptarget.rtl.x86_64" which requires target "elf_common" that is not in any export set. CMake Error: install(EXPORT "LLVMExports" ...) includes target "omptarget.rtl.cuda.nextgen" which requires target "elf_common" that is not in any export set. CMake Error: install(EXPORT "LLVMExports" ...) includes target "omptarget.rtl.cuda.nextgen" which requires target "PluginInterface" that is not in any export set. CMake Error: install(EXPORT "LLVMExports" ...) includes target "omptarget.rtl.x86_64.nextgen" which requires target "elf_common" that is not in any export set. CMake Error: install(EXPORT "LLVMExports" ...) includes target "omptarget.rtl.x86_64.nextgen" which requires target "PluginInterface" that is not in any export set. -- Generating done ``` This reverts commit e682a76c.
-
Mitch Phillips authored
This reverts commit 825da072. Reason: Broke the sanitizer buildbots. See original review for more details: https://reviews.llvm.org/D137600
-
Adrian Prantl authored
-
Roman Lebedev authored
LLVM *loves* to convert `add` of operands with no common bits into an `or`. But SCEV really doesn't deal with `or` that well, so try extra hard to recognize this `or` as an `add`. I believe, previously this wasn't being done because of the recursive of this, but now that the `createSCEV()` is not recursive, this should be fine. Unless this is *too* costly compile-time wise... https://alive2.llvm.org/ce/z/EfapCo
-
Craig Topper authored
The main algorithm will already end with a SLLI when there are 12 or more trailing zeros. We only need to retry when there are less than 12 trailing zeros since the main algorithm will pick an ADDI or ADDIW at the end for those cases.
-
Florian Hahn authored
This reverts commit c5ff6f72. This breaks building on macOS: FAILED: lib/Analysis/CMakeFiles/LLVMAnalysis.dir/TensorSpec.cpp.o /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -DBUILD_EXAMPLES -DGTEST_HAS_RTTI=0 -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/Users/buildslave/jenkins/workspace/clang-stage1-cmake-RA-incremental/clang-build/lib/Analysis -I/Users/buildslave/jenkins/workspace/clang-stage1-cmake-RA-incremental/llvm-project/llvm/lib/Analysis -I/Users/buildslave/jenkins/workspace/clang-stage1-cmake-RA-incremental/clang-build/include -I/Users/buildslave/jenkins/workspace/clang-stage1-cmake-RA-incremental/llvm-project/llvm/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -O3 -DNDEBUG -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk -mmacosx-version-min=10.14 -fno-exceptions -fno-rtti -UNDEBUG -std=c++17 -MD -MT lib/Analysis/CMakeFiles/LLVMAnalysis.dir/TensorSpec.cpp.o -MF lib/Analysis/CMakeFiles/LLVMAnalysis.dir/TensorSpec.cpp.o.d -o lib/Analysis/CMakeFiles/LLVMAnalysis.dir/TensorSpec.cpp.o -c /Users/buildslave/jenkins/workspace/clang-stage1-cmake-RA-incremental/llvm-project/llvm/lib/Analysis/TensorSpec.cpp In file included from /Users/buildslave/jenkins/workspace/clang-stage1-cmake-RA-incremental/llvm-project/llvm/lib/Analysis/TensorSpec.cpp:16: In file included from /Users/buildslave/jenkins/workspace/clang-stage1-cmake-RA-incremental/llvm-project/llvm/include/llvm/Analysis/TensorSpec.h:16: /Users/buildslave/jenkins/workspace/clang-stage1-cmake-RA-incremental/llvm-project/llvm/include/llvm/Support/JSON.h:354:29: error: non-constant-expression cannot be narrowed from type 'unsigned long' to 'int64_t' (aka 'long long') in initializer list [-Wc++11-narrowing] create<int64_t>(int64_t{I}); ^ /Users/buildslave/jenkins/workspace/clang-stage1-cmake-RA-incremental/llvm-project/llvm/lib/Analysis/TensorSpec.cpp:55:18: note: in instantiation of function template specialization 'llvm::json::Value::Value<unsigned long, void, void, void>' requested here OS.value(D); ^ /Users/buildslave/jenkins/workspace/clang-stage1-cmake-RA-incremental/llvm-project/llvm/include/llvm/Support/JSON.h:354:29: note: insert an explicit cast to silence this issue create<int64_t>(int64_t{I}); ^ static_cast<int64_t>( ) 1 error generated. https://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-incremental/33120/consoleFull#-145995569149ba4694-19c4-4d7e-bec5-911270d8a58c
-
Florian Hahn authored
-
Arthur Eubanks authored
Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D139364
-
Peiming Liu authored
Revert "Revert "[mlir][sparse] Refactoring: abstract sparse tensor memory scheme into a SparseTensorDescriptor class."" This reverts commit 10033a17. Plus, it fixed windows warnings and gcc errors Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D139384
-
Kazu Hirata authored
Without this patch, operator<< for Optional<T> and std::optional<T> are in Optional.h. This means that a C++ source file must include Optional.h even if it just needs to stream std::optional<T> and has nothing to do with Optional<T>, which is counter-intuitive. This patch moves the operator<< to raw_ostream.h. As a bonus, we get to resolve a circular dependency. Optional.h no longer needs to forward-declare raw_ostream. That is, raw_ostream.h depends on Optional.h, not vice versa. As a preparation for this patch, I've checked in 77609717 to forward-declare raw_ostream in those header files that were relying on the forward declaration of raw_ostream in Optional.h. Differential Revision: https://reviews.llvm.org/D139290
-
Jay Foad authored
Differential Revision: https://reviews.llvm.org/D139438
-
Nico Weber authored
This reverts commit 98201724. Breaks check-llvm, see https://reviews.llvm.org/D139433#3974862
-
bixia1 authored
Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D139374
-
Shilei Tian authored
This patch uses `add_llvm_library` to build the target `PluginInterface` since it can handle LLVM dependences much better. One temporary drawback of using this is that currently LLVM CMake macro doesn't support object libraries very well (there was a try a couple years ago but it was reverted later https://github.com/llvm/llvm-project/commit/29e57229497711a3a294f437b59afa6ddc36a3d8). After switching to that, `CXX_VISIBILITY_PRESET` can not be set correctly, which can cause runtime error that a function call from one plugin could go to another. As a consequence, `PluginInterface` is built as a static library for now. I have asked the question in CMake community (https://discourse.cmake.org/t/set-target-properties-doesnt-work-properly/7016). Once that issue is solved, I'll switch it back to object library. It is not necessarily too bad to use static library, especially `BUILDTREE_ONLY` is already set such that `PluginInterface.a` will not be installed. Reviewed By: jhuber6 Differential Revision: https://reviews.llvm.org/D139371
-
Sanjay Patel authored
(X & Pow2MaskC) == 0 --> (trunc X) >= 0 (X & Pow2MaskC) != 0 --> (trunc X) < 0 This was noted as a regression in the post-commit feedback for D112634 (where we canonicalized IR differently). For x86, this saves a few instruction bytes. AArch64 seems neutral. Differential Revision: https://reviews.llvm.org/D139363
-
Sanjay Patel authored
-
Mark de Wever authored
The version used is now determined by Buildkite instead of using the hard-coded version in the Docker image. Reviewed By: #libc, ldionne Differential Revision: https://reviews.llvm.org/D139341
-
Jon Chesterfield authored
Renames the current lowering scheme to "module" and introduces two new ones, "kernel" and "table", plus a "hybrid" that chooses between those three on a per-variable basis. Unit tests are set up to pass with the default lowering of "module" or "hybrid" with this patch defaulting to "module", which will be a less dramatic codegen change relative to the current. This reflects the sparsity of test coverage for the table lowering method. Hybrid is better than module in every respect and will be default in a subsequent patch. Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D139433
-
Roman Lebedev authored
For instrs with tied operands, that strategy will not produce anything different from `SingleStaticReg` unless there are at least two registers.
-
Dmitry Makogon authored
-
Mircea Trofin authored
This is the next step in dropping the dependency on protobuf. The simple logger produces an output consisting of lines of json strings. Tensor values - which should constitute the bulk of the data - are serialized as raw byte buffers. This allows for light-weight reading of the values. The next step is to switch the training logic to the new logging format, following which the protobuf-based logger will be dropped, together with the training dependency on protobuf. Subsequent changes will also stop buffering and stream, instead - the buffering model is just as a convenient point-in-time. Differential Revision: https://reviews.llvm.org/D139370
-
- Dec 06, 2022
-
-
Nikita Popov authored
Succs can be empty here if a phi predecessor is unreachable. Fixes https://github.com/llvm/llvm-project/issues/59360
-
Sander de Smalen authored
Reversing double-words within a quard-word is possible using the REVD instruction when SVE2p1 is enabled. Reviewed By: paulwalker-arm Differential Revision: https://reviews.llvm.org/D139119
-
Nikita Popov authored
The special case for V=1 was incorrect for one bit types, where 1 is also -1. Remove it, and use getNonEmpty() to handle the full range case instead. Adjust the exhaustive nowrap tests to test both 5 bit and 1 bit types. Fixes https://github.com/llvm/llvm-project/issues/59301.
-