- Feb 16, 2023
-
-
Hongtao Yu authored
Prevoius pseudo probes were dropped out of a vectorized loop body during loop vectorization. This can result in the samples of the loop entry is used for the loop body, which in turn can cause undercounting of the loop iteration count. The undercounting can further prevent the loop from being vectorized in the next build. I'm fixing this by explicting allowing pseudo probes to be kept in the vectorized loop body, and by claiming a probe instruction is not "uniform", the vectorizer will duplicate it by the number of vector lanes. For one internal service, I'm seeing the change causes the size increase of the .pseudoprobe section by 0.7%, which should count around 0.2% of the whole binary size. Reviewed By: wenlei Differential Revision: https://reviews.llvm.org/D144066
-
Akira Hatanaka authored
track of whether the pointer is known not to be null The flag will be used for the arm64e work we plan to upstream in the future (see https://lists.llvm.org/pipermail/llvm-dev/2019-October/136091.html). Currently the flag has no effect on code generation. Differential Revision: https://reviews.llvm.org/D142584
-
Markus Böck authored
This reverts commit 5561e174 The logic was moved from cmake into lit fixing the issue that lead to the revert and potentially others with multi-config cmake generators Differential Revision: https://reviews.llvm.org/D143925
-
Peter Klausler authored
Variable name 'y' needs to be used in the declaration of 'yDesc'. Differential Revision: https://reviews.llvm.org/D144117
-
Lei Zhang authored
These cases can be directly mapped to spirv.AtomicI* ops. Reviewed By: kuhar Differential Revision: https://reviews.llvm.org/D143952
-
Valentin Clement authored
-
Scott Linder authored
For AMDGCN default to mapping --lto-O# to --lto-CGO# in a 1:1 manner (i.e. clang -O<N> implies --lto-O<N> and --lto-CGO<N>). Ensure there is a means to override this via -Xoffload-linker and begin to claim these arguments to avoid incorrect warnings that they are not used. Reviewed By: yaxunl, MaskRay Differential Revision: https://reviews.llvm.org/D142499
-
Scott Linder authored
Allow controlling the CodeGenOpt::Level independent of the LTO optimization level in LLD via new options for the COFF, ELF, MachO, and wasm frontends to lld. Most are spelled as --lto-CGO[0-3], but COFF is spelled as -opt:lldltocgo=[0-3]. See D57422 for discussion surrounding the issue of how to set the CG opt level. The ultimate goal is to let each function control its CG opt level, but until then the current default means it is impossible to specify a CG opt level lower than 2 while using LTO. This option gives the user a means to control it for as long as it is not handled on a per-function basis. Reviewed By: MaskRay, #lld-macho, int3 Differential Revision: https://reviews.llvm.org/D141970
-
Thomas Raoux authored
Pick the right result type when folding transpose op into a read Differential Revision: https://reviews.llvm.org/D144113
-
J. Ryan Stinnett authored
-
Rahul Kayaith authored
Some older versions of gcc hit false positives here: /workdir/llvm-project/mlir/include/mlir/IR/Attributes.h:391:49: warning: parameter 'ty' set but not used [-Wunused-but-set-parameter] 391 | static inline bool isPossible(mlir::Attribute ty) { https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81676 -
Krzysztof Drewniak authored
Upcoming AMD hardware will include functions that accept 8-bit floats. Specifically, there are MFMA instructions that accept 8-bit floats, either using the same or mixed formats. This patch adds MLIR wrappers for these intrinsics and explicitly adds support for 8-bit floats in the gpu-to-rocdl conversion by way of amdgpu-to-rocdl. Since LLVM does not have f8 types, when targeting LLVM for compilation on an AMD GPU, both f8 types used on AMD hardware (f8E5M2FNUZ and f8E4M3FNUZ) are rewritten to i8. This patch also relaxes the restriction that the types of both source operands to a amdgpu.mfma instructions match exactly, as this is not necessarily required for the bf8 (f8E5M2FNUZ) and fp8 (f8E4M3FNUZ) instructions. In addition, since the buffer_{load,store} operations maintain a whitelist of permitted types, we add the relevant f8 types to that list. This patch does not add any implementations of arithmetic operations for f8 types. Reviewed By: jakeh-gc Differential Revision: https://reviews.llvm.org/D143956 -
Sanjay Patel authored
-
Zain Jaffal authored
This reverts commit 02ae7e72. include Value.h in ConstraintSystem.h
-
Xing Xue authored
Summary: The personality routine for the legacy AIX xlclang++ compiler uses the stack slot reserved for compilers to pass the exception object to the landing pad. The landing pad retrieves the exception object with a call to the runtime function __xlc_exception_handle(). The current implementation incorrectly assumes that __xlc_exception_handle() should go up one stack frame to get to the stack frame of the caller of __xlc_exception_handle(), which is supposedly the stack frame of the function containing the landing pad. However, this does not always work, e.g., the xlclang++ compiler sometimes generates a wrapper of __xlc_exception_handle() and calls the wrapper from the landing pad for optimization purposes. This patch changes the implementation to unwind the stack from __xlc_exception_handle() and skip frames not associated with functions that are C++ EH-aware until a frame associated with a C++ EH-aware function is found and then retrieving the exception object with the expectation that the located frame is the one that the personality routine installed as it transferred control to the landing pad. Reviewed by: cebowleratibm, hubert.reinterpretcast, daltenty Differential Revision: https://reviews.llvm.org/D143010
-
David Green authored
We can always use FMOVH0 to lower fp16 zero, even without fullfp16. We can either expand it to movi d0, #0 or fmov s0, wzr, which will both clear all the bits of the register. Differential Revision: https://reviews.llvm.org/D143988
-
Peter Klausler authored
During child I/O -- a call to a user-defined subroutine with a generic interface to handle read and write operations on a specific derived type -- ensure that any INQUIRE statement probing mutable modes like BLANK= will observe changes that have been made to those modes via control edit descriptors like BN while processing the original I/O statement's format. Differential Revision: https://reviews.llvm.org/D144046
-
- Feb 15, 2023
-
-
Matthias Springer authored
This should have been part of D144022.
-
Nikolas Klauser authored
This change is almost fully mechanical. The only interesting change is in `generate_feature_test_macro_components.py` to generate `_LIBCPP_STD_VER >=` instead. To avoid churn in the git-blame this commit should be added to the `.git-blame-ignore-revs` once committed. Reviewed By: ldionne, var-const, #libc Spies: jloser, libcxx-commits, arichardson, arphaman, wenlei Differential Revision: https://reviews.llvm.org/D143962
-
Yitzhak Mandelbaum authored
The provided `CFGElement` is never null, so a reference is a more precise type. Differential Revision: https://reviews.llvm.org/D143920
-
Nikita Popov authored
This reverts commit 2a2a6bfc. This causes build failures: /home/npopov/repos/llvm-project/llvm/lib/Analysis/ConstraintSystem.cpp: In member function ‘llvm::SmallVector<std::__cxx11::basic_string<char> > llvm::ConstraintSystem::getVarNamesList() const’: /home/npopov/repos/llvm-project/llvm/lib/Analysis/ConstraintSystem.cpp:118:10: error: invalid use of incomplete type ‘class llvm::Value’ 118 | if (V->getName().empty()) | ^~ In file included from /home/npopov/repos/llvm-project/llvm/lib/Analysis/ConstraintSystem.cpp:9: /home/npopov/repos/llvm-project/llvm/include/llvm/Analysis/ConstraintSystem.h:21:7: note: forward declaration of ‘class llvm::Value’ 21 | class Value; | ^~~~~ /home/npopov/repos/llvm-project/llvm/lib/Analysis/ConstraintSystem.cpp:119:22: error: invalid use of incomplete type ‘class llvm::Value’ 119 | OperandName = V->getNameOrAsOperand(); | ^~ /home/npopov/repos/llvm-project/llvm/include/llvm/Analysis/ConstraintSystem.h:21:7: note: forward declaration of ‘class llvm::Value’ 21 | class Value; | ^~~~~ /home/npopov/repos/llvm-project/llvm/lib/Analysis/ConstraintSystem.cpp:121:41: error: invalid use of incomplete type ‘class llvm::Value’ 121 | OperandName = std::string("%") + V->getName().str(); | ^~ /home/npopov/repos/llvm-project/llvm/include/llvm/Analysis/ConstraintSystem.h:21:7: note: forward declaration of ‘class llvm::Value’ 21 | class Value; | ^~~~~
-
Nikita Popov authored
-
David Spickett authored
Previously we were looking for the returns twice attribute by manually getting the function attributes from the call. This meant that we only found attributes on the call itself, not what it was calling. So if you had: %call1 = call i32 @setjmp(ptr noundef null) We would not BTI protect that even though setjmp clearly needs it. Clang happens to produce: %call = call i32 @setjmp(ptr noundef null) #0 ; returns_twice So all valid calls were protected. This is not guaranteed, the frontend may choose not to put attributes on the call. It is undefined behaviour to call setjmp indirectly (https://pubs.opengroup.org/onlinepubs/9699919799/functions/setjmp.html) but as I misused the APIs here I think it's worth fixing up regardless. Added comments to the test file where the IR differs from what clang would output. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D144082
-
Zain Jaffal authored
This reverts commit 62d0e1a8. remove `dumpWithNames` function
-
Zain Jaffal authored
This reverts commit 869c87ad. `dumpWithNames` function should be removed
-
Zain Jaffal authored
Previously when constraint system outputs the rows in the system the variables used are x1,2...n making it hard to infer which ones they relate to in the IR Reviewed By: fhahn Differential Revision: https://reviews.llvm.org/D142618
-
Guillaume Chatelet authored
As x86_64 implementations is likely to grow up to a point where it's no more manageable to have all implementations in the same file.
-
Matthias Springer authored
This change adds the BufferizableOpInterface implementation for memref.tensor_store. Differential Revision: https://reviews.llvm.org/D144080
-
Matthias Springer authored
This transform materializes a buffer allocation for a given tensor value. All uses of the original value are replaced with the allocation. Certain non-DPS ops may have an optimized lowering path that bufferizes the entire defining op. Such optimization is added for `tensor.pad` as part of this change. The resulting IR can be further bufferized with One-Shot Bufferize. Differential Revision: https://reviews.llvm.org/D144022
-
Nikita Popov authored
Check that the underlying object is a constant global with definitive initializer upfront, so we can skip the more expensive offset calculation logic if we can't perform the fold anyway.
-
Alex Bradbury authored
This patch is related to the discussion in <https://discourse.llvm.org/t/rfc-resolving-issues-related-to-extension-versioning-in-risc-v/68472/1>. It slightly expands the coverage of behaviour for unrecognized extensions (there are slightly different forms of error for zfoo vs e.g. 'y'), and adds coverage for an extension with an unrecognized/unsupported version number. Use "unrecognized" terminology because the expectation is the error checking will be reduced in a follow-up patch posted for review.
-
Sanjay Patel authored
Make it explicit that SNaN is not handled differently than QNaN in the LLVM default floating-point environment. Note that an IEEE-754-compliant model disallows transforms like "X * 1.0 -> X". That is because math operations are expected to convert SNaN to QNaN (set the signaling bit). But LLVM has had those kinds of transforms from the beginning: https://alive2.llvm.org/ce/z/igb55y We should be IEEE-754-compliant under strict-FP (the logic is implemented with a helper named canIgnoreSNaN()), but I don't think there is any demand to do that with default optimization. See issue #43070 for earlier draft/discussion about this change. Differential Revision: https://reviews.llvm.org/D143074
-
Guillaume Chatelet authored
-
Joseph Huber authored
Summary: Currently, OpenMP and direct compilation uses an NVPTX toolchain to directly invoke the CUDA tools from Clang to do the assembling and linking of NVPTX codes. This breaks under `-save-temps` because of a workaround. The `nvlink` linker does not accept `.o` files, so we need to be selective when we output these. The previous logic keyed off of presense in the temp files and wasn't a great solution. Change this to just query the input args for `-c` to see if we stop at the assembler. Fixes https://github.com/llvm/llvm-project/issues/60767
-
Guillaume Chatelet authored
This is patch is still breaking downstream users... This reverts commit 97e441dc.
-
Guillaume Chatelet authored
As x86_64 implementations is likely to grow up to a point where it's no more manageable to have all implementations in the same file.
-
Matthias Springer authored
This transform op returns a value handle pointing to the specified OpResult of the targeted op. Differential Revision: https://reviews.llvm.org/D144087
-
Benjamin Kramer authored
Avoids warnings in -asserts builds. FormatTokenSource.h:240:3: error: non-void function does not return a value [-Werror,-Wreturn-type] } ^
-
Jathu Satkunarajah authored
Create a binary target for clang-tidy. Tested by running: ``` $ bazel build --config=generic_clang @llvm-project//clang-tools-extra/... $ bazel test --config=generic_clang @llvm-project//clang-tools-extra/... $ bazel run --config=generic_clang @llvm-project//clang-tools-extra/clang-tidy -- --help ``` Reviewed By: #bazel_build, aaronmondal Differential Revision: https://reviews.llvm.org/D143804
-
Anton Sidorenko authored
This strategy makes each trace local to the basic block. For in-order cores some heuristics work better when we do local decisions. For example, MachineCombiner may expect that instructions outside the current basic block do not lengthen the critical path when we execute instructions in order or the core has a small re-order buffer. This patch only introduce the strategy, real use-case is added in the further pathes. Depends on D140539 Reviewed By: spatel Differential Revision: https://reviews.llvm.org/D140540
-