- Jun 16, 2023
-
-
Benjamin Kramer authored
-
Nikita Popov authored
With opaque pointers, it should no longer be necessary to protect against recursion when converting Clang types to LLVM types, as recursion can only be introduced via pointer types. Differential Revision: https://reviews.llvm.org/D152999
-
Jaroslav Sevcik authored
-
Simon Pilgrim authored
-
Nikita Popov authored
s390x looks through pointers when determining the "externally visible vector ABI". For that reason, the test shows different behavior just on that platform. Adjust the test in the reverse direction of what I originall did: Make sure that the type behind the pointer is always queried, by dereferencing the pointer.
-
Jay Foad authored
-
Takuya Shimizu authored
When the diagnosed function/variable is a template specialization, the source range covers the specialization arguments. e.g. ``` warning: unused function 'func<int>' [-Wunused-function] template <> int func<int> () {} ^~~~~~~~~ ``` This comes in line with the printed text in the warning message. In the above case, `func<int>` Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D152707 -
LLVM GN Syncbot authored
-
Job Noorman authored
Just enough features are implemented to process a simple "hello world" executable and produce something that still runs (including libc calls). This was mainly a matter of implementing support for various relocations. Currently, the following are handled: - R_RISCV_JAL - R_RISCV_CALL - R_RISCV_CALL_PLT - R_RISCV_BRANCH - R_RISCV_RVC_BRANCH - R_RISCV_RVC_JUMP - R_RISCV_GOT_HI20 - R_RISCV_PCREL_HI20 - R_RISCV_PCREL_LO12_I - R_RISCV_RELAX - R_RISCV_NONE Executables linked with linker relaxation will probably fail to be processed. BOLT relocates .text to a high address while leaving .plt at its original (low) address. This causes PC-relative PLT calls that were relaxed to a JAL to not fit their offset in an I-immediate anymore. This is something that will be addressed in a later patch. Changes to the BOLT core are relatively minor. Two things were tricky to implement and needed slightly larger changes. I'll explain those below. The R_RISCV_CALL(_PLT) relocation is put on the first instruction of a AUIPC/JALR pair, the second does not get any relocation (unlike other PCREL pairs). This causes issues with the combinations of the way BOLT processes binaries and the RISC-V MC-layer handles relocations: - BOLT reassembles instructions one by one and since the JALR doesn't have a relocation, it simply gets copied without modification; - Even though the MC-layer handles R_RISCV_CALL properly (adjusts both the AUIPC and the JALR), it assumes the immediates of both instructions are 0 (to be able to or-in a new value). This will most likely not be the case for the JALR that got copied over. To handle this difficulty without resorting to RISC-V-specific hacks in the BOLT core, a new binary pass was added that searches for AUIPC/JALR pairs and zeroes-out the immediate of the JALR. A second difficulty was supporting ABS symbols. As far as I can tell, ABS symbols were not handled at all, causing __global_pointer$ to break. RewriteInstance::analyzeRelocation was updated to handle these generically. Tests are provided for all supported relocations. Note that in order to test the correct handling of PLT entries, an ELF file produced by GCC had to be used. While I tried to strip the YAML representation, it's still quite large. Any suggestions on how to improve this would be appreciated. Reviewed By: rafauler Differential Revision: https://reviews.llvm.org/D145687
-
Alexey Lapshin authored
The D147066 changed the way how DWARF location expressions are handled. Now expressions are parsed and their operands are analysed. New handling misses the DW_OP_GNU_push_tls_address extention. This patch adds handling DW_OP_GNU_push_tls_address while checking for addresses. Differential Revision: https://reviews.llvm.org/D153010
-
Cullen Rhodes authored
This patch adds two LLVM intrinsics to the ArmSME dialect: * llvm.aarch64.sme.za.enable * llvm.aarch64.sme.za.disable for enabling the ZA storage array [1], as well as patterns for inserting them during legalization to LLVM at the start and end of functions if the function has the 'arm_za' attribute (D152695). In the future ZA should probably be automatically enabled/disabled when lowering from vector to SME, but this should be sufficient for now at least until we have patterns lowering to SME instructions that use ZA. N.B. The backend function attribute 'aarch64_pstate_za_new' can be used manage ZA state (as was originally tried in D152694), but it emits calls to the following SME support routines [2] for the lazy-save mechanism [3]: * __arm_tpidr2_restore * __arm_tpidr2_save These will soon be added to compiler-rt but there's currently no public implementation, and using this attribute would introduce an MLIR dependency on compiler-rt. Furthermore, this mechanism is for routines with ZA enabled calling other routines with it also enabled. We can choose not to enable ZA in the compiler when this is case. Depends on D152695 [1] https://developer.arm.com/documentation/ddi0616/aa [2] https://github.com/ARM-software/abi-aa/blob/main/aapcs64/aapcs64.rst#sme-support-routines [3] https://github.com/ARM-software/abi-aa/blob/main/aapcs64/aapcs64.rst#the-za-lazy-saving-scheme Reviewed By: awarzynski, dcaballe Differential Revision: https://reviews.llvm.org/D153050
-
Alexey Lapshin authored
This reverts commit e8973845.
-
Ivan Kosarev authored
Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D152908
-
Cullen Rhodes authored
This patch extends the 'enable-arm-streaming' pass with a new option to enable the ZA storage array by adding the 'arm_za' attribute to 'func.func' ops. A later patch will insert `llvm.aarch64.sme.za.enable` at the beginning of 'func.func' ops and `llvm.aarch64.sme.za.disable` before `func.return` statements when lowering to LLVM dialect. Currently the pass only supports enabling ZA with streaming-mode on but the SME LDR, STR and ZERO instructions can access ZA when not in streaming-mode (section B1.1.1, IDGNQM [1]), so it may be worth making these options independent in the future. N.B. This patch is generally useful in the context of SME enablement in MLIR, but it will help enable writing an integration test for rewrite pattern that lowers `vector.transfer_write` -> `zero {za}` (D152508). [1] https://developer.arm.com/documentation/ddi0616/aa Reviewed By: awarzynski, dcaballe Differential Revision: https://reviews.llvm.org/D152695 -
Ivan Kosarev authored
Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D152904
-
Jianjian GUAN authored
Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D153095
-
Alexey Lapshin authored
The D147066 changed the way how DWARF location expressions are handled. Now expressions are parsed and their operands are analysed. New handling misses the DW_OP_GNU_push_tls_address extention. This patch adds handling DW_OP_GNU_push_tls_address while checking for addresses. Differential Revision: https://reviews.llvm.org/D153010
-
Théo Degioanni authored
This revision introduces SROA and mem2reg support for the family of memcpy-like intrinsics (memcpy, memcpy.inline and memmove). The mem2reg implementation transforms memcpys of full types into loads and store. Memcpy between two promotable slots always disappear. The SROA implementation transforms memcpys of *entire* aggregate types into memcpys of all of their fields. Reviewed By: gysit Differential Revision: https://reviews.llvm.org/D152898
-
Weining Lu authored
-
Haojian Wu authored
This will bring down the size from 40 bytes to 32 bytes. Differential Revision: https://reviews.llvm.org/D153018
-
Timm Bäder authored
Differential Revision: https://reviews.llvm.org/D146030
-
Pavel Kosov authored
Initially, llvm-exegesis was generating the benchmark code for the host CPU to execute it inside its own process. Thus, MCJIT was reused for fetching function's bytes to fill the assembled_snippet field in the benchmark report. Later, the --mtriple and --benchmark-phase command line options were introduced that are handy for testing snippet generation even if snippet execution is not possible. In that setup, MCJIT is asked to parse an object file for a foreign CPU or operating system that is probably not guaranteed to succeed and was actually observed to fail in https://reviews.llvm.org/D145763. This commit implements a much simplified function's code fetching, assuming the benchmark function is the only function in the object file and it spans across the entire text section (note that MCJIT-based code has more or less the same assumption - see TrackingSectionMemoryManager class). ~~~ Huawei RRI, OS Lab Reviewed By: courbet Differential Revision: https://reviews.llvm.org/D148921
-
Kadir Cetinkaya authored
When modules are disabled, there's no loaded module for these import decls to point at. This results in crashes when there are modulemap files but no -fmodules flag (this configuration is used for layering check violations). This patch makes sure import declarations are introduced only when modules are enabled, which makes this case similar to textual headers (no import decls are created for #include of textual headers from a modulemap). Differential Revision: https://reviews.llvm.org/D152274
-
Craig Topper authored
-
Jonas Hahnfeld authored
The script build-for-llvm-top.sh and LLVM's ModuleInfo.txt are gone since a long time (commit d20ea7dc in November 2011), and llvm-top itself has even been removed from llvm-archive (it can be found here: https://github.com/llvm/llvm-archive/tree/cab7f8f160f0bd8d20d9a4036aa4083f2bc2740a/llvm-top ) so delete Clang's ModuleInfo.txt as well. Differential Revision: https://reviews.llvm.org/D152995
-
Pavel Labath authored
This reverts commit c3085346, which I pushed accidentally -- sorry.
-
Pavel Labath authored
-
Pavel Labath authored
Have the Progress class spawn a thread to periodically send progress reports. The reporting period could be made configurable, but for now I've hardcoded it to 100ms. (This is the main WIP part) It could be argued that creating a thread for progress reporting adds overhead, but I would counter that by saying "If the task is so fast that creating a thread noticably slows it down, then it really doesn't need progress reporting". For me, this speeds up DWARF indexing by about 1.5% (which is only slightly above the error bars), but I expect it will have a much bigger impact in situations where printing a single progress update takes a nontrivial amount of time. Differential Revision: https://reviews.llvm.org/D152364
-
Fangrui Song authored
If `evaluateAsAbsolute(Value, Layout.getAssembler())` returns true, we know the address delta is a constant and can suppress relocations (usually SET6/SUB6). While here, replace two evaluateKnownAbsolute calls (subtle; avoid if possible) with evaluateAsAbsolute.
-
Jaroslav Sevcik authored
Currently, lldb's unwinder ignores cfi_restore opcodes for registers that are not set in the first row of the unwinding info. This prevents unwinding of failed assertion in Chrome/v8 (https://github.com/v8/v8). The attached test is an x64 copy of v8's function that failed to unwind correctly (V8_Fatal). This patch changes handling of cfi_restore to reset the location if the first unwind table row does not map the restored register. Differential Revision: https://reviews.llvm.org/D153043
-
Carlos Alberto Enciso authored
Building the given test case with 'clang -O2 -g' the call to 'getInOrder' is sunk out of the loop by LICM, but the source location is not dropped. Reviewed By: aprantl, fdeazeve Differential Revision: https://reviews.llvm.org/D152691
-
Jake Egan authored
This test is failing on AIX due to patch D151938. Disable it for now to get the bot green while we investigate.
-
Serguei Katkov authored
-
Jake Egan authored
This new test is failing on AIX due to an unsupported DWARF section, so disable it (same rationale as patch D111336).
-
Kazuki Sakamoto authored
D152712 replaced `llvm::sys::RetryAfterSignal(-1, ::open)` with `FileSystem::Instance().Open` for bionic in PseudoTerminal::OpenSecondary, and FileSystem::Instance() is failing with assertion on arm Linux. The assertion should be FileSystem re-initialization check, therefore the hypothesis is that TerminalTest tests are initializing FileSystem instance repeatedly. Use SubsystemRAII<FileSystem> to ensure tearing down the FileSystem instance. Differential Revision: https://reviews.llvm.org/D153091
-
Fangrui Song authored
-
Sergei Barannikov authored
Use range-based for loops. The return type has been changed to bool because the method is only used in boolean contexts. Reviewed By: mtrofin Differential Revision: https://reviews.llvm.org/D152665
-
Sergei Barannikov authored
Reviewed By: foad Differential Revision: https://reviews.llvm.org/D152098
-
Sergei Barannikov authored
Turn MC*RegIterator into fully qualified iterators by deriving them from iterator_adaptor_base. This makes mc_*_reg iterators redundant. Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D152655
-
tianleli authored
Reviewed By: pengfei Differential Revision: https://reviews.llvm.org/D152997
-