- Sep 29, 2021
-
-
Adrian Prantl authored
This patch improves the effectiveness of ADCE's debug info salvaging by processing the instructions in reverse order and delaying dropAllReferences until after debug info salvaging. This allows salvaging of entire chains of deleted instructions! Previously we would remove all references from an instruction, which would make it impossible to use that instruction to salvage a later instruction in the instruction stream, because its operands were already removed. Differential Revision: https://reviews.llvm.org/D110462
-
Adrian Prantl authored
This patch enables debug info salvaging for truncating/extending ptr int conversions. The testcase uncovered a bug in adce, which is addressed separately. rdar://80227769 Differential Revision: https://reviews.llvm.org/D110461
-
Paul Robinson authored
There are two sets of new/delete functions, one with Windows/MSVC mangling and one with Itanium mangling. Mark one set or the other as unavailable depending on the target. Split the test malloc-free-delete.ll into three parts: malloc-free.dll for the C API tests, new-delete-itanium.ll and new-delete-msvc.ll for the target-specific new/delete tests. Differential Revision: https://reviews.llvm.org/D110419
-
Simon Pilgrim authored
-
Yuanfang Chen authored
(This relands 59337263 and makes sure comma operator diagnostics are suppressed in a SFINAE context.) While at it, add the diagnosis message "left operand of comma operator has no effect" (used by GCC) for comma operator. This also makes Clang diagnose in the constant evaluation context which aligns with GCC/MSVC behavior. (https://godbolt.org/z/7zxb8Tx96) Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D103938
-
Fangrui Song authored
* Add a newline before `DYNAMIC RELOCATION RECORDS` (see D101796) * Add the missing `OFFSET TYPE VALUE` line * Align columns Note: llvm-readobj/ELFDumper.cpp `loadDynamicTable` has sophisticated PT_DYNAMIC code which is unavailable in llvm-objdump. Reviewed By: jhenderson, Higuoxing Differential Revision: https://reviews.llvm.org/D110595
-
Alex Richardson authored
This commit is the InstCombine follow-up to the previous constant-folding change that enables noticeable optimizations for CHERI-enabled targets. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D110247
-
Alex Richardson authored
I was looking at some missed optimizations in CHERI-enabled targets and noticed that we weren't removing vtable indirection for calls via known pointers-to-members. The underlying reason for this is that we represent pointers-to-function-members as {i8 addrspace(200)*, i64} and generate the constant offsets using (gep i8 null, <index>). We use a constant GEP here since inttoptr should be avoided for CHERI capabilities. The pointer-to-member call uses ptrtoint to extract the index, and due to this missing fold we can't infer the actual value loaded from the vtable. This is the initial constant folding change for this pattern, I will add an InstCombine fold as a follow-up. We could fold all inbounds GEP to null (and therefore the ptrtoint to zero) since zero is the only valid offset for an inbounds GEP. If the offset is not zero, that GEP is poison and therefore returning 0 is valid (https://alive2.llvm.org/ce/z/Gzb5iH). However, Clang currently generates inbounds GEPs on NULL for hand-written offsetof() expressions, so this could lead to miscompilations. Reviewed By: lebedev.ri Differential Revision: https://reviews.llvm.org/D110245 -
Alex Richardson authored
Differential Revision: https://reviews.llvm.org/D110244
-
Alex Richardson authored
I am looking at constant-folding changes that could affect these tests, so check that it emits the expected global value instead of just checking that it doesn't crash.
-
Alex Richardson authored
Looking at this test I did not see why MinGW was using a different command line until I looked at the git history. Add a comment explaining what this RUN line is actually testing. Also add two more RUN lines to show that indirectly passed member pointers don't inhibit the optimization.
-
Alex Richardson authored
This works just fine even if the Arm backend is not built.
-
Alex Richardson authored
-
Alex Richardson authored
When using a datalayout that has pointer index width != pointer size this code triggers an assertion in Value::stripAndAccumulateConstantOffsets(). I encountered this this while compiling FreeBSD for CHERI-RISC-V. Also update LoadsTest.cpp to use a DataLayout with index width != pointer width to ensure this case is tested. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D110406
-
Alex Richardson authored
On MIPS, functions with exception handling code emits an additional temporary label at the start of the function (due to UseAssignmentForEHBegin): _Z8do_catchv: # @_Z8do_catchv .Ltmp3: .set .Lfunc_begin0, .Ltmp3 .cfi_startproc .cfi_personality 128, DW.ref.__gxx_personality_v0 .cfi_lsda 0, .Lexception0 .frame $c11,48,$c17 .mask 0x00000000,0 .fmask 0x00000000,0 .set noreorder .set nomacro .set noat # %bb.0: # %entry The `[^:]*` regex was terminating the search after .Ltmp<N>: and therefore not detecting functions with exception handling. Reviewed By: atanasyan, MaskRay Differential Revision: https://reviews.llvm.org/D100027 -
Alex Richardson authored
Show that we fail to generate CHECK lines for MIPS64 functions with EH. Differential Revision: https://reviews.llvm.org/D110408
-
Arthur O'Dwyer authored
There's really no reason to even have two different enums here, but *definitely* we shouldn't have *three*, and they don't need so many synonymous enumerator values. Differential Revision: https://reviews.llvm.org/D110516
-
Roman Lebedev authored
The only sched models that for cpu's that support avx2 but not avx512 are: haswell, broadwell, skylake, zen1-3 For this tuple, measuring becomes problematic since there's a lot of spilling going on, but apparently all these memory ops do not affect worst-case estimate at all here. For load we have: https://godbolt.org/z/5qGb9odP6 - for intels `Block RThroughput: <=106.0`; for ryzens, `Block RThroughput: <=34.8` So pick cost of `106`. For store we have: https://godbolt.org/z/KrWcv4Ph7 - for intels `Block RThroughput: =58.0`; for ryzens, `Block RThroughput: <=20.5` So pick cost of `58`. I'm directly using the shuffling asm the llc produced, without any manual fixups that may be needed to ensure sequential execution. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D110593
-
Roman Lebedev authored
The only sched models that for cpu's that support avx2 but not avx512 are: haswell, broadwell, skylake, zen1-3 For load we have: https://godbolt.org/z/3Tc5s897j - for intels `Block RThroughput: =39.0`; for ryzens, `Block RThroughput: <=13.5` So pick cost of `39`. For store we have: https://godbolt.org/z/fo1h9E67e - for intels `Block RThroughput: =21.0`; for ryzens, `Block RThroughput: <=12.0` So pick cost of `21`. I'm directly using the shuffling asm the llc produced, without any manual fixups that may be needed to ensure sequential execution. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D110592
-
Roman Lebedev authored
The only sched models that for cpu's that support avx2 but not avx512 are: haswell, broadwell, skylake, zen1-3 For load we have: https://godbolt.org/z/1Wcaf9c7T - for intels `Block RThroughput: =9.0`; for ryzens, `Block RThroughput: <=4.5` So pick cost of `9`. For store we have: https://godbolt.org/z/1Wcaf9c7T - for intels `Block RThroughput: =15.0`; for ryzens, `Block RThroughput: <=6.0` So pick cost of `15`. I'm directly using the shuffling asm the llc produced, without any manual fixups that may be needed to ensure sequential execution. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D110591
-
Roman Lebedev authored
The only sched models that for cpu's that support avx2 but not avx512 are: haswell, broadwell, skylake, zen1-3 For load we have: https://godbolt.org/z/bhscej4WM - for intels `Block RThroughput: =13.0`; for ryzens, `Block RThroughput: <=7.0` So pick cost of `13`. For store we have: https://godbolt.org/z/Yf4Pfnxbq - for intels `Block RThroughput: =10.0`; for ryzens, `Block RThroughput: <=3.5` So pick cost of `10`. I'm directly using the shuffling asm the llc produced, without any manual fixups that may be needed to ensure sequential execution. Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D110590
-
wlei authored
Similar to https://reviews.llvm.org/D110465, we can compute function size on-demand for the functions that's hit by samples. Here we leverage the raw range samples' address to compute a set of sample hit function. Then `BinarySizeContextTracker` just works on those function range for the size. Reviewed By: hoy Differential Revision: https://reviews.llvm.org/D110466
-
wlei authored
Previously we do symbolization for all the functions and actually we only need the symbols that's hit by the samples. This can significantly speed up the time for large size binary. Optimization for per-inliner will come along with next patch. Reviewed By: hoy, wenlei Differential Revision: https://reviews.llvm.org/D110465
-
Quinn Pham authored
This patch is in a series of patches to provide builtins for compatability with the XL compiler. This patch adds builtins for compare exponent and test data class operations on floating point values. Reviewed By: #powerpc, lei Differential Revision: https://reviews.llvm.org/D109437
-
- Sep 28, 2021
-
-
Kazu Hirata authored
Note that SystemZMnemonicSpellCheck is defined in SystemZGenAsmMatcher.inc, which SystemZAsmParser.cpp includes. Identified with readability-redundant-declaration.
-
Roman Lebedev authored
See original review https://reviews.llvm.org/D107799 This reverts commit f9dbca68.
-
Dmitry Vyukov authored
Depends on D110631. Differential Revision: https://reviews.llvm.org/D110632
-
Dmitry Vyukov authored
Darwin also needs to use __tsan_tls_initialization to pass the test. Differential Revision: https://reviews.llvm.org/D110631
-
Valentin Clement authored
Rename `lenParams` to `typeparams` to be in sync with fir-dev. This patch is part of the upstreaming effort from fir-dev branch. Reviewed By: kiranchandramohan Differential Revision: https://reviews.llvm.org/D110628 Co-authored-by:
Jean Perier <jperier@nvidia.com> Co-authored-by:
Eric Schweitz <eschweitz@nvidia.com>
-
Andrew Turner authored
Differential Revision: https://reviews.llvm.org/D110545
-
Dmitry Vyukov authored
Commit 354ded67 ("tsan: align ThreadState to cache line") did an incomplete thing. It marked ThreadState as cache line aligned, but the thread local ThreadState instance is declared as an aligned char array with hard-coded 64-byte alignment. On PowerPC cache line size is 128 bytes, so the hard-coded 64-byte alignment is not enough. Use cache line alignment consistently. Differential Revision: https://reviews.llvm.org/D110629
-
Michał Górny authored
Move the "slice" and "composite" handling into separate methods to avoid if/else hell. Use more LLVM types whenever possible. Replace printf()s with llvm::Error combined with LLDB logging. Differential Revision: https://reviews.llvm.org/D110619
-
David Green authored
As we have to split blocks, we may be left in an invalid loop state after a WLS is reverted to a DLS. Instead remember the WLS that could not be fixed and revert them after finishing processing all other loops. Differential Revision: https://reviews.llvm.org/D110567
-
Erich Keane authored
No idea how my local machine missed this, but I saw no warning for it, it seems to have been lost in some level of translating this back for upstreaming.
-
Jingu Kang authored
This reverts the revert commit f85d8a5b with bug fixes. Original message: MOVi32imm + ANDWrr ==> ANDWri + ANDWri MOVi64imm + ANDXrr ==> ANDXri + ANDXri The mov pseudo instruction could be expanded to multiple mov instructions later. In this case, try to split the constant operand of mov instruction into two bitmask immediates. It makes only two AND instructions intead of multiple mov + and instructions. Added a peephole optimization pass on MIR level to implement it. Differential Revision: https://reviews.llvm.org/D109963
-
Alexey Bataev authored
Try to improve vectorization of the PHI nodes by trying to vectorize similar instructions at the size of the widest possible vectors, then aggregating with compatible type PHIs and trying to vectoriza again and only if this failed, try smaller sizes of the vector factors for compatible PHI nodes. This restores performance of several benchmarks after tuning of the fp/int conversion instructions costs. Differential Revision: https://reviews.llvm.org/D108740
-
Sjoerd Meijer authored
In rG6a076fa9, a problem with updating the old/narrow phi nodes after IV widening was introduced. If after widening of the IV the transformation is *not* applied, the narrow phi node was incorrectly modified, which should only happen if flattening happens. This can be seen in the added test widen-iv2.ll, which incorrectly had 1 incoming value, but should have its original 2 incoming values, which is now restored. Differential Revision: https://reviews.llvm.org/D110234
-
serge-sans-paille authored
Require it to be always_inline, to more closely match how _FORITFY_SOURCE behaves. This avoids generation of `.inline` suffixed functions - these should always be inlined.
-
Sanjay Patel authored
-
Sanjay Patel authored
We need more coverage for commuted and (un)signed preds to verify that things behave as expected here. Currently, we do not transform signed preds or non-inbounds geps.
-