- May 12, 2022
-
-
Yuanfang Chen authored
-
Alan Zhao authored
When Clang generates the path prefix (i.e. the path of the directory where the file is) when generating FILE, __builtin_FILE(), and std::source_location, Clang uses the platform-specific path separator character of the build environment where Clang _itself_ is built. This leads to inconsistencies in Chrome builds where Clang running on non-Windows environments uses the forward slash (/) path separator while Clang running on Windows builds uses the backslash (\) path separator. To fix this, we add a flag -ffile-reproducible (and its inverse, -fno-file-reproducible) to have Clang use the target's platform-specific file separator character. Additionally, the existing flags -fmacro-prefix-map and -ffile-prefix-map now both imply -ffile-reproducible. This can be overriden by setting -fno-file-reproducible. [0]: https://crbug.com/1310767 Differential revision: https://reviews.llvm.org/D122766
-
Mike Rice authored
The 'n' character is used in place of '-' in the mangled name. Differential Revision: https://reviews.llvm.org/D125406
-
Xiang Li authored
This reverts commit 4dae38eb. Differential Revision: https://reviews.llvm.org/D125414
-
Joseph Huber authored
Summary: We use embedded binaries to extract offloading device code from the host fatbinary. This uses a binary format whose necessary alignment is eight bytes. The alignment is included within the ELF section type so the data extracted from the ELF should always be aligned at that amount. However, if this file was extraqcted from a static archive, it was being sent as an offset in the archive file which did not have the same alignment guaruntees as the ELF file. This was causing errors in the UB-sanitizer build as it would occasionally try to access a misaligned address. To fix this, I simply copy the memory directly to a new buffer which is guarnteed to have worst-case alignment of 16 in the case that it's not properly aligned.
-
Austin Kerbow authored
Adds an intrinsic/builtin that can be used to fine tune scheduler behavior. If there is a need to have highly optimized codegen and kernel developers have knowledge of inter-wave runtime behavior which is unknown to the compiler this builtin can be used to tune scheduling. This intrinsic creates a barrier between scheduling regions. The immediate parameter is a mask to determine the types of instructions that should be prevented from crossing the sched_barrier. In this initial patch, there are only two variations. A mask of 0 means that no instructions may be scheduled across the sched_barrier. A mask of 1 means that non-memory, non-side-effect inducing instructions may cross the sched_barrier. Note that this intrinsic is only meant to work with the scheduling passes. Any other transformations that may move code will not be impacted in the ways described above. Reviewed By: rampitec Differential Revision: https://reviews.llvm.org/D124700
-
Florian Hahn authored
Additional tests for D125264, inspired by @spatel.
-
Philip Reames authored
Specifically, how we handle zext vs sext around truncates.
-
Craig Topper authored
RVV makes heavy use of subregisters due to LMUL>1 and segment load/store tuples. Enabling subregister liveness tracking improves the quality of the register allocation. I've added a command line that can be used to turn it off if it causes compile time or functional issues. I used the command line to keep the old behavior for one interesting test case that was testing register allocation. Reviewed By: frasercrmck Differential Revision: https://reviews.llvm.org/D125108
-
Craig Topper authored
This is a followup to D124231. We can fold the ADDIW in this pattern if we can prove that LUI+ADDI would have produced the same result as LUI+ADDIW. This pattern occurs because constant materialization prefers LUI+ADDIW for all simm32 immediates. Only immediates in the range 0x7ffff800-0x7fffffff require an ADDIW. Other simm32 immediates work with LUI+ADDI. Reviewed By: asb Differential Revision: https://reviews.llvm.org/D124693
-
Florian Hahn authored
Test case for #30999.
-
Chris Lattner authored
This is a full audit of emitError calls, I took the opportunity to remove extranous parens and fix a couple cases where we'd generate multiple diagnostics for the same error. Differential Revision: https://reviews.llvm.org/D125355
-
Nikolas Klauser authored
Reviewed By: ldionne, #libc Spies: libcxx-commits Differential Revision: https://reviews.llvm.org/D125188
-
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
-