- Nov 15, 2022
-
-
Chen Zheng authored
mflr is kind of expensive on Power version smaller than 10, so we should schedule the store for the mflr's def away from mflr. In epilogue, the expensive mtlr has no user for its def, so it doesn't matter that the load and the mtlr are back-to-back. Reviewed By: RolandF Differential Revision: https://reviews.llvm.org/D137423
-
River Riddle authored
This provides an optimization opportunity for clients that don't want/need to recurse attribute dictionaries.
-
Xiaodong Liu authored
When the range of the unconditional branch is overflow, the indirect branch way is used. The case when there is no scavenged register for indirect branch needs to spill register to stack. Reviewed By: SixWeining, wangleiat Differential Revision: https://reviews.llvm.org/D137821
-
Jakub Kuderski authored
Reviewed By: antiagainst Differential Revision: https://reviews.llvm.org/D137978
-
Jakub Kuderski authored
This includes LIT tests over the generated ops and runtime tests. Reviewed By: antiagainst Differential Revision: https://reviews.llvm.org/D137965
-
TatWai Chong authored
Add a separate validation pass to check if TOSA operations match with the specification against given requirement. Perform profile type checking as the initial feature in the pass. This is an optional pass that can be enabled via command line. e.g. $mlir-opt --tosa-validate="profile=bi" for validating against the base inference profile. Description: TOSA defines a variety of operator behavior and requirements in the specification. It would be helpful to have a separate validation pass to keep TOSA operation input match with TOSA specification for given criteria, and also diminish the burden of dialect validation during compilation. TOSA supports three profiles of which two are for inference purposes. The main inference profile supports both integer and floating-point data types, but the base inference profile only supports integers. In this initial PR, validate the operations against a given profile of TOSA, so that validation would fail if a floating point tensor is present when the base inference profile is selected. Afterward, others checking will be added to the pass if needed. e.g. control flow operators and custom operators validation. The pass is expected to be able to run on any point of TOSA dialect conversion/transformation pipeline, and not depend on a particular pass run ahead. So that it is can be used to validate the initial tosa operations just converted from other dialects, the intermediate form, or the final tosa operations output. Change-Id: Ib58349c873c783056e89d2ab3b3312b8d2c61863 Reviewed By: rsuderman Differential Revision: https://reviews.llvm.org/D137279
-
Roman Lebedev authored
-
Aart Bik authored
Reviewed By: Peiming Differential Revision: https://reviews.llvm.org/D137981
-
Dmitry Vassiliev authored
Emit pragma nounroll for llvm.loop.unroll.count=1 (#pragma unroll 1). Reviewed By: tra Differential Revision: https://reviews.llvm.org/D137991
-
Peiming Liu authored
Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D137994
-
Stella Stamenova authored
Revert "[mlir][sparse] Macros to clean up StridedMemRefType in the SparseTensorRuntime" and "[mlir][sparse] move SparseTensorReader functions into the _mlir_ciface_ section" This reverts commits 6c22dad9 and 92bc3fb5. These broke the windows mlir buildbot.
-
Matt Arsenault authored
-
Fangrui Song authored
This reverts commit bf8381a8. There is a layering violation: LLVMAnalysis depends on LLVMCore, so LLVMCore should not include LLVMAnalysis header llvm/Analysis/ModuleSummaryAnalysis.h
-
Alexander Shaposhnikov authored
Enable using -module-summary with -S (similarly to what currently can be achieved with opt <input> -o - | llvm-dis). This is a recommit of ef9e6246. Test plan: ninja check-all Differential revision: https://reviews.llvm.org/D137768
-
Peiming Liu authored
Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D137985
-
wren romano authored
Reviewed By: aartbik, Peiming Differential Revision: https://reviews.llvm.org/D137987
-
Philip Reames authored
-
Joseph Huber authored
The `LLVM_ENABLE_RUNTIMES' mode is commonly used to build runtimes that depend on an up-to-date version of clang. Currently, `libc` uses some internal variables that are not forwarded when building in this mode. This patch forwards the relevent arguments beginning with `LLVM_LIBC` to the build when built this way. Reviewed By: tianshilei1992 Differential Revision: https://reviews.llvm.org/D137977
-
bixia1 authored
Reviewed By: aartbik, Peiming Differential Revision: https://reviews.llvm.org/D137964
-
wren romano authored
Depends On D137735 Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D137737
-
wren romano authored
In particular, this silences warnings from [-Wsign-compare]. Depends On D137681 Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D137735
-
wren romano authored
Systematically updates the SparseTensorRuntime to properly distinguish tensor-dimensions from storage-levels (and their associated ranks, shapes, sizes, indices, etc). With a few exceptions which are noted in the code, this ensures the runtime has all the **semantic** changes necessary to support non-permutations. (Whereas **operationally**, since we're still using `std::vector<uing64_t>` to represent the mappings, there's no way to pass in any interesting non-permutations. Changing the representation to `std::function` will be done in a separate differential.) Depends On D137680 Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D137681
-
Craig Topper authored
This instruction is a conditional move. It propagates sign bits from its inputs.
-
Alexander Shaposhnikov authored
This reverts commit ef9e6246 for further investigation offline. It appears to break the buildbot llvm-clang-x86_64-sie-ubuntu-fast.
-
Alexander Shaposhnikov authored
Enable using -module-summary with -S (similarly to what currently can be achieved with opt <input> -o - | llvm-dis). Test plan: ninja check-all Differential revision: https://reviews.llvm.org/D137768
-
Jonas Devlieghere authored
This reverts commit 68efb477 because the test fails on some of the buildbots.
-
Xiang Li authored
Fix build and test error caused by https://github.com/llvm/llvm-project/commit/a2620e00ffa232a406de3a1d8634beeda86956fd# and https://github.com/llvm/llvm-project/commit/304f1d59ca41872c094def3aee0a8689df6aa398 Reviewed By: beanz Differential Revision: https://reviews.llvm.org/D137815
-
Jonas Devlieghere authored
Fix a assertion in dsymutil coming from the Reproducer/FileCollector. When TMPDIR is empty, the root becomes a relative path, triggering an assertion when adding a relative path to the VFS mapping. This patch fixes the issue by resolving the relative path and also moves the assertion up to make it easier to diagnose these issues in the future. rdar://102170986 Differential revision: https://reviews.llvm.org/D137959
-
Andreas Hollandt authored
Reviewed By: tstellar Differential Revision: https://reviews.llvm.org/D137917
-
Nico Weber authored
Like D134013, but for COFF and Mach-O. Also expand the ELF test a bit. I at first didn't realize that `getValue()` for `-mllvm -foo=bar` would return `-foo=bar` instead of just `bar`, and so I wrote the test to check if we indeed get this wrong. We don't, but having the test for it seems nice, so I'm including it. Differential Revision: https://reviews.llvm.org/D137971
-
Jakub Kuderski authored
Also fix some surrounding nits. Reviewed By: antiagainst Differential Revision: https://reviews.llvm.org/D137974
-
Mehdi Amini authored
-
Mehdi Amini authored
-
Rob Suderman authored
Since all output elements are known to be overridden by construction the fill is not required. This change makes the tosa lowering consistent with the MHLO and Torch lowerings of concat which do not do the fill. Reviewed By: rsuderman Differential Revision: https://reviews.llvm.org/D137967
-
Guozhi Wei authored
Ignorable operands don't impact instruction's behavior, we can safely do CSE on the instruction. It is split from D130919. It has big impact to some AMDGPU test cases. For example in atomic_optimizations_raw_buffer.ll, when trying to check if the following instruction can be CSEed %37:vgpr_32 = V_MOV_B32_e32 0, implicit $exec Function isCallerPreservedOrConstPhysReg is called on operand "implicit $exec", this function is implemented as - return TRI.isCallerPreservedPhysReg(Reg, MF) || + return TRI.isCallerPreservedPhysReg(Reg, MF) || TII.isIgnorableUse(MO) || (MRI.reservedRegsFrozen() && MRI.isConstantPhysReg(Reg)); Both TRI.isCallerPreservedPhysReg and MRI.isConstantPhysReg return false on this operand, so isCallerPreservedOrConstPhysReg is also false, it causes LLVM failed to CSE this instruction. With this patch TII.isIgnorableUse returns true for the operand $exec, so isCallerPreservedOrConstPhysReg also returns true, it causes this instruction to be CSEed with previous instruction %14:vgpr_32 = V_MOV_B32_e32 0, implicit $exec So I got different result from here. AMDGPU's implementation of isIgnorableUse is bool SIInstrInfo::isIgnorableUse(const MachineOperand &MO) const { // Any implicit use of exec by VALU is not a real register read. return MO.getReg() == AMDGPU::EXEC && MO.isImplicit() && isVALU(*MO.getParent()) && !resultDependsOnExec(*MO.getParent()); } Since the operand $exec is not a real register read, my understanding is it's reasonable to do CSE on such instructions. Because more instructions are CSEed, so I get less instructions generated for these tests. Differential Revision: https://reviews.llvm.org/D137222 -
Matt Arsenault authored
This does some extra stuff for Windows, so might as well use it just in case.
-
Quentin Colombet authored
Essentially, this patches changes the anchor point of the `extract_strided_metadata(reshapeLikeOp)` pattern from `extract_strided_metadata` to `reshapeLikeOp`. In details, this means that instead of replacing: ``` base, offset, sizes, strides = extract_strided_metadata(reshapeLikeOp(src)) ``` With ``` base, offset = extract_strided_metadata(src) sizes = <some math> strides = <some math> ``` We replace only the reshapeLikeOp part and connect it back with a reinterpret_cast: ``` val = reshapeLikeOp(src) ``` => ``` base, offset, ... = extract_strided_metadata(src) sizes = <some math> strides = <some math> val = reinterpret_cast base, offset, sizes, strides Differential Revision: https://reviews.llvm.org/D136386
-
Quentin Colombet authored
Essentially, this patches changes the anchor point of the `extract_strided_metadata(subview)` pattern from `extract_strided_metadata` to `subview`. In details, this means that instead of replacing: ``` base, offset, sizes, strides = extract_strided_metadata(subview(src)) ``` With ``` base, ... = extract_strided_metadata(src) offset = <some math> sizes = subSizes strides = <some math> ``` We replace only the subview part and connect it back with a reinterpret_cast: ``` val = subview(src) ``` => ``` base, ... = extract_strided_metadata(src) offset = <some math> sizes = subSizes strides = <some math> val = reinterpret_cast base, offset, sizes, strides ``` Differential Revision: https://reviews.llvm.org/D135839
-
Quentin Colombet authored
This patch adds a pattern to simplify ``` base, offset, sizes, strides = extract_strided_metadata( reinterpret_cast(src, srcOffset, srcSizes, srcStrides)) ``` Into ``` base, baseOffset, ... = extract_strided_metadata(src) offset = srcOffset sizes = srcSizes strides = srcStrides ``` Note: Reinterpret_cast with unranked sources are not simplified since they cannot feed extract_strided_metadata operations. Differential Revision: https://reviews.llvm.org/D135837 -
Nico Weber authored
-