- Jul 02, 2022
-
-
Craig Topper authored
where C2 has 32 leading zeros and C3 trailing zeros. When the shl is used by an add C is 1,2 or 3, we end up matching (add (shl X, C), Y) first. This leaves an and with a constant that is harder to materialize.
-
Craig Topper authored
Similar for SH2ADD and SH3ADD. This is what we get from int foo(int* x, unsigned y) { return x[y >> 1]; } This allows us to avoid materializing 0xFFFFFFFE into a register. -
Petr Hosek authored
This reverts commit 6213dba1 since this broke Fuchsia builders.
-
owenca authored
-
Joseph Huber authored
Summary: A previous patch added support for dumping offloading sections. The tests for this feature added dummy input to the required section using `llvm-objcopy`. This binary format has a required alignment of `8` which was not being respected by the file copied with llvm-objcopy and would cause failures on architectures sensitive to alignment problems or with sanitizers. This patch adds the proper alignemnt and adds an error check at least for the binary format so it's not completely opaque. This should be improvbed so users actually get a helpful message.
-
Yeting Kuo authored
This reverts commit 7af3d4ab. RISC-V reverted the shrink wrap patch for bug 53662. Since the bug is fixed by D123679, the commit re-enable it. Reviewed By: reames Differential Revision: https://reviews.llvm.org/D128965
-
Johannes Doerfert authored
If we are certainly not in a loop we can directly emit the heap2stack allocas in the function entry block. This will help to get rid of them (SROA) and avoid stacksave/restore intrinsics when the function is inlined.
-
Johannes Doerfert authored
I used a script to reuse existing check lines rather than creating new ones. There are more opportunities to reduce the line count but the "check generated functions" logic makes that somewhat tricky. FWIW, we really should redo the update script with all these use cases in mind... Differential Revision: https://reviews.llvm.org/D128686
-
owenca authored
-
wren romano authored
This is a followup to D128058. Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D129027
-
Yeting Kuo authored
Just simplify code. Reviewed By: khchen Differential Revision: https://reviews.llvm.org/D128972
-
LLVM GN Syncbot authored
-
LLVM GN Syncbot authored
-
Joseph Huber authored
In Clang/LLVM we are moving towards a new binary format to store many embedded object files to create a fatbinary. This patch adds support for dumping these embedded images in the `llvm-objdump` tool. This will allow users to query information about what is stored inside the binary. This has very similar functionality to the `cuobjdump` tool for thoe familiar with the Nvidia utilities. The proposed use is as follows: ``` $ clang input.c -fopenmp --offload-arch=sm_70 --offload-arch=sm_52 -c $ llvm-objdump -O input.o input.o: file format elf64-x86-64 OFFLOADIND IMAGE [0]: kind cubin arch sm_52 triple nvptx64-nvidia-cuda producer openmp OFFLOADIND IMAGE [1]: kind cubin arch sm_70 triple nvptx64-nvidia-cuda producer openmp ``` This will be expanded further once we start embedding more information into these offloading images. Right now we are planning on adding flags and entries for debug level, optimization, LTO usage, target features, among others. This patch only supports printing these sections, later we will want to support dumping files the user may be interested in via another flag. I am unsure if this should go here in `llvm-objdump` or `llvm-objcopy`. Reviewed By: MaskRay, tra, jhenderson, JonChesterfield Differential Revision: https://reviews.llvm.org/D126904
-
Joseph Huber authored
This patchs adds the necessary code for inspecting or creating offloading binaries using the standing `obj2yaml` and `yaml2obj` features in LLVM. Depends on D127774 Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D127776
-
Jennifer Yu authored
region with implicit default inside the member function. This is to fix assert when field is referenced in OpenMP region with default (first|private) clause inside member function. The problem of assert is that the capture is not generated for the field. This patch is to generate capture when the field is used with implicit default, use it in the code, and save the capture off to make sure it is considered from that point and add first/private clauses. 1> Add new field ImplicitDefaultFirstprivateFDs in SharingMapTy, used to store generated capture fields info. 2> In function isOpenMPCaptureDecl: the caputer is generated and saved in ImplicitDefaultFirstprivateFDs. 3> Add new help functions: getImplicitFDCapExprDecl isImplicitDefaultFirstprivateFD addImplicitDefaultFirstprivateFD 4> Add addition argument in hasDSA to check default attribute for default(first|private). 5> The isImplicitDefaultFirstprivateFD is used in VisitDeclRefExpr to build the implicit clause. 6> Add new parameter "Context" for buildCaptureDecl, due to when capture field, the parent context is needed to be used. 7> Change in isOpenMPPrivateDecl where stop propagate the capture from the enclosing region for private variable. 8> In ActOnOpenMPFirstprivate/ActOnOpenMPPrivate, using captured info to generate first|private clause. 9> Add new function isOpenMPRebuildMemberExpr: use to determine if field needs to be rebuild during template instantiation. Differential Revision: https://reviews.llvm.org/D127803
-
LLVM GN Syncbot authored
-
Konstantin Varlamov authored
Differential Revision: https://reviews.llvm.org/D127834
-
Vitaly Buka authored
Symbol changed with 640bbdf71c6f10ac26252ac67a22902e26657bd8
-
Nuno Lopes authored
This reverts commits 47e6f98f and 3e701bcd
-
Nuno Lopes authored
-
Nuno Lopes authored
-
Maksim Panchenko authored
If BOLT instrumentation runtime uses XMM registers, it can interfere with the user program causing crashes and unexpected behavior. This happens as the instrumentation code preserves general purpose registers only. Build BOLT instrumentation runtime with "-mno-sse". Reviewed By: Amir Differential Revision: https://reviews.llvm.org/D128960
-
Fangrui Song authored
-
Argyrios Kyrtzidis authored
This is a preprocessor callback focused on the lexed file changing, without conflating effects of line number directives and other pragmas. A client that only cares about what files the lexer processes, like dependency generation, can use this more straightforward callback instead of `PPCallbacks::FileChanged()`. Clients that want the pragma directive effects as well can keep using `FileChanged()`. A use case where `PPCallbacks::LexedFileChanged()` is particularly simpler to use than `FileChanged()` is in a situation where a client wants to keep track of lexed file changes that include changes from/to the predefines buffer, where it becomes unnecessary complicated trying to use `FileChanged()` while filtering out the pragma directives effects callbacks. Also take the opportunity to provide information about the prior `FileID` the `Lexer` moved from, even when entering a new file. Differential Revision: https://reviews.llvm.org/D128947
-
Arthur Eubanks authored
-
Arthur Eubanks authored
-
Sanjay Patel authored
This transform is responsible for a long-standing miscompile as discussed in issue #47012 (was bugzilla #47668). There was a proposal to correct it in D88432, but that was abandoned and there hasn't been any recent activity to fix it AFAICT. The original patch D45108 started with a constant-shift-only restriction and only expanded during review, so I don't think there's much risk of perf regression on the motivating code.
-
Sanjay Patel authored
The update script ( utils/update_test_checks.py ) warns against this.
-
wren romano authored
This is a followup to D128847. The `AffineMap::getPermutedPosition` method performs a linear scan of the map, thus the previous implementation had asymptotic complexity of `O(|topSort| * |m|)`. This change reduces that to `O(|topSort| + |m|)`. Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D129011
-
Valentin Clement authored
This test is added to check for multidimensional descriptor of array substring/derived type component array. This patch is part of the upstreaming effort from fir-dev branch. Reviewed By: jeanPerier Differential Revision: https://reviews.llvm.org/D128990 Co-authored-by:
Jean Perier <jperier@nvidia.com>
-
Alexey Bataev authored
NFC.
-
Haojian Wu authored
-
Eric Kunze authored
The TOSA Specification doesn't have a dilation attribute for transpose_conv2d, and the padding array is of size 4. (top,bottom,left,right). This change updates the dialect to match the specification, and updates the lit tests to match the dialect changes. Differential Revision: https://reviews.llvm.org/D127332
-
Alexey Bataev authored
freezextra freeze, NFC.e.
-
Fangrui Song authored
-
Arthur Eubanks authored
-
rdzhabarov authored
There is no need to specify `run-reproducer` explicitly anymore. Differential Revision: https://reviews.llvm.org/D129010
-
Erich Keane authored
This reverts commit befa8cf0. Apparently this breaks some libc++ builds with an apparent assertion, so I'm looking into that .
-
Craig Topper authored
getPointerAlignment and ConstantPoolSDNode::getAlign only consider the alignment of the object. If we already have a non-zero offset into the offset that may have reduced the alignment. Since the base pointer will become an LUI with the old offset, we need to be sure the new offset fits in the alignment of the address that will be used to create the LUI immediate. I'm not sure it is possible to have a non-zero offset in the GlobalAddressSDNode or ConstantPoolSDNode at this point today so this may only be a theoretical bug. Differential Revision: https://reviews.llvm.org/D129006
-