- May 17, 2023
-
-
Alex Langford authored
m_name_list is a std::unordered_set<std::string>, we can insert the string directly instead of grabbing the c_str and creating yet another one.
-
David Green authored
This helps fix a regression from D148309 where a shift + add was no longer combined into a ssra. It looks for add's with v1i64 extract operands and converts them to v1i64 adds. The other operand needs to be something that is easily converted to a v1i64, in this case it currently just checks for a load. Some of the code in performAddSubCombine has been cleaned up whilst I was here. Differential Revision: https://reviews.llvm.org/D148311
-
Peter Klausler authored
The right-hand sides of assignment statements are always expressions, never variables. When an assignment statement is converted into a call to a defined assignment subroutine, and the actual argument being associated with the second dummy argument is a variable, and the dummy argument does not have the VALUE attribute, wrap it with parentheses so that lowering will pass it by means of a temporary. Fixes https://github.com/llvm/llvm-project/issues/62599. Differential Revision: https://reviews.llvm.org/D150331
-
Guillaume Chatelet authored
[libc] Add optimized bcmp for RISCV This patch adds two versions of bcmp optimized for architectures where unaligned accesses are either illegal or extremely slow. It is currently enabled for RISCV 64 and RISCV 32 but it could be used for ARM 32 architectures as well. Here is the before / after output of libc.benchmarks.memory_functions.opt_host --benchmark_filter=BM_Bcmp on a quad core Linux starfive RISCV 64 board running at 1.5GHz. Before ``` Run on (4 X 1500 MHz CPU s) CPU Caches: L1 Instruction 32 KiB (x4) L1 Data 32 KiB (x4) L2 Unified 2048 KiB (x1) Load Average: 7.03, 5.98, 3.71 ---------------------------------------------------------------------- Benchmark Time CPU Iterations UserCounters... ---------------------------------------------------------------------- BM_Bcmp/0/0 102 ns 60.5 ns 11662336 bytes_per_cycle=0.122696/s bytes_per_second=175.518M/s items_per_second=16.5258M/s __llvm_libc::bcmp,memcmp Google A BM_Bcmp/1/0 328 ns 172 ns 3737600 bytes_per_cycle=0.15256/s bytes_per_second=218.238M/s items_per_second=5.80575M/s __llvm_libc::bcmp,memcmp Google B BM_Bcmp/2/0 199 ns 99.7 ns 7019520 bytes_per_cycle=0.141897/s bytes_per_second=202.986M/s items_per_second=10.032M/s __llvm_libc::bcmp,memcmp Google D BM_Bcmp/3/0 173 ns 86.5 ns 8361984 bytes_per_cycle=0.13863/s bytes_per_second=198.312M/s items_per_second=11.5669M/s __llvm_libc::bcmp,memcmp Google L BM_Bcmp/4/0 105 ns 51.8 ns 13213696 bytes_per_cycle=0.116399/s bytes_per_second=166.51M/s items_per_second=19.2931M/s __llvm_libc::bcmp,memcmp Google M BM_Bcmp/5/0 167 ns 93.9 ns 7853056 bytes_per_cycle=0.139432/s bytes_per_second=199.459M/s items_per_second=10.6503M/s __llvm_libc::bcmp,memcmp Google Q BM_Bcmp/6/0 262 ns 165 ns 3931136 bytes_per_cycle=0.151516/s bytes_per_second=216.745M/s items_per_second=6.07091M/s __llvm_libc::bcmp,memcmp Google S BM_Bcmp/7/0 168 ns 105 ns 6665216 bytes_per_cycle=0.143159/s bytes_per_second=204.791M/s items_per_second=9.52163M/s __llvm_libc::bcmp,memcmp Google U BM_Bcmp/8/0 108 ns 68.0 ns 10175488 bytes_per_cycle=0.125504/s bytes_per_second=179.535M/s items_per_second=14.701M/s __llvm_libc::bcmp,memcmp Google W BM_Bcmp/9/0 15371 ns 9007 ns 78848 bytes_per_cycle=0.166128/s bytes_per_second=237.648M/s items_per_second=111.031k/s __llvm_libc::bcmp,uniform 384 to 4096 ``` After ``` BM_Bcmp/0/0 74.2 ns 49.7 ns 14306304 bytes_per_cycle=0.148927/s bytes_per_second=213.042M/s items_per_second=20.1101M/s __llvm_libc::bcmp,memcmp Google A BM_Bcmp/1/0 108 ns 68.1 ns 10350592 bytes_per_cycle=0.411197/s bytes_per_second=588.222M/s items_per_second=14.6849M/s __llvm_libc::bcmp,memcmp Google B BM_Bcmp/2/0 80.2 ns 56.0 ns 12386304 bytes_per_cycle=0.258588/s bytes_per_second=369.912M/s items_per_second=17.8585M/s __llvm_libc::bcmp,memcmp Google D BM_Bcmp/3/0 92.4 ns 55.7 ns 12555264 bytes_per_cycle=0.206835/s bytes_per_second=295.88M/s items_per_second=17.943M/s __llvm_libc::bcmp,memcmp Google L BM_Bcmp/4/0 79.3 ns 46.8 ns 14288896 bytes_per_cycle=0.125872/s bytes_per_second=180.061M/s items_per_second=21.3611M/s __llvm_libc::bcmp,memcmp Google M BM_Bcmp/5/0 98.0 ns 57.9 ns 12232704 bytes_per_cycle=0.268815/s bytes_per_second=384.543M/s items_per_second=17.2711M/s __llvm_libc::bcmp,memcmp Google Q BM_Bcmp/6/0 132 ns 65.5 ns 10474496 bytes_per_cycle=0.417246/s bytes_per_second=596.875M/s items_per_second=15.2673M/s __llvm_libc::bcmp,memcmp Google S BM_Bcmp/7/0 101 ns 60.9 ns 11505664 bytes_per_cycle=0.253733/s bytes_per_second=362.968M/s items_per_second=16.4202M/s __llvm_libc::bcmp,memcmp Google U BM_Bcmp/8/0 72.5 ns 50.2 ns 14082048 bytes_per_cycle=0.183262/s bytes_per_second=262.158M/s items_per_second=19.9271M/s __llvm_libc::bcmp,memcmp Google W BM_Bcmp/9/0 852 ns 803 ns 854016 bytes_per_cycle=1.85028/s bytes_per_second=2.58481G/s items_per_second=1.24597M/s __llvm_libc::bcmp,uniform 384 to 4096 ``` For comparison with glibc ``` BM_Bcmp/0/0 106 ns 52.6 ns 12906496 bytes_per_cycle=0.142072/s bytes_per_second=203.235M/s items_per_second=19.0271M/s glibc::bcmp,memcmp Google A BM_Bcmp/1/0 132 ns 77.1 ns 8905728 bytes_per_cycle=0.365072/s bytes_per_second=522.239M/s items_per_second=12.9782M/s glibc::bcmp,memcmp Google B BM_Bcmp/2/0 122 ns 62.3 ns 10909696 bytes_per_cycle=0.222667/s bytes_per_second=318.527M/s items_per_second=16.0563M/s glibc::bcmp,memcmp Google D BM_Bcmp/3/0 99.5 ns 64.2 ns 11074560 bytes_per_cycle=0.185126/s bytes_per_second=264.825M/s items_per_second=15.5674M/s glibc::bcmp,memcmp Google L BM_Bcmp/4/0 86.6 ns 50.2 ns 13488128 bytes_per_cycle=0.117941/s bytes_per_second=168.717M/s items_per_second=19.9053M/s glibc::bcmp,memcmp Google M BM_Bcmp/5/0 106 ns 61.4 ns 11344896 bytes_per_cycle=0.248968/s bytes_per_second=356.151M/s items_per_second=16.284M/s glibc::bcmp,memcmp Google Q BM_Bcmp/6/0 145 ns 71.9 ns 10046464 bytes_per_cycle=0.389814/s bytes_per_second=557.633M/s items_per_second=13.9019M/s glibc::bcmp,memcmp Google S BM_Bcmp/7/0 119 ns 65.6 ns 10718208 bytes_per_cycle=0.243756/s bytes_per_second=348.696M/s items_per_second=15.2329M/s glibc::bcmp,memcmp Google U BM_Bcmp/8/0 86.4 ns 54.5 ns 13250560 bytes_per_cycle=0.154831/s bytes_per_second=221.488M/s items_per_second=18.3532M/s glibc::bcmp,memcmp Google W BM_Bcmp/9/0 1090 ns 604 ns 1186816 bytes_per_cycle=2.53848/s bytes_per_second=3.54622G/s items_per_second=1.65598M/s glibc::bcmp,uniform 384 to 4096 ``` Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D150567
-
Alexey Lapshin authored
This patch adds handling of DW_OP_addrx and DW_OP_constx expression operands. In --update case these operands are preserved as is. Otherwise they are converted into the DW_OP_addr and DW_OP_const[*]u correspondingly. Differential Revision: https://reviews.llvm.org/D147066
-
Sergei Barannikov authored
Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D150680
-
Sergei Barannikov authored
Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D150682
-
Peiming Liu authored
Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D150477
-
Peter Klausler authored
Apply the default PUBLIC/PRIVATE accessibility of a module to its symbols a second time after it is known that all symbols, including implicitly typed names from NAMELIST groups and specification expressions in module subprograms, have been created in its scope. Fixes https://github.com/llvm/llvm-project/issues/62598. Differential Revision: https://reviews.llvm.org/D150307
-
Kazu Hirata authored
This patch migrates uses of StringRef::{starts,ends}with_insensitive to StringRef::{starts,ends}_with_insensitive so that we can use names similar to those used in std::string_view. Note that the llvm/ directory has migrated in commit 6c3ea866. I'll post a separate patch to deprecate StringRef::{starts,ends}with_insensitive. Differential Revision: https://reviews.llvm.org/D150506 -
Krzysztof Parzyszek authored
Instead of checking arch version, check HVX version when dealing with HVX instructions.
-
Kadir Cetinkaya authored
-
Peter Klausler authored
After tokenizing an identifier, don't allow the next token to be a Hollerith literal. Fixes https://github.com/llvm/llvm-project/issues/58732. Differential Revision: https://reviews.llvm.org/D150406
-
Andrew Gozillon authored
[Clang][Flang][OpenMP] Add loadOffloadInfoMetadata and createOffloadEntriesAndInfoMetadata into OMPIRBuilder's finalize and initialize This allows the generation of OpenMP offload metadata for the OpenMP dialect when lowering to LLVM-IR and moves some of the shared logic between the OpenMP Dialect and Clang into the IRBuilder. Reviewers: jsjodin, jdoerfert, kiranchandramohan Differential Revision: https://reviews.llvm.org/D148370
-
Slava Zakharin authored
The two constants should be equal only if their derived types are the same. This fixes regression caused by D150380. Differential Revision: https://reviews.llvm.org/D150634
-
Viktoriia Bakalova authored
-
Craig Topper authored
Previously we added the SP operands when an immediate operand was added to certain opcodes. This patch moves it to a post processing step using the information in MCInstrDesc. This avoids an explicit opcode list in RISCVDisassembler.cpp. In considered using a custom DecoderMethod, but the bit swizzling we need to do for the immediates on these instructions made that unattractive. Reviewed By: asb Differential Revision: https://reviews.llvm.org/D149931
-
Goran Flegar authored
-
Jonas Devlieghere authored
Whether assertions are enabled or not is orthogonal to the build type which could lead to surprising behavior for lldbassert. Previously, when doing a debug build with assertions disabled, lldbassert would become a NOOP, rather than printing an error like it does in a release build. By definining lldbassert in terms of NDEBUG, it behaves like a regular assert when assertions are enabled, and like a soft assert. Differential revision: https://reviews.llvm.org/D150639
-
Fangrui Song authored
If a symbol needs both JUMP_SLOT and GLOB_DAT relocations, there is a minor linker optimization to keep just GLOB_DAT. This optimization is only implemented by GNU ld's x86 port and mold. https://maskray.me/blog/2021-08-29-all-about-global-offset-table#combining-.got-and-.got.plt With the optimizing, the PLT entry is placed in .plt.got and the associated GOTPLT entry is placed in .got (ld.bfd -z now) or .got.plt (ld.bfd -z lazy). The relocation is in .rel[a].dyn. This patch synthesizes `symbol@plt` labels for these .plt.got entries. Example: ``` cat > a.s <<e .globl _start; _start: mov combined0@gotpcrel(%rip), %rax; mov combined1@gotpcrel(%rip), %rax call combined0@plt; call combined1@plt call foo0@plt; call foo1@plt e cat > b.s <<e .globl foo0, foo1, combined0, combined1 foo0: foo1: combined0: combined1: e gcc -fuse-ld=bfd -shared b.s -o b.so gcc -fuse-ld=bfd -pie -nostdlib a.s b.so -o a ``` ``` Disassembly of section .plt: 0000000000001000 <.plt>: 1000: ff 35 ea 1f 00 00 pushq 0x1fea(%rip) # 0x2ff0 <_GLOBAL_OFFSET_TABLE_+0x8> 1006: ff 25 ec 1f 00 00 jmpq *0x1fec(%rip) # 0x2ff8 <_GLOBAL_OFFSET_TABLE_+0x10> 100c: 0f 1f 40 00 nopl (%rax) 0000000000001010 <foo1@plt>: 1010: ff 25 ea 1f 00 00 jmpq *0x1fea(%rip) # 0x3000 <_GLOBAL_OFFSET_TABLE_+0x18> 1016: 68 00 00 00 00 pushq $0x0 101b: e9 e0 ff ff ff jmp 0x1000 <.plt> 0000000000001020 <foo0@plt>: 1020: ff 25 e2 1f 00 00 jmpq *0x1fe2(%rip) # 0x3008 <_GLOBAL_OFFSET_TABLE_+0x20> 1026: 68 01 00 00 00 pushq $0x1 102b: e9 d0 ff ff ff jmp 0x1000 <.plt> Disassembly of section .plt.got: 0000000000001030 <combined0@plt>: 1030: ff 25 a2 1f 00 00 jmpq *0x1fa2(%rip) # 0x2fd8 <foo1+0x2fd8> 1036: 66 90 nop 0000000000001038 <combined1@plt>: 1038: ff 25 a2 1f 00 00 jmpq *0x1fa2(%rip) # 0x2fe0 <foo1+0x2fe0> 103e: 66 90 nop ``` For x86-32, with -z now, if we remove `foo0` and `foo1`, the absence of regular PLT will cause GNU ld to omit .got.plt, and our code cannot synthesize @plt labels. This is an extreme corner case that almost never happens in practice (to trigger the case, ensure every PLT symbol has been taken address). To fix it, we can get the `_GLOBAL_OFFSET_TABLE_` symbol value, but the complexity is not worth it. Close https://github.com/llvm/llvm-project/issues/62537 Reviewed By: bd1976llvm Differential Revision: https://reviews.llvm.org/D149817
-
Nikita Popov authored
These need to use the IRBuilder provided by InstCombine for proper worklist management.
-
Viktoriia Bakalova authored
Differential Revision: https://reviews.llvm.org/D150668
-
Sergei Barannikov authored
This is a follow-up to D150608.
-
Mikhail R. Gadelha authored
This reverts commit b6639930. This caused a regression on aarch64: https://lab.llvm.org/buildbot#builders/138/builds/43983
-
- May 16, 2023
-
-
Mikhail R. Gadelha authored
This patch is similar to 86fe88c8 and adds several explicit constructor calls (bool(...), uint64_t(...), uint8_t(...)) that are needed when we use UInt<T> (in my case UInt<128> in riscv32). This patch also adds two operators to UInt<T>: * operator/= required by printf_core/float_hex_converter.h:148 * operator-- required by FPUtil/ManipulationFunctions.h:166 Reviewed By: sivachandra, lntue Differential Revision: https://reviews.llvm.org/D149594
-
Andrzej Warzynski authored
Split Linalg vectorization tests from "vectorization.mlir" across more specialised test files: * vectorize-tensor-extract.mlir - tests for tensor.extract with no masking, * vectorize-tensor-extract-masked.mlir - tests for tensor.extract with masking, * vectorization-masked.mlir - all other tests that use masking, * vectorisation.mlir - the remaining tests. Differential Revision: https://reviews.llvm.org/D149843 -
Phoebe Wang authored
Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D150645
-
Valentin Clement authored
Just add the trait as acc.yield is a return like op. Reviewed By: razvanlupusoru, jeanPerier Differential Revision: https://reviews.llvm.org/D150617
-
Juan Manuel MARTINEZ CAAMAÑO authored
[AMDGPU][InferAddressSpaces] Only rewrite address-spaces that can be trivially casted to flat for llvm.amdgcn.flat.atomic.{fadd,fmax,fmin} The intrinsic @llvm.amdgcn.flat.atomic.{fadd,fmax,fmin} can only be selected for flat address spaces (constant, flat and global). This patch restricts the cases over which GCNTTIImpl::rewriteIntrinsicWithAddressSpace rewrites the intrinsic. Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D149938 -
Matt Arsenault authored
Make it clearer minnum(+0, +0) cannot return -0. Also remove a note about the result always being quiet which is directly contradicted by the following paragraph.
-
Matt Arsenault authored
Handle addrspacecast when looking at uses.
-
Matt Arsenault authored
AllUsesOfValueWillTrapIfNull could handle addrspacecast, but currently doesn't.
-
Timm Bäder authored
This reverts commit e2917311. This caused some problems with lldb testing the diagnostic output: https://lab.llvm.org/buildbot/#/builders/68/builds/52754
-
Timm Bäder authored
Breakage: https://lab.llvm.org/buildbot/#/builders/92/builds/44222
-
Timm Bäder authored
Show line numbers to the left of diagnostic code snippets and increase the numbers of lines shown from 1 to 16. Differential Revision: https://reviews.llvm.org/D147875
-
Phoebe Wang authored
MS link accepts *.obj with ehcont bit set only. LLD should match this behavoir too. Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D150508
-
Alexey Lapshin authored
This patch adds support for DWARFv5 .debug_line_str table. It replaces code generating line table. Instead of copying original table and patching certain places this patch implements full line table generation. Differential Revision: https://reviews.llvm.org/D150554
-
Bjorn Pettersson authored
Make sure the code comments in processMemSetMemCpyDependence match with the actual transform. They indicated that the memset being rewritten was sunk to after a memcpy, while it actually is inserted just before the memcpy. Also make sure we use the debug location of the original memset when creating the new simplified memset. In the past we've been using the debug location for the memcpy which could be a bit confusing. Differential Revision: https://reviews.llvm.org/D135574
-
Jay Foad authored
RegScavenger::backward is preferred because it does not rely on accurate kill flags. Differential Revision: https://reviews.llvm.org/D150571
-
Bjorn Pettersson authored
This reverts commit 5cafecf9. Buildbots are not happy with the patch. Lots of crashes and assertion failures such as llvm::LegalizeRuleSet &llvm::LegalizerInfo::getActionDefinitionsBuilder( std::initializer_list<unsigned int>): Assertion `Opcodes.size() >= 2 && "Initializer list must have at least two opcodes"' failed.
-