- Jun 18, 2023
-
-
Fangrui Song authored
For a function not in an IR COMDAT, currently we place it into a nodeduplicate IR COMDAT so that its text section and its associated .pseudo_probe section will be in the same section group, which can be retained or discarded by the linker as a unit. However, the section group wastes space. After D153189 uses SHF_LINK_ORDER to ensure a .pseudo_probe section will be discarded when its associated text section is discarded, we can remove the nodeduplicate IR change. In the following example, the .pseudo_probe associated with .text.f is discarded as expected. ``` clang -c -ffunction-sections -fpseudo-probe-for-profiling -xc =(printf 'void _start(){} void f(){}') -o a.o ld.lld --gc-sections --print-gc-sections a.o ``` Reviewed By: hoy Differential Revision: https://reviews.llvm.org/D153191 -
Owen Pan authored
-
Brad Smith authored
OpenBSD commit for reference: https://github.com/openbsd/src/commit/7b407c478fab53a6d9a091887c828c3f7b3f8b46
-
Florian Hahn authored
The test fails SCEV verification, which cause the expensive check bots to fail. Always run verification and mark as XFAIL until fixed.
-
Fangrui Song authored
to simplify code near __tls_get_addr parsing.
-
Uday Bondhugula authored
Add support for the bare pointer calling convention in the gpu-to-llvm pass. This wasn't being exposed and is needed when GPU-compiled MLIR is to be called with this convention. Reviewed By: krzysz00 Differential Revision: https://reviews.llvm.org/D152477
-
Florian Hahn authored
This reverts commit abfeda5a. and fe19036e. The added assertion triggers during clang bootstrap builds. Revert while I investigate.
-
Jeff Niu authored
Differential Revision: https://reviews.llvm.org/D153203
-
Florian Hahn authored
Add test for LSR miscompile.
-
- Jun 17, 2023
-
-
Felipe de Azevedo Piovezan authored
-
Hui authored
- This was to make implementing jthread easier and requested in https://reviews.llvm.org/D151559 Differential Revision: https://reviews.llvm.org/D151792
-
Prajwal S N authored
It was previously present in the inline code block and did not work as a hyperlink. Reviewed By: yassingh Differential Revision: https://reviews.llvm.org/D153061
-
Florian Hahn authored
-
Florian Hahn authored
GenerateTruncates at the moment creates extends/truncates for post-inc uses of normalized expressions. For example, if an add rec of the form {1,+,-1} is used outside the loop, the normalized form will use {1,+,-1} instead of {0,+,-1}. When naively sign-extending the normalized expression, it will get extended incorrectly to {1,+,-1} for the wider type, if the backedge-taken count of the loop is 1. To address this, the patch updates GenerateTruncates to check if the LSRUse contains any fixups with PostIncLoops. If that's the case, first de-normalize the expression, then perform the extend/truncate, then normalize again. There may be other places where similar checks are needed and the helper can be generalized for those cases. I'd not be surprised if other subtle mis-compiles are caused by this. Fixes #38847. Fixes #58039. Fixes #62852. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D153004 -
Florian Hahn authored
-
Corentin Jabot authored
-
Fangrui Song authored
* Add the SHF_LINK_ORDER flag so that the .pseudo_probe section is discarded when the associated text section is discarded. * Add unique ID so that with `clang -ffunction-sections -fno-unique-section-names`, there is one separate .pseudo_probe for each text section (disambiguated by `.section ....,unique,id` in assembly) The changes allow .pseudo_probe GC even if we don't place instrumented functions in an IR comdat (see `getOrCreateFunctionComdat` in SampleProfileProbe.cpp). Reviewed By: hoy Differential Revision: https://reviews.llvm.org/D153189
-
Jay Foad authored
Differential Revision: https://reviews.llvm.org/D153139
-
Fangrui Song authored
-
Sergei Barannikov authored
This commit breaks up CodeGen/TargetInfo.cpp into a set of *.cpp files, one file per target. There are no functional changes, mostly just code moving. Non-code-moving changes are: * A virtual destructor has been added to DefaultABIInfo to pin the vtable to a cpp file. * A few methods of ABIInfo and DefaultABIInfo were split into declaration + definition in order to reduce the number of transitive includes. * Several functions that used to be static have been placed in clang::CodeGen namespace so that they can be accessed from other cpp files. RFC: https://discourse.llvm.org/t/rfc-splitting-clangs-targetinfo-cpp/69883 Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D148094
-
Sergei Barannikov authored
Wrap calls to XXXTargetCodeGenInfo constructors into factory functions. This allows moving implementations of TargetCodeGenInfo to dedicated cpp files without a change. Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D150215
-
Sindhu Chittireddy authored
Replace getAs with castAs and add assert if needed. Differential Revision: https://reviews.llvm.org/D152977
-
Pranav Kant authored
-
Weining Lu authored
`LoongArchISD::CSRWR` has two results. The first is the result of `loongarch.csrwr.[wd]` intrinsic and the second is the chain. But currently the chain is not processed correctly when creating this node, resulting in the `csrwr` instruction being optimized out when the result is not used by anyone [1]. `LoongArchISD::CSRXCHG` has the same issue. This patch addresses this issue. [1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/loongarch/include/asm/loongarch.h?h=v6.4-rc6#n219 Reviewed By: hev Differential Revision: https://reviews.llvm.org/D153120
-
Weining Lu authored
Reviewed By: xry111 Differential Revision: https://reviews.llvm.org/D153119
-
Ashay Rane authored
The patch for promised interfaces (a5ef51d7) doesn't register all extensions in the CAPI's `mlirRegisterAllDialects()` function. This is used by the MLIR Python bindings, causing downstream users of the Python bindings to terminate abruptly. This patch adds the call to register all extensions. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D153174
-
LiaoChunyu authored
Improve D151719. (xor (setcc constant, y, setlt), 1) -> (setcc y, constant + 1, setlt) https://alive2.llvm.org/ce/z/BZNEia Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D152128
-
Matt Arsenault authored
This makes the scope and ordering arguments actually do something. Also add some new OpenCL tests since the existing HIP tests didn't cover address spaces.
-
Fangrui Song authored
[MC] Restore a special case to support limited A-B folding when A/B are in the same fragment being laided out Add subsection-if.s to test what we can fold (in the same fragment) and what we cannot. Fix https://github.com/ClangBuiltLinux/linux/issues/1876 Fixes: 4bdc7f7a
-
Owen Pan authored
If the first token of an annotated line already has a computed Newlines, reuse it to avoid potential overlapping whitespace replacements before preprocessor branching directives. Fixes #62892. Differential Revision: https://reviews.llvm.org/D151954
-
Daniel Thornburgh authored
-
Philip Reames authored
The code was using the tail policy being "agnostic" to select a instruction whose semantics were "undefined". This was almost always fine (as the pass through operand was usually implicit_def), but could in theory lead to a miscompile. I don't actually have a test case as it requires a later transform to exploit the wrong tail policy state, and I couldn't easily figure out to get vsetvli insertion to miscompile given the wrong state. This was spotted by inspection, and it may be a miscompile in theory only at the moment. Note that this may cause regressions if there are instructions for which we either don't have a _TU pseudo form, or the _TU pseudo form is missing a policy operand. When I was first looking at this, I saw exactly that, and D153067 exists to add the missing policy operand I noticed. As a later follow up, I want to always force the use of _TU, but it seemed good to fix the bug, then driven the _TU transition in a separate patch. Differential Revision: https://reviews.llvm.org/D153070
-
Philip Reames authored
This change adds a policy operand to the helper class which is used for binary ops like vadd, but also, possibly surprisingly, some of the vslide variants. This allows us to represent the tail agnostic state with this pseudo family - previously, we could only represent tail undefined and tail undisturbed. (Since these don't have a mask, they're always mask undefined.) This is NFC because no current producer uses the tail agnostic state. This will change in an upcoming change to doPeepholeMaskedRVV. Differential Revision: https://reviews.llvm.org/D153067
-
Diego Caballero authored
It looks like scalable vector support broke vectorization for 0-D tensors and we didn't have any test coverting that case. This patch provides a fix and a test. Differential Revision: https://reviews.llvm.org/D153181
-
Owen Pan authored
Replaces verifyFormat(..., getGoogleStyle()) with verifyGoogleFormat(...) in FormatTest.cpp.
-
Craig Topper authored
Don't use an alignment larger than the vector size.
-
Luke Lau authored
We can just explicitly check if the new unmasked pseudo takes a policy op, rather than implicitly relying on I->UnmaskedTUPseudo == I->UnmaskedPseudo. Split out from another patch to make the diff more readable. Differential Revision: https://reviews.llvm.org/D152961
-
Luke Lau authored
Differential Revision: https://reviews.llvm.org/D152960
-
Daniel Thornburgh authored
-
Philip Reames authored
This continues towards the goal spelled out in https://discourse.llvm.org/t/riscv-transition-in-vector-pseudo-structure-policy-variants/71295. This patch switches all the binary operations (no widen, no narrow, but both int and FP) to use the _TU + implicit_def passthrough form. Change is mechanical. This only changes the unmasked variants. Masked variants will still go through doPeepholeMaskedRVV and end up in the unsuffixed/TA form. Fixing that will be a separate change. Differential Revision: https://reviews.llvm.org/D152940
-