- Jul 28, 2023
-
-
Alexis Engelke authored
LLVM supports switch ops without case values, for which the optional caseValues has no value (i.e., std::nullopt, no the empty array). Handle this case properly when translating MLIR-LLVM to LLVM-IR. Reviewed By: Dinistro, Mogball Differential Revision: https://reviews.llvm.org/D156431
-
Timm Bäder authored
Differential Revision: https://reviews.llvm.org/D149172
-
Tuan Chuong Goh authored
Consider FSHR legal if shift amount is constant Lower FSHL to FSHR if shift amount is constant Differential Revision: https://reviews.llvm.org/D155565
-
Dmitry Chernenkov authored
This reverts commit b6847edf.
-
Timm Bäder authored
Differential Revision: https://reviews.llvm.org/D156503
-
Timm Bäder authored
Differential Revision: https://reviews.llvm.org/D153241
-
Kevin Athey authored
This reverts commit 9cf67592. Breaking sanitzer buildbots: asan and fast https://lab.llvm.org/buildbot/#/builders/168/builds/14824 https://lab.llvm.org/buildbot/#/builders/5/builds/35419
-
John Brawn authored
Using segmented stacks with execute-only mostly works, but we need to use the correct movi32 opcode in 6-M, and there's one place where for thumb1 (i.e. 6-M and 8-M.base) a constant pool was unconditionally used which needed to be fixed. Differential Revision: https://reviews.llvm.org/D156339
-
melonedo authored
Implement XCVbi intrinsics for CV32E40P according to the specification. This commit is part of a patch-set to upstream the 7 vendor specific extensions of CV32E40P. Contributors: @CharKeaney, @jeremybennett, @lewis-revill, @liaolucy, Nandni Jamnadas, @PaoloS, @simoncook, @xmj. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D154412
-
Victor Kingi authored
Add support for generating and saving the optimization record. Optimization record lists the optimizations performed by LLVM. This patch enables the flag in Flang. Clang handles this functionality using the BackendConsumer which Flang doesn't have, hence, was implemented in CodeGenAction::executeAction FlangOption added to all variants of fsave-optimization-record in clang/include/clang/Driver/Options.td . Clang handles it the same way. opt_record_file, opt_record_passes and opt_record_format flags in Options.td were moved out of the group [CC1Option, NoDriverOption] to allow flang -fc1 support. The renderRemarksOptions and willEmitRemarks functions in clang/lib/Driver/ToolChains/Flang.cpp follow same syntax as clang. In flang/lib/Frontend/CompilerInvocation.cpp we update the field OptRecordFile with the provided optimization file value. Clang doesn't do this as it processes the Options.td, mapping the OptRecordFile earlier on. Reviewed By: awarzynski, tblah Differential Revision: https://reviews.llvm.org/D155452
-
Timm Bäder authored
This breaks ppc64le builders: https://lab.llvm.org/buildbot/#builders/230/builds/16405
-
Job Noorman authored
-
Job Noorman authored
Mapping symbols [1] are special ELF symbols that can be inserted to indicate regions of code or data. A sequence of data bytes is indicated by a `$d` (or `$d.<any>`) symbol pointing to its start while a sequence of instructions uses a `$x` (or `$x.<any>`) symbol. This can be used, for example, to assist disassembling a memory region containing both data and code. This patch implements mapping symbols for RISC-V, copying the implementation mostly from the AArch64 target. Note that the `$x<ISA>` mapping symbol, indicating an instruction sequence with a specific ISA extension, is not implemented by this patch. As far as I can tell, binutils doesn't implement this yet either. Note that this patch uses the same symbol naming convention as the AArch64 target: always use `$x.i` and `$d.i` (where `i` is a monotonically increasing counter). This differs from binutils where all symbols are named `$x` or `$d` (causing multiple symbol having the same name). I'm not not sure whether it makes more sense to avoid duplicate symbol names or be consistent with binutils. Note that the handling of nop-slides inserted for alignment differs from binutils: binutils always marks the nops as instructions (`$x`) while this patch doesn't insert a symbol for the nops (so the last inserted symbol is used). I believe binutil's behavior makes most sense but this seems difficult to implement in LLVM as the insertion of nops is handled by `RISCVAsmBackend`. At this point, inserting ELF symbols seems impossible. Any ideas for how to handle this would be appreciated. [1]: https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-elf.adoc#mapping-symbol Depends on D156190 and D156236 Differential Revision: https://reviews.llvm.org/D153260
-
Timm Bäder authored
Differential Revision: https://reviews.llvm.org/D155410
-
Job Noorman authored
D108961 introduced relaxation for out-of-range conditional branches. However, relaxation was only performed when the branch target could be resolved. I believe this has two undesired consequences: - `b<cc> ... foo`, where `foo` is undefined, would not be relaxed although there is no guarantee the offset to `foo` will fit; - Conditional branches are never relaxed with `-mattr=+relax` because MC considers fixups where `shouldForceRelocation` returns true (which will be the case with `+relax`) to be unresolved. Note that binutils performs conditional branch relaxation in both cases. This patch proposes to perform conditional branch relaxation even when the target cannot be resolved. Note on llvm/test/MC/RISCV/long-conditional-jump.s: I've removed the `.p2align` because this causes alignment nops to be inserted for the `+relax` tests. This in turn causes all the branch targets to change compared to the non-`+relax` tests. Since `+relax` shouldn't change these offsets, I found this confusing and hence chose to remove the alignment. Reviewed By: asb, MaskRay, reames Differential Revision: https://reviews.llvm.org/D154958
-
Timm Bäder authored
Differential Revision: https://reviews.llvm.org/D155368
-
melonedo authored
Implement XCVsimd intrinsics for CV32E40P according to the specification. This commit is part of a patch-set to upstream the 7 vendor specific extensions of CV32E40P. Contributors: @CharKeaney, @jeremybennett, @lewis-revill, @liaolucy, Nandni Jamnadas, @PaoloS, @simoncook, @xmj. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D153721
-
Timm Bäder authored
Differential Revision: https://reviews.llvm.org/D155367
-
Job Noorman authored
D154958 enables branch relaxation for unresolved symbols. This has an interesting consequence for some LLD tests: branch relocations are tested by using branches to undefined symbols and defining them, with different values, on the LLD command line. These tests broke and there doesn't seem to be an easy workaround: as far as I can tell, there is no way to convince llvm-mc to emit a branch relocation to an undefined symbol without branch relaxation kicking in. This patch proposes to add a flag, `-riscv-asm-relax-branches=0`, to do just that. The main purpose for this flag is for testing but it might be seen as a first step to some kind of "strict" or WYSIWYG mode (i.e., what you give to the assembler is exactly what comes out). The need for this has been mentioned in, for example, D108961. However, I suspect there will be a lot of discussion around what exactly such a strict mode would look like. Therefore, I gated this feature behind a CLI flag instead of adding a new target feature. Reviewed By: asb, MaskRay Differential Revision: https://reviews.llvm.org/D155953
-
LLVM GN Syncbot authored
-
Timm Bäder authored
Differential Revision: https://reviews.llvm.org/D155356
-
Job Noorman authored
This ensures that llvm-symbolizer ignores them for symbolization. Note: unlike aarch64-mapping-symbol.s, the test included here does not test if the mapping symbols are actually in the symbol table. The reason is that llvm-mc support for RISC-V mapping symbols (D153260) has not landed yet, so the mapping symbols simply aren't there. However, D153260 would like to depend on this patch together with D156190 to avoid having to update a large amount of tests. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D156236
-
Zain Jaffal authored
In preperation to move all remark utilities into one tool. We use command registry to breakdown each utility into a separate file. For now we have 3 utilities for remarks 1. Convert: which is responsible for converting yaml remarks to bitstream and vice-versa 2. Count: Analyse remarks and report count. This currently only supports asm-remarks and annotation-summary remarks. 3. Diff remarks: Currently we only have a diff for size remarks using `llvm-remark-size-diff` The first two utilites have been simplified and seperated into two files. The following commit will move `llvm-remark-size-diff` and fold it to be inside `llvm-remarkutil` as a subcommand Differential Revision: https://reviews.llvm.org/D156416
-
Jun Sha (Joshua) authored
Since __bf16 has been upgraded from a storage-only type to an arithmetic type in https://reviews.llvm.org/rGe62175736551abf40a3410bc246f58e650eb8158, it should support all the basic arithmetic operations like other float types, including increment and decrement. Reviewed By: pengfei Differential Revision: https://reviews.llvm.org/D152768
-
Timm Bäder authored
This code is invalid, not unsupported.
-
Mehdi Amini authored
This reverts commit 5a51a44f. The build is broken.
-
MarcoFalke authored
-
Martin Braenne authored
-
Jun Sha (Joshua) authored
According to the latest spec, Zvfbfwma requires Zvfbfmin and Zvfbfmin requires Zfbfmin, with FLH/FSH/FMV.H.X/HMV.X.H removed from Zvfbfwma. Reviewed By: asb Differential Revision: https://reviews.llvm.org/D155916
-
Mogball authored
This is more user-friendly over an opaque crash. Reviewed By: lattner Differential Revision: https://reviews.llvm.org/D156475
-
Freddy Ye authored
Reviewed By: pengfei Differential Revision: https://reviews.llvm.org/D156239
-
Roger Ferrer Ibanez authored
Fix syntax issues in the reStructuredText file that prevented rendering them. Differential Revision: https://reviews.llvm.org/D156438
-
David Carlier authored
This reverts commit 885275bf.
-
Fangrui Song authored
llvm-objdump -d has been changed to not display mapping symbols by default.
-
Fangrui Song authored
Similar to D96617 for llvm-symbolizer. This patch matches the GNU objdump -d behavior to suppress printing labels for mapping symbols. Mapping symbol names don't convey much information. When --show-all-symbols (not in GNU) is specified, we still print mapping symbols. Note: the `for (size_t SI = 0, SE = Symbols.size(); SI != SE;)` loops needs to iterate all mapping symbols, even if they are not displayed. We use the new field `IsMappingSymbol` to recognize mapping symbols. This field also enables simplification after D139131. ELF/ARM/disassemble-all-mapping-symbols.s is enhanced to add `.space 2`. If `End = std::min(End, Symbols[SI].Addr);` is not correctly set, we would print a `.word`. Reviewed By: jhenderson, jobnoorman, peter.smith Differential Revision: https://reviews.llvm.org/D156190
-
Fangrui Song authored
These tests only use yaml2obj and llvm-nm, which do not need LLVM_TARGETS_TO_BUILD.
-
Fangrui Song authored
and omit them from llvm-nm output unless --special-syms is specified, similar to ARM and AArch64. This is a prerequisite of D156190 as llvm-objdump will only perform mapping symbol recognition for SF_FormatSpecific symbols.
-
Qihan Cai authored
Implement XCValu intrinsics for CV32E40P according to the specification. This is a commit of the patch-set to upstream the 7 vendor specific extensions of CV32E40P. Contributors: @CharKeaney, Nandni Jamnadas, Serkan Muhcu, @jeremybennett, @lewis-revill, @liaolucy, @simoncook, @xmj Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D153748
-
Shoaib Meenai authored
https://reviews.llvm.org/D144252 removed -Wno-unused-function from the libunwind build, but we have an unused function when you're building for armv7 without assertions. Mark that function as possibly unused to avoid the warning, and mark the parameter as a const pointer while I'm here to make it clear that nothing is modified by a debugging function. Reviewed By: #libunwind, philnik Differential Revision: https://reviews.llvm.org/D156496
-