- Jun 26, 2023
-
-
Emilia Kond authored
7a38b3bf landed after 20b4df1e, which refactored how tests are structured in FormatTest. This quick fix-up unifies the tests added in 7a38b3bf to comply with this new format.
-
Mike Crowe authored
Add FormatStringConverter utility class that is capable of converting printf-style format strings into std::print-style format strings along with recording a set of casts to wrap the arguments as required and removing now-unnecessary calls to std::string::c_str() and std::string::data() Use FormatStringConverter to implement a new clang-tidy check that is capable of converting calls to printf, fprintf, absl::PrintF, absl::FPrintF, or any functions configured by an option to calls to std::print and std::println, or other functions configured by options. In other words, the check turns: fprintf(stderr, "The %s is %3d\n", description.c_str(), value); into: std::println(stderr, "The {} is {:3}", description, value); if it can. std::print and std::println can do almost anything that standard printf can, but the conversion has some some limitations that are described in the documentation. If conversion is not possible then the call remains unchanged. Depends on D153716 Reviewed By: PiotrZSL Differential Revision: https://reviews.llvm.org/D149280 -
eopXD authored
Guard local variable declaration for RVV intrinsic types. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D153510
-
Ingo Müller authored
Previously, llvm.atomicrmw only allowed operands that are pointers to LLVM floats or integers. However, according to the LLVM IR Language Reference, that op allows pointer to pointer operands in its `xchg` mode. This patch allows those operands also in MLIR's LLVM dialect and adapts the tests accordingly. Reviewed By: gysit Differential Revision: https://reviews.llvm.org/D153747
-
Luke Lau authored
We already handle vslide1{up,down}, so this extends it to vslide{up,down}. This was unintentionally added in https://reviews.llvm.org/D150463 and then removed in 37cfcfce, but unless I'm missing something this should still be ok as the mask only controls what destination elements are written to. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D153631 -
Luke Lau authored
Currently vslide1{up,down}s can have vmerges folded into them, but not vslide{up,down}s. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D153630 -
Ingo Müller authored
There were various syntax errors; all have pretty trivial fixes but might distract novice users (like me). Reviewed By: ingomueller-net Differential Revision: https://reviews.llvm.org/D153720
-
Haohai Wen authored
This relands 3eee5aa5 with fixes.
-
Job Noorman authored
The relaxation algorithm used to only update offsets of relaxable edges. This caused non-relaxable edges that appear after a relaxed instruction to have an incorrect offset and be applied at the wrong location. This patch fixes this by updating the offsets of all edges. Note that this bug was caused by an incorrect translation of LLD's relaxation algorithm. LLD always uses all edges during relaxation while I decided to filter-out relaxable edges to prevent having to iterate non-relaxable edges at each step. However, this had the side-effect of only updating offsets of relaxable edges. This patch leaves the filtering of relaxable edges as-is but iterates all edges when updating offsets. Reviewed By: StephenFan Differential Revision: https://reviews.llvm.org/D153515
-
Job Noorman authored
This is useful for contexts where shouldAddDefaultTargetPasses returns false but that still want to perform relaxation. Reviewed By: StephenFan Differential Revision: https://reviews.llvm.org/D153538
-
Job Noorman authored
Relaxable edges are created unconditionally, even when the relaxation pass will not run. However, they were not recognized by applyFixup causing them to not be applied. To support configurations without the relaxation pass, this patch adds these relaxable edges to applyFixup: - CallRelaxable: Can be treated as R_RISCV_CALL - AlignRelaxable: Can simply be ignored An alternative could be to unconditionally run the relaxation pass, even in contexts where shouldAddDefaultTargetPasses returns false. However, I could imagine there being use cases for disabling relaxation which wouldn't be possible anymore then. Reviewed By: StephenFan Differential Revision: https://reviews.llvm.org/D153541
-
pvanhout authored
There is no case where those functions return false. It's always return true. Even if they were to return false, it's not really something we should rely on I think. With the current combiner implementation, it would just make `tryCombineAll` return false without retrying anymore rules. I also believe that if an applyer were to return false, it would mean that the match function is not good enough. Asserting on failure in an apply function is a better idea, IMO. Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D153619
-
WANG Xuerui authored
This kind of CLI flags duplication can sometimes be convenient for build systems that may have to tinker with these. For example, in the Linux kernel we almost always want to ensure no FP instruction is emitted, so `-msoft-float` is present by default; but sometimes we do want to allow FPU usage (e.g. certain parts of amdgpu DC code), in which case we want the `-msoft-float` stripped and `-mfpu=64` added. Here we face a dilemma without this change: * Either `-mabi` is not supplied by `arch/loongarch` Makefile, in which case the correct ABI has to be supplied by the driver Makefile (otherwise the ABI will become double-float due to `-mfpu`), which is arguably not appropriate for a driver; * Or `-mabi` is still supplied by `arch/loongarch` Makefile, and the build immediately errors out because `-Werror=unused-command-line-argument` is unconditionally set for Clang builds. To solve this, simply make sure to check `-mabi` and `-mfpu` (and gain some useful diagnostics in case of conflicting settings) when `-m*-float` is successfully parsed. Reviewed By: SixWeining, MaskRay Differential Revision: https://reviews.llvm.org/D153707
-
David CARLIER authored
https://man7.org/linux/man-pages/man3/getentropy.3.html Reviewers: melver Reviewed-By: melver Differential Revision: https://reviews.llvm.org/D153723
-
Tobias Gysi authored
The revision adds a flag to the LLVM IR import that avoids emitting expensive warnings about unsupported debug intrinsics and unhandled metadata. Reviewed By: Dinistro Differential Revision: https://reviews.llvm.org/D153625
-
Chuanqi Xu authored
In case of 'get_return_object_on_allocation_failure' get declared, the compiler is required to call 'operator new(size_t, nothrow_t)' and the handle the failure case by calling 'get_return_object_on_allocation_failure()'. But the failure case should be rare and we can assume the allocation is successful and pass the information to the optimizer.
-
Craig Topper authored
We were only checking for the previous insructions to write exactly the register or a super register. We ignored writes to a subregister and continued searching for the producing instruction. We need to abort instead. There's another check inside the if body to abort if the registers don't match exactly. So we just need to check for overlap so we enter the if body. Reviewed By: fakepaper56 Differential Revision: https://reviews.llvm.org/D153490
-
Craig Topper authored
-
Craig Topper authored
Inspired by D153235, I think bit manipulation makes more sense on unsigned types. Reviewed By: Jim Differential Revision: https://reviews.llvm.org/D153403
-
Jim Lin authored
Input argument of clz and ctz should be unsigned type and return value should be integer like `builtin_clz` and `builtin_ctz` defined in clang/include/clang/Basic/Builtins.def. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D153235
-
Craig Topper authored
It was only used for the compressed instruction c.jr which expands to jalr with rd=x0. Use WriteJalr instead to match jalr.
-
Aiden Grossman authored
This reverts commit 0b6b400b. The sporadic test failures were fixed during this land, but I forgot to fix the build failures on certain platforms (seems to mostly be AArch64/PPC) that result from them not being able to find the symbols for shm_open and shm_unlink.
-
WANG Xuerui authored
Apart from general feature parity, this is also necessary for enabling ClangBuiltLinux that defaults to using LLVM tools. While at it, add a missing comment for the Hexagon definition directly above, so it doesn't get confused with the SPARC definitions. Reviewed By: SixWeining, MaskRay, jhenderson Differential Revision: https://reviews.llvm.org/D153609
-
Weining Lu authored
Linux LoongArch port [1] uses `-msoft-float` (implies no FPU) in its `cflags` while it also uses floating-point insns in asm sources [2]. GAS allows this usage while IAS currently does not. This patch removes `AssemblerPredicate`s for floating-point insns so that to make IAS compitable with GAS. Similarly, also remove `AssemblerPredicate`s for other ISA extensions, i.e. lsx/las/lvz/lbt. [1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/loongarch/Makefile?h=v6.4-rc1#n49 [2]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/loongarch/kernel/fpu.S?h=v6.4-rc1#n29 Reviewed By: xen0n, hev Differential Revision: https://reviews.llvm.org/D150196
-
Weining Lu authored
I meant to fold this into 47601815 but failed to do so. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D152671
-
Aiden Grossman authored
This patch introduces the SubprocessMemory class to llvm-exegesis. This class contains several utilities that are needed for managing memory to set up an execution environment for memory annotations. Reviewed By: courbet Differential Revision: https://reviews.llvm.org/D151022
-
Wang Rui authored
This patch optimizes code generation by leveraging the zeroing behavior of the `maskeqz`/`masknez` instructions. ``` int sel(int a, int b) { return (a < b) ? a : 0; } ``` ``` slt $a1,$a0,$a1 masknez $a2,$r0,$a1 maskeqz $a0,$a0,$a1 or $a0,$a0,$a2 ``` => ``` slt $a1,$a0,$a1 maskeqz $a0,$a0,$a1 ``` Reviewed By: SixWeining Differential Revision: https://reviews.llvm.org/D153193 -
Weining Lu authored
This reverts commit 3dd319ec. Sorry, I forgot to amend the author name and email when merging this patch.
-
Aiden Grossman authored
This patch introduces the subprocess executor mode. Currently, this new mode doesn't do anything fancy, just executing the same code that the inprocess executor would do, but within a subprocess. This sets up the ability to add in many more memory-related features in the future. Reviewed By: courbet Differential Revision: https://reviews.llvm.org/D151021
-
Younan Zhang authored
This is a follow-up patch to D126194 in order to fix https://github.com/llvm/llvm-project/issues/63503. Reviewed By: shafik Differential Revision: https://reviews.llvm.org/D153724
-
Jie Fu authored
/data/llvm-project/llvm/lib/Transforms/Utils/SimplifyCFG.cpp:6051:10: error: unused variable 'Inc' [-Werror,-Wunused-variable] bool Inc, Wrapped = false; ^ 1 error generated. -
Aiden Grossman authored
This patch gives the ability to assign performance counters within llvm-exegesis to a specific process by passing its PID. This is needed later on for implementing a subprocess executor. Defaults to zero, the current process, for the InProcessFunctionExecutorImpl. Reviewed By: courbet Differential Revision: https://reviews.llvm.org/D151020
-
khei4 authored
Differential Revision: https://reviews.llvm.org/D150943
-
khei4 authored
Differential Revision: https://reviews.llvm.org/D153238
-
Matt Arsenault authored
This tried to query the physical subregister on virtual registers if they were left unassigned.
-
Matt Arsenault authored
f64->f16 is hard. The expansion is all integer but we need to raise exceptions. Also doesn't handle the illegal f16 targets.
-
Matt Arsenault authored
-
Amaury Séchet authored
-
Amaury Séchet authored
-
Niwin Anto authored
[AArch64][GlobalISel] IR translate support for a return instruction of type <1 x i8> or <1 x i16> when using GlobalISel. Code generation for return instruction of type <1 x i8> or <1 x i16> when using GlobalISel causes internal compiler crash Could not handle ret ty. Fixes: https://github.com/llvm/llvm-project/issues/58211 Differential Revision: https://reviews.llvm.org/D153300
-