- Dec 06, 2022
-
-
Nico Weber authored
`${X86_64}` expands to `x86_64;x86_64h` on macOS, so get_test_cc_for_arch(${X86_64} METADATA_TEST_TARGET_CC METADATA_TEST_TARGET_CFLAGS) calls the macro get_test_cc_for_arch() with the four arguments `x86_64`, `x86_64h`, `METADATA_TEST_TARGET_CC`, and `METADATA_TEST_TARGET_CFLAGS`. This writes the compiler into a variable called x86_64h, the cflags into a variable called METADATA_TEST_TARGET_CC, and silently ignores the fourth parameter. As a fix, just pass `x86_64` instead of `${X86_64}`. Hopefully that won't break anything on other platforms. -
Roman Lebedev authored
[llvm-exegesis] parallel snippet generator: avoid Read-After-Write pitfail for instrs w/ tied variables As it is being discussed in https://github.com/llvm/llvm-project/issues/59325, at least for the instructions with tied variables, when trying to parallelize the instructions, register selection is rather bad, and may either use a register which we have used for def, or vice versa. That introduces serialization, and leads to overly pessimistic inverse throughput measurement. The new implementation avoids that, New result: ``` $ ninja llvm-exegesis && ./bin/llvm-exegesis --mode=inverse_throughput --opcode-name=VFMADD132PDr --max-configs-per-opcode=9182 ninja: no work to do. Check generated assembly with: /usr/bin/objdump -d /tmp/snippet-4af034.o --- mode: inverse_throughput key: instructions: - 'VFMADD132PDr XMM3 XMM3 XMM4 XMM8' - 'VFMADD132PDr XMM5 XMM5 XMM14 XMM7' - 'VFMADD132PDr XMM10 XMM10 XMM11 XMM15' - 'VFMADD132PDr XMM13 XMM13 XMM15 XMM15' - 'VFMADD132PDr XMM12 XMM12 XMM11 XMM1' - 'VFMADD132PDr XMM0 XMM0 XMM6 XMM9' - 'VFMADD132PDr XMM2 XMM2 XMM15 XMM11' config: '' register_initial_values: - 'XMM3=0x0' - 'XMM4=0x0' - 'XMM8=0x0' - 'MXCSR=0x0' - 'XMM5=0x0' - 'XMM14=0x0' - 'XMM7=0x0' - 'XMM10=0x0' - 'XMM11=0x0' - 'XMM15=0x0' - 'XMM13=0x0' - 'XMM12=0x0' - 'XMM1=0x0' - 'XMM0=0x0' - 'XMM6=0x0' - 'XMM9=0x0' - 'XMM2=0x0' cpu_name: znver3 llvm_triple: x86_64-unknown-linux-gnu num_repetitions: 10000 measurements: - { key: inverse_throughput, value: 0.6403, per_snippet_value: 4.4821 } error: '' info: instruction has tied variables, avoiding Read-After-Write issue, picking random def and use registers not aliasing each other, randomizing registers for uses assembled_snippet: 4883EC10C7042400000000C744240400000000C744240800000000C744240C00000000C5FA6F1C244883C4104883EC10C7042400000000C744240400000000C744240800000000C744240C00000000C5FA6F24244883C4104883EC10C7042400000000C744240400000000C744240800000000C744240C00000000C57A6F04244883C4104883EC04C70424801F0000C5F8AE14244883C4044883EC10C7042400000000C744240400000000C744240800000000C744240C00000000C5FA6F2C244883C4104883EC10C7042400000000C744240400000000C744240800000000C744240C00000000C57A6F34244883C4104883EC10C7042400000000C744240400000000C744240800000000C744240C00000000C5FA6F3C244883C4104883EC10C7042400000000C744240400000000C744240800000000C744240C00000000C57A6F14244883C4104883EC10C7042400000000C744240400000000C744240800000000C744240C00000000C57A6F1C244883C4104883EC10C7042400000000C744240400000000C744240800000000C744240C00000000C57A6F3C244883C4104883EC10C7042400000000C744240400000000C744240800000000C744240C00000000C57A6F2C244883C4104883EC10C7042400000000C744240400000000C744240800000000C744240C00000000C57A6F24244883C4104883EC10C7042400000000C744240400000000C744240800000000C744240C00000000C5FA6F0C244883C4104883EC10C7042400000000C744240400000000C744240800000000C744240C00000000C5FA6F04244883C4104883EC10C7042400000000C744240400000000C744240800000000C744240C00000000C5FA6F34244883C4104883EC10C7042400000000C744240400000000C744240800000000C744240C00000000C57A6F0C244883C4104883EC10C7042400000000C744240400000000C744240800000000C744240C00000000C5FA6F14244883C410C4C2D998D8C4E28998EFC442A198D7C4428198EFC462A198E1C4C2C998C1C4C28198D3C4C2D998D8C4E28998EFC442A198D7C4428198EFC462A198E1C4C2C998C1C4C28198D3C4C2D998D8C4E28998EFC442A198D7C4428198EFC462A198E1C4C2C998C1C4C28198D3C4C2D998D8C4E28998EFC442A198D7C4428198EFC462A198E1C4C2C998C1C4C28198D3C3 ... Check generated assembly with: /usr/bin/objdump -d /tmp/snippet-f05c2f.o --- mode: inverse_throughput key: instructions: - 'VFMADD132PDr XMM15 XMM15 XMM11 XMM2' - 'VFMADD132PDr XMM5 XMM5 XMM11 XMM2' - 'VFMADD132PDr XMM14 XMM14 XMM11 XMM2' - 'VFMADD132PDr XMM4 XMM4 XMM11 XMM2' - 'VFMADD132PDr XMM8 XMM8 XMM11 XMM2' - 'VFMADD132PDr XMM3 XMM3 XMM11 XMM2' - 'VFMADD132PDr XMM10 XMM10 XMM11 XMM2' - 'VFMADD132PDr XMM7 XMM7 XMM11 XMM2' - 'VFMADD132PDr XMM13 XMM13 XMM11 XMM2' - 'VFMADD132PDr XMM9 XMM9 XMM11 XMM2' - 'VFMADD132PDr XMM1 XMM1 XMM11 XMM2' - 'VFMADD132PDr XMM6 XMM6 XMM11 XMM2' - 'VFMADD132PDr XMM0 XMM0 XMM11 XMM2' - 'VFMADD132PDr XMM12 XMM12 XMM11 XMM2' config: '' register_initial_values: - 'XMM15=0x0' - 'XMM11=0x0' - 'XMM2=0x0' - 'MXCSR=0x0' - 'XMM5=0x0' - 'XMM14=0x0' - 'XMM4=0x0' - 'XMM8=0x0' - 'XMM3=0x0' - 'XMM10=0x0' - 'XMM7=0x0' - 'XMM13=0x0' - 'XMM9=0x0' - 'XMM1=0x0' - 'XMM6=0x0' - 'XMM0=0x0' - 'XMM12=0x0' cpu_name: znver3 llvm_triple: x86_64-unknown-linux-gnu num_repetitions: 10000 measurements: - { key: inverse_throughput, value: 0.5312, per_snippet_value: 7.4368 } error: '' info: instruction has tied variables, avoiding Read-After-Write issue, picking random def and use registers not aliasing each other, one unique register for each use position assembled_snippet: 4883EC10C7042400000000C744240400000000C744240800000000C744240C00000000C57A6F3C244883C4104883EC10C7042400000000C744240400000000C744240800000000C744240C00000000C57A6F1C244883C4104883EC10C7042400000000C744240400000000C744240800000000C744240C00000000C5FA6F14244883C4104883EC04C70424801F0000C5F8AE14244883C4044883EC10C7042400000000C744240400000000C744240800000000C744240C00000000C5FA6F2C244883C4104883EC10C7042400000000C744240400000000C744240800000000C744240C00000000C57A6F34244883C4104883EC10C7042400000000C744240400000000C744240800000000C744240C00000000C5FA6F24244883C4104883EC10C7042400000000C744240400000000C744240800000000C744240C00000000C57A6F04244883C4104883EC10C7042400000000C744240400000000C744240800000000C744240C00000000C5FA6F1C244883C4104883EC10C7042400000000C744240400000000C744240800000000C744240C00000000C57A6F14244883C4104883EC10C7042400000000C744240400000000C744240800000000C744240C00000000C5FA6F3C244883C4104883EC10C7042400000000C744240400000000C744240800000000C744240C00000000C57A6F2C244883C4104883EC10C7042400000000C744240400000000C744240800000000C744240C00000000C57A6F0C244883C4104883EC10C7042400000000C744240400000000C744240800000000C744240C00000000C5FA6F0C244883C4104883EC10C7042400000000C744240400000000C744240800000000C744240C00000000C5FA6F34244883C4104883EC10C7042400000000C744240400000000C744240800000000C744240C00000000C5FA6F04244883C4104883EC10C7042400000000C744240400000000C744240800000000C744240C00000000C57A6F24244883C410C462A198FAC4E2A198EAC462A198F2C4E2A198E2C462A198C2C4E2A198DAC462A198D2C4E2A198FAC462A198EAC462A198CAC4E2A198CAC4E2A198F2C4E2A198C2C462A198E2C462A198FAC4E2A198EAC462A198F2C4E2A198E2C462A198C2C4E2A198DAC462A198D2C4E2A198FAC462A198EAC462A198CAC4E2A198CAC4E2A198F2C4E2A198C2C462A198E2C462A198FAC4E2A198EAC462A198F2C4E2A198E2C462A198C2C4E2A198DAC462A198D2C4E2A198FAC462A198EAC462A198CAC4E2A198CAC4E2A198F2C4E2A198C2C462A198E2C462A198FAC4E2A198EAC462A198F2C4E2A198E2C462A198C2C4E2A198DAC462A198D2C4E2A198FAC462A198EAC462A198CAC4E2A198CAC4E2A198F2C4E2A198C2C462A198E2C3 ... Check generated assembly with: /usr/bin/objdump -d /tmp/snippet-c32060.o --- mode: inverse_throughput key: instructions: - 'VFMADD132PDr XMM10 XMM10 XMM6 XMM6' - 'VFMADD132PDr XMM8 XMM8 XMM6 XMM6' - 'VFMADD132PDr XMM12 XMM12 XMM6 XMM6' - 'VFMADD132PDr XMM9 XMM9 XMM6 XMM6' - 'VFMADD132PDr XMM7 XMM7 XMM6 XMM6' - 'VFMADD132PDr XMM1 XMM1 XMM6 XMM6' - 'VFMADD132PDr XMM0 XMM0 XMM6 XMM6' - 'VFMADD132PDr XMM5 XMM5 XMM6 XMM6' - 'VFMADD132PDr XMM11 XMM11 XMM6 XMM6' - 'VFMADD132PDr XMM2 XMM2 XMM6 XMM6' - 'VFMADD132PDr XMM15 XMM15 XMM6 XMM6' - 'VFMADD132PDr XMM3 XMM3 XMM6 XMM6' - 'VFMADD132PDr XMM14 XMM14 XMM6 XMM6' - 'VFMADD132PDr XMM4 XMM4 XMM6 XMM6' - 'VFMADD132PDr XMM13 XMM13 XMM6 XMM6' config: '' register_initial_values: - 'XMM10=0x0' - 'XMM6=0x0' - 'MXCSR=0x0' - 'XMM8=0x0' - 'XMM12=0x0' - 'XMM9=0x0' - 'XMM7=0x0' - 'XMM1=0x0' - 'XMM0=0x0' - 'XMM5=0x0' - 'XMM11=0x0' - 'XMM2=0x0' - 'XMM15=0x0' - 'XMM3=0x0' - 'XMM14=0x0' - 'XMM4=0x0' - 'XMM13=0x0' cpu_name: znver3 llvm_triple: x86_64-unknown-linux-gnu num_repetitions: 10000 measurements: - { key: inverse_throughput, value: 0.5311, per_snippet_value: 7.9665 } error: '' info: instruction has tied variables, avoiding Read-After-Write issue, picking random def and use registers not aliasing each other, reusing the same register for all uses assembled_snippet: 4883EC10C7042400000000C744240400000000C744240800000000C744240C00000000C57A6F14244883C4104883EC10C7042400000000C744240400000000C744240800000000C744240C00000000C5FA6F34244883C4104883EC04C70424801F0000C5F8AE14244883C4044883EC10C7042400000000C744240400000000C744240800000000C744240C00000000C57A6F04244883C4104883EC10C7042400000000C744240400000000C744240800000000C744240C00000000C57A6F24244883C4104883EC10C7042400000000C744240400000000C744240800000000C744240C00000000C57A6F0C244883C4104883EC10C7042400000000C744240400000000C744240800000000C744240C00000000C5FA6F3C244883C4104883EC10C7042400000000C744240400000000C744240800000000C744240C00000000C5FA6F0C244883C4104883EC10C7042400000000C744240400000000C744240800000000C744240C00000000C5FA6F04244883C4104883EC10C7042400000000C744240400000000C744240800000000C744240C00000000C5FA6F2C244883C4104883EC10C7042400000000C744240400000000C744240800000000C744240C00000000C57A6F1C244883C4104883EC10C7042400000000C744240400000000C744240800000000C744240C00000000C5FA6F14244883C4104883EC10C7042400000000C744240400000000C744240800000000C744240C00000000C57A6F3C244883C4104883EC10C7042400000000C744240400000000C744240800000000C744240C00000000C5FA6F1C244883C4104883EC10C7042400000000C744240400000000C744240800000000C744240C00000000C57A6F34244883C4104883EC10C7042400000000C744240400000000C744240800000000C744240C00000000C5FA6F24244883C4104883EC10C7042400000000C744240400000000C744240800000000C744240C00000000C57A6F2C244883C410C462C998D6C462C998C6C462C998E6C462C998CEC4E2C998FEC4E2C998CEC4E2C998C6C4E2C998EEC462C998DEC4E2C998D6C462C998FEC4E2C998DEC462C998F6C4E2C998E6C462C998EEC462C998D6C462C998C6C462C998E6C462C998CEC4E2C998FEC4E2C998CEC4E2C998C6C4E2C998EEC462C998DEC4E2C998D6C462C998FEC4E2C998DEC462C998F6C4E2C998E6C462C998EEC462C998D6C462C998C6C462C998E6C462C998CEC4E2C998FEC4E2C998CEC4E2C998C6C4E2C998EEC462C998DEC4E2C998D6C462C998FEC4E2C998DEC462C998F6C4E2C998E6C462C998EEC462C998D6C462C998C6C462C998E6C462C998CEC4E2C998FEC4E2C998CEC4E2C998C6C4E2C998EEC462C998DEC4E2C998D6C462C998FEC4E2C998DEC462C998F6C4E2C998E6C462C998EEC3 ... ``` Reviewed By: courbet Differential Revision: https://reviews.llvm.org/D139283
-
Paul Robinson authored
Part of the project to eliminate special handling for triples in lit expressions.
-
Jay Foad authored
-
Michael Maitland authored
It is likley that subtargets act differently for vector fixed-point arithmetic instructions based on the LMUL. This patch creates seperate SchedRead, SchedWrite, WriteRes, ReadAdvance for each relevant LMUL. Differential Revision: https://reviews.llvm.org/D137427
-
Jonathan Peyton authored
This patch fixes issues seen once https://reviews.llvm.org/D135402 is applied. The exports_so.txt file attempts to export functions which may not exist depending on which features are enabled/disabled in the OpenMP runtime library. There are not many of these so exporting dummy symbols is feasible. * Export dummy __kmp_reset_stats() function when stats is disabled. * Export dummy debugging data when USE_DEBUGGER is disabled * Export dummy __kmp_itt_[fini|init]_ittlib() functions when ITT Notify is disabled * Export dummy __kmp_reap_monitor() function when KMP_USE_MONITOR is disabled * Remove __kmp_launch_monitor and __kmp_launch_worker from being exported. They have been static symbols since library inception. Fixes: https://github.com/llvm/llvm-project/issues/58858 Differential Revision: https://reviews.llvm.org/D138049
-
Emmmer authored
Reviewed By: DavidSpickett Differential Revision: https://reviews.llvm.org/D139390
-
Kadir Cetinkaya authored
Depens on D135953 Differential Revision: https://reviews.llvm.org/D138200
-
Valentin Clement authored
In some cases, the base type is already a fir.box type. This patch updates the code to set the result box type to fir.box<T>, where T is the type of the allocated temp. This was reported in https://github.com/llvm/llvm-project/issues/59342 Reviewed By: jeanPerier, tblah Differential Revision: https://reviews.llvm.org/D139401
-
Matt Arsenault authored
-
LLVM GN Syncbot authored
-
LLVM GN Syncbot authored
-
Nico Weber authored
-
Nico Weber authored
This reverts commit 8ae18303. Breaks buildling lldb, see https://reviews.llvm.org/D139274#3974171
-
Nico Weber authored
This reverts commit e50a60d7. Prerequisite for reverting 8ae18303.
-
Nico Weber authored
This reverts commit 7bb0cbfc. Doesn't build at least on macOS, see https://reviews.llvm.org/D139335#3974169
-
Benjamin Kramer authored
llvm/tools/llvm-objdump/llvm-objdump.cpp:128:38: error: constexpr variable 'ObjdumpInfoTable' must be initialized by a constant expression static constexpr opt::OptTable::Info ObjdumpInfoTable[] = { ^ ~ ObjdumpOpts.inc:30:45: note: non-constexpr function 'substr' cannot be used in a constant expression OPTION(prefix_0, llvm::StringRef("<input>").substr(0), INPUT, Input, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) ^ -
Nikolas Klauser authored
Fixes #58392 Reviewed By: ldionne, #libc Spies: alexfh, hans, joanahalili, dblaikie, libcxx-commits Differential Revision: https://reviews.llvm.org/D138601
-
Matt Arsenault authored
-
Matt Arsenault authored
-
serge-sans-paille authored
This avoids implicit conversion to StringRef at several points, which in turns avoid redundant calls to strlen. As a side effect, this greatly simplifies the implementation of StrCmpOptionNameIgnoreCase. It also eventually gives a consistent, humble speedup in compilation time. https://llvm-compile-time-tracker.com/compare.php?from=5f5b942823474e98e43a27d515a87ce140396c53&to=60e13b778119fc32d50dc38ff1a564a87146e9c6&stat=instructions:u Differential Revision: https://reviews.llvm.org/D139274
-
Matt Arsenault authored
-
Haojian Wu authored
-
Jean Perier authored
For now at least, the plan is to keep hlfir.expr usage limited as sub-expression operand, assignment rhs, and a few other contexts ( e.g. Associate statements). The rest of lowering (statements lowering in the bridge) will still expect to get and manipulate characters and arrays in memory. That means that hlfir.expr must be converted to variable in converter.genExprAddr/converter.genExprBox. This is done using an hlfir.associate, and generating the related hlfir.end_associate in the statement context. hlfir::getFirBase of is updated to avoid bringing in the HLFIR fir.boxchar/fir.box into FIR when the entity was created with hlfir::AssociateOp. Differential Revision: https://reviews.llvm.org/D139328
-
bipmis authored
-
Manuel Brito authored
Differential Revision: https://reviews.llvm.org/D138755
-
Adrian Kuegel authored
Converting integer literal to bool, use bool literal instead.
-
Archibald Elliott authored
This only contains the SelectionDAG implementation. GlobalISel to follow. The broad approach is: - Introduce new builtins for 128-bit wide instructions. - Lower these to @llvm.read_register.i128/@llvm.write_register.i128 - Introduce target-specific ISD nodes which have legal operands (two i64s rather than an i128). These are named AArch64::{MRRS, MSRR} to match the instructions they are for. These are a little complex as they need to match the "shape" of what they're replacing or the legaliser complains. - Select these using the existing tryReadRegister/tryWriteRegister to share the MDString parsing code, and introduce additional code to ensure these are selected into the right MRRS/MSRR instructions. What makes this hard is ensuring that the two i64s end up in an XSeqPair register pair, because SelectionDAG doesn't care that much about register classes if it can avoid doing so. The main change to existing code is the reorganisation of tryReadRegister and tryWriteRegister to try to keep the string parsing code separate from the instruction creating code. This also includes the changes to clang to define and use the ACLE feature macro named `__ARM_FEATURE_SYSREG128`. Contributors: Sam Elliott Lucas Prates Differential Revision: https://reviews.llvm.org/D139086 -
Ties Stuij authored
Using SelectionDag, lower umin, umax, smin, smax intrinsics to corresponding UMIN, UMAX, SMIN, SMAX instructions when feat CSSC is available. See specs for corresponding immediate and register versions in: https://developer.arm.com/documentation/ddi0602/2022-09/Base-Instructions/ Reviewed By: lenary Differential Revision: https://reviews.llvm.org/D138813
-
Nikita Popov authored
This removes our "temporary" hack to assume that readnone/readonly intrinsics are also willreturn. An explicit willreturn annotation, usually via default intrinsic attributes, is now required. Differential Revision: https://reviews.llvm.org/D137630
-
Ties Stuij authored
When feature CSSC is available, the SelectionDag abs intrinsic should map to the new scalar ABS instruction. Additionally, the SIMDTwoScalarD tablegen defm includes a pattern match for scalar i64, which we don't want to use when CSSC is enabled. spec: https://developer.arm.com/documentation/ddi0602/2022-09/Base-Instructions/ABS--Absolute-value- Reviewed By: lenary Differential Revision: https://reviews.llvm.org/D138812
-
David Spickett authored
d16 was removed in https://reviews.llvm.org/D60691. Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D139304
-
David Spickett authored
The test added in https://reviews.llvm.org/D137368 has been failing on our 32 bit arm bots: https://lab.llvm.org/buildbot/#/builders/178/builds/3460 You get this for the strings: <<dead>> 0x883255000000003 [ 10] literal string: Hello, it's me Instead of the expected: <<dead>> 0x0000000F [ 3] literal string: Hello, it's me This is because unlike symbols whose size is a uint64_t, strings use a StringRef whose size is size_t. size_t changes size between 32 and 64 bit platforms. This fixes the test by using %z to print the size of the strings, this works for 32 and 64 bit.
-
Ties Stuij authored
When feature CSSC is available we should use instruction CTZ in SelectionDag where applicable: - CTTZ intrinsics are lowered to using the gpr CTZ instruction - BITREVERSE -> CTLZ instruction pattern gets replaced by CTZ spec: https://developer.arm.com/documentation/ddi0602/2022-09/Base-Instructions/CTZ--Count-Trailing-Zeros- Reviewed By: lenary Differential Revision: https://reviews.llvm.org/D138811
-
Kristina Bessonova authored
The main motivation for this change is to avoid ambiguity because mapping symbol names may not be unique across a binary and do not allow uniquely identifying target address. So that mapping symbols used as branch target labels make llvm-objdump output less readable. Another point is that mapping symbols sometimes appear in non-allocatable sections, like debug info sections which make objdump output even more confusing. For example, a small AArch64 executable may contain plenty of `$d[.*]` symbols and none of them would be useful as a label for resolving a branch or a memory operand target address: ``` 0000000000000254 l .note.ABI-tag 0000000000000000 $d 00000000000008d4 l .eh_frame 0000000000000000 $d 0000000000000868 l .rodata 0000000000000000 $d 0000000000011028 l .data 0000000000000000 $d 0000000000010db8 l .fini_array 0000000000000000 $d 0000000000010db0 l .init_array 0000000000000000 $d 00000000000008e8 l .eh_frame 0000000000000000 $d 0000000000011034 l .bss 0000000000000000 $d ``` Note that GNU objdump doesn't use mapping symbols as branch target labels for all targets that support such symbols (ARM, AArch64, CSKY). Differential Revision: https://reviews.llvm.org/D139131
-
Javier Setoain authored
The only way to do this with the current hoisting strategy is by lowering Affine to Scf first, but that prevents further passes on Affine. Differential Revision: https://reviews.llvm.org/D137600
-
Max Kazantsev authored
This is a follow-up from discussion in D138412. Sometimes we want to evaluate the cost of expansion of several SCEVs together with same budget. For example, if one of them is a bit above cheap limit, and the second one is free, then we still want to expand. Checking each of them with "cheap" limit is a bit more pessimistic. Differential Revision: https://reviews.llvm.org/D138475 Reviewed By: lebedev.ri
-
HanSheng Zhang authored
Close https://github.com/llvm/llvm-project/issues/59244 Reviewed By: t.p.northover Differential Revision: https://reviews.llvm.org/D138889
-
HanSheng Zhang authored
This should allow downstream vendors to install multiple LLVM distributions in parallel. Should we also patch the default values to allow multiple upstream llvm distribution? Reviewed By: thieta Differential Revision: https://reviews.llvm.org/D138632
-
Juan Manuel MARTINEZ CAAMAÑO authored
-