- May 12, 2022
-
-
Nikolas Klauser authored
Reviewed By: ldionne, #libc, jloser Spies: libcxx-commits Differential Revision: https://reviews.llvm.org/D125176
-
Craig Topper authored
Spotted while looking at Matthias' patches. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D124985
-
Philip Reames authored
-
River Riddle authored
Now that TableGen no longer relies on global Record state, we can allow for the client to own the RecordKeeper and SourceMgr. Given that TableGen internally still relies on the global llvm::SrcMgr, this method unfortunately still isn't thread-safe. Differential Revision: https://reviews.llvm.org/D125277
-
River Riddle authored
This commits removes TableGens reliance on managed static global record state by moving the RecordContext into the RecordKeeper. The RecordKeeper is now treated similarly to a (LLVM|MLIR|etc)Context object and is passed to static construction functions. This is an important step forward in removing TableGens reliance on global state, and in a followup will allow for users that parse tablegen to parse multiple tablegen files without worrying about Record lifetime. Differential Revision: https://reviews.llvm.org/D125276
-
Qiongsi Wu authored
This patch splits out the htm intrinsic headers from the PPC headers list. Reviewed By: jsji Differential Revision: https://reviews.llvm.org/D125386
-
Craig Topper authored
If we have multiple gather/scatter instructions using the same the same strided address we would scalarize it multiple times. I guess a later pass cleans this up, but I don't know if that's guaranteed. This patch adds a cache to remember the scalarization we already created for a previous gather/scatter. Reviewed By: frasercrmck Differential Revision: https://reviews.llvm.org/D125326
-
Yaxun (Sam) Liu authored
Update KEYALL to cover KEYCUDA. Introduce KEYMAX and a generic way to update KEYALL. Reviewed by: Dan Liew Differential Revision: https://reviews.llvm.org/D125396
-
Xiang Li authored
Create dxc_D as alias to option D which Define <macro> to <value> (or 1 if <value> omitted). Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D125338
-
Craig Topper authored
[RISCV] Move implementation of getVLOpNum and getSEWOpNum from RISCVInsertVSETVLI to RISCVBaseInfo.h. NFC We should consolidate the operand counting and ordering into RISCVBaseInfo.h and stop spreading it around. Reviewed By: asb Differential Revision: https://reviews.llvm.org/D125344
-
Craig Topper authored
This hook determines if SimplifySetcc transforms (X & (C l>>/<< Y)) ==/!= 0 into ((X <</l>> Y) & C) ==/!= 0. Where C is a constant and X might be a constant. The default implementation favors doing the transform if X is not a constant. Otherwise the code is left alone. There is a provision that if the target supports a bit test instruction then the transform will favor ((1 << Y) & X) ==/!= 0. RISCV does not say it has a variable bit test operation. RISCV with Zbs does have a BEXT instruction that performs (X >> Y) & 1. Without Zbs, (X >> Y) & 1 still looks preferable to ((1 << Y) & X) since we can fold use ANDI instead of putting a 1 in a register for SLL. This patch overrides this hook to favor bit extract patterns and otherwise falls back to the "do the transform if X is not a constant" heuristic. I've added tests where both C and X are constants with both the shl form and lshr form. I've also added a test for a switch statement that lowers to a bit test. That was my original motivation for looking at this. Reviewed By: asb Differential Revision: https://reviews.llvm.org/D124639
-
Sanjay Patel authored
As discussed in issue #37809, this transform is not safe if the input is an undefined value. This is similar to a recent change for urem: d428f09b There is no difference in codegen on the basic examples, but this could lead to regressions. We may need to improve freeze analysis or lowering if that happens. Presumably, in real cases that are similar to the tests where a subsequent transform removes the select, we will also be able to remove the freeze by seeing that the parameter has 'noundef'.
-
Sanjay Patel authored
These are all cosmetic (value naming) diffs that would distract from real changes in this file.
-
Craig Topper authored
Type legalization will want to turn (srl X, Y) into RISCVISD::SRLW, which will prevent us from using a BEXT instruction. I don't think there is any precedent for type promotion checking users to decide how to promote. Instead, I've added this DAG combine to do it before type legalization. Reviewed By: asb Differential Revision: https://reviews.llvm.org/D124109
-
Philip Reames authored
This patch is an alternative to a piece of D125270. If we have one vsetvli which is using as AVL the output of another, and the prior AVL can be proven to produce the same VL value as that defining one, we can use the AVL from the prior instruction. This has the effect of removing a state transition on AVL, and will let us use the cheaper 'vsetvli x0, x0, vtype1' form or possible even skip emitting it entirely. This builds on the same infrastructure as D125337, and does the analogous extension to working on abstract states instead of only prior explicit vsetvli instructions. This is where the (relatively minor) code improvements come from. More importantly, this fixes the last case where the state computed in phase 1 and 2 of the algorithm differs from the state computed during phase 3. Note that such differences can cause miscompiles by creating disagreements about contents of the VL and VTYPE registers at block boundaries. Doing this transform inside the dataflow can cause the compatibility of a later store to change with regards to the current state. test15 in the diff illustrates this case well. What we have is a vsetvli which is mutated by one following vector op, but whose GPR result is used by another. The compatibility logic walks back to the def in this case, and checks to see if it matches the immediate prior state. In phase 1 and 2, it doesn't, and in phase 3 (after mutation) it does because we remove a transition which caused it to differ. Differential Revision: https://reviews.llvm.org/D125392
-
Arthur Eubanks authored
Only applies linux for now. This prevents warnings with use_thinlto like bfd plugin: LLVM gold plugin has failed to create LTO module: Not an int attribute (Producer: 'LLVM15.0.0git' Reader: 'LLVM 13.0.1') Reviewed By: thakis Differential Revision: https://reviews.llvm.org/D125399
-
Peter Klausler authored
The predicate that is used to detect an invalid assumed-size argument to the intrinsic functions SHAPE, SIZE, & LBOUND gives false results for arguments whose shapes are not calculatable at compilation time. Replace with an explicit test for an assumed-size array dummy argument symbol. Differential Revision: https://reviews.llvm.org/D125342
-
Philip Reames authored
These variations are chosen to exercise both FRE and PRE cases involving loops which don't change state in the iteration and can thus perform vsetvli in the preheader of the loop only. At the moment, these are essentially all TODOs.
-
David Tenty authored
D87451 added -mignore-xcoff-visibility for AIX targets and made it the default (which mimicked the behaviour of the XL 16.1 compiler on AIX). However, ignoring hidden visibility has unwanted side effects and some libraries depend on visibility to hide non-ABI facing entities from user headers and reserve the right to change these implementation details based on this (https://libcxx.llvm.org/DesignDocs/VisibilityMacros.html). This forces us to use internal linkage fallbacks for these cases on AIX and creates an unwanted divergence in implementations on the plaform. For these reasons, it's preferable to not add -mignore-xcoff-visibility by default, which is what this patch does. Reviewed By: DiggerLin Differential Revision: https://reviews.llvm.org/D125141
-
Mircea Trofin authored
Updated reference file for dev-mode-logging.ll and expected output.
-
Peter Klausler authored
Complex component references (z%RE, z%IM) of complex named constants should be evaluated at compilation time. Differential Revision: https://reviews.llvm.org/D125341
-
Sanjay Patel authored
As discussed in issue #37809, this transform is not safe if the input is an undefined value. There is no difference in codegen on the basic examples, but this could lead to regressions. We may need to improve freeze analysis or lowering if that happens.
-
Amir Ayupov authored
Reviewed By: yota9 Differential Revision: https://reviews.llvm.org/D125397
-
Joseph Huber authored
Summary: These sections need to be aligned correctly to be extracted later, add a check to indicate if they aren't.
-
Vibhuti Sawant authored
While executing the test suite for Tensorflow(v2.8.0), we encountered multiple TC failures with the below error ``` 'z14' is not a recognized processor for this target ``` This patch adds the s390x target to the build target list. It fixes TC failures in multiple modules of Tensorflow on s390x arch. It is also tested to have no effect on x86 machines. Reviewed By: GMNGeoffrey Differential Revision: https://reviews.llvm.org/D125096
-
Aaron Ballman authored
This should address: https://lab.llvm.org/buildbot/#/builders/92/builds/26609
-
- May 11, 2022
-
-
Matthias Braun authored
Avoid endless loop in degenerate case with an integer constant as switch condition as reported in https://reviews.llvm.org/D124552
-
Alban Bridonneau authored
-
python3kgae authored
A new pass DxilEmitMetadata is added to translate information saved in llvm ir into metadata to match DXIL spec. Only generate DXIL validator version in this PR. In llvm ir, validator version is saved in ModuleFlag with "dx.valver" as Key. !llvm.module.flags = !{!0, !1} !1 = !{i32 6, !"dx.valver", !2} !2 = !{i32 1, i32 1} DXIL validator version has major and minor versions that are specified as named metadata: !dx.valver = !{!2} !2 = !{i32 1, i32 7} Reviewed By: kuhar, beanz Differential Revision: https://reviews.llvm.org/D125158 -
Joe Nash authored
Refactor to pass a templatized size parameter to the decoder to allow wider than 64bit decodes in a later patch. Contributors: Jay Foad <jay.foad@amd.com> Depends on D125261 Patch 5/N for upstreaming of AMDGPU gfx11 architecture. Reviewed By: dp Differential Revision: https://reviews.llvm.org/D125316
-
Florian Hahn authored
Extra tests for D125264.
-
Joe Nash authored
Tablegen definitions for subtarget features and cpp predicate functions to access the features. New Sub-TargetProcessors and common latencies. Simple changes to MIR codegen tests which pass on gfx11 because they have the same output as previous subtargets or operate on pseudo instructions which are reused from previous subtargets. Contributors: Jay Foad <jay.foad@amd.com> Petar Avramovic <Petar.Avramovic@amd.com> Patch 4/N for upstreaming of AMDGPU gfx11 architecture Depends on D124538 Reviewed By: Petar.Avramovic, foad Differential Revision: https://reviews.llvm.org/D125261
-
Shao-Ce SUN authored
Reviewed By: asb Differential Revision: https://reviews.llvm.org/D125289
-
Nikita Popov authored
If there is a freeze %x, we currently replace all other uses of %x with freeze %x -- as long as they are dominated by the freeze instruction. This patch extends this behavior to cases where we did not originally dominate the use by moving the freeze instruction directly after the definition of the frozen value. The motivation can be seen in test @combine_and_after_freezing_uses: Canonicalizing everything to freeze %x allows folds that are based on value identity (i.e. same operand occurring in two places) to trigger. This also covers the case from D125248. Differential Revision: https://reviews.llvm.org/D125321
-
Philip Reames authored
This patch is an alternative to a piece of D125270. Its direct motivation is to fix a wrong code bug (described below), but somewhat unexpectedly, it also results in a significant code quality improvement for idiomatic fixed length vector patterns. The existing transform is simply wrong in its current location. We are correct about the fact that the scalar move itself can use the previous vsetvli, but we loose track of the fact that later instructions might depend on the state change represented. That is, the actual value of VL in the register is different than the abstract state thinks it is. Not simply due to precision of modeling, but e.g. the VL register could contain 3 when the abstract state says it is 1. This is annoying hard to demonstrate in practice due to differences in policy flags on the intrinsics, but this is at least a latent wrong code bug. The code quality benefit comes from the fact we don't need to tie this to explicit vsetvli instructions at all. We can propagate the abstract state, and reduce a) the number of transitions, or b) the cost of those transitions. It turns out we have a bunch of cases - in tests at least - where fixed length AVLs are known non-zero, and we can leave VL unchanged while changing VTYPE. Differential Revision: https://reviews.llvm.org/D125337
-
Matthias Springer authored
Move helper functions for creating allocs/deallocs/memcpys to BufferizationOptions. Differential Revision: https://reviews.llvm.org/D125375
-
Louis Dionne authored
We do it for libc++, and it's rather useful for debugging e.g. CI.
-
Nico Weber authored
-
Joseph Huber authored
In order to do offloading compilation we need to embed files into the host and create fatbainaries. Clang uses a special binary format to bundle several files along with their metadata into a single binary image. This is currently performed using the `-fembed-offload-binary` option. However this is not very extensibile since it requires changing the command flag every time we want to add something and makes optional arguments difficult. This patch introduces a new tool called `clang-offload-packager` that behaves similarly to CUDA's `fatbinary`. This tool takes several input files with metadata and embeds it into a single image that can then be embedded in the host. Reviewed By: tra Differential Revision: https://reviews.llvm.org/D125165
-
Matt Devereau authored
Enable function attribute aarch64_sve_pcs at the C level, which correspondes to aarch64_sve_vector_pcs at the LLVM IR level. This requirement was created by this addition to the ARM C Language Extension: https://github.com/ARM-software/acle/pull/194 Differential Revision: https://reviews.llvm.org/D124998
-