- Jan 10, 2024
-
-
Jay Foad authored
-
Stefan Gränitz authored
We can pass `-mcpu=native` to the clang driver to let it consider the host CPU when choosing the compile target for `clang-repl`. We can already achieve this behavior with `clang-repl -Xcc -mcpu=native`, but it seems like a reasonable default actually. The trade-off between optimizing for a specific CPU and maximum compatibility often leans towards the latter for static binaries, because distributing many versions is cumbersome. However, when compiling at runtime, we know the exact target CPU and we can use that to optimize the generated code. This patch makes a difference especially for "scattered" architectures like ARM. When cross-compiling for a Raspberry Pi for example, we may use a stock toolchain like arm-linux-gnueabihf-gcc. The resulting binary will be compatible with all hardware versions. This is handy, but they will all have `arm-linux-gnueabihf` as their host triple. Previously, this caused the clang driver to select triple `armv6kz-linux-gnueabihf` and CPU `arm1176jzf-s` as the REPL target. After this patch the default triple and CPU on Raspberry Pi 4b will be `armv8a-linux-gnueabihf` and `cortex-a72` respectively. With this patch clang-repl matches the host detection in Orc.
-
Nikita Popov authored
-
Nikita Popov authored
Always generate canonical i8 GEPs. Especially as this is a backend pass, trying to generate a "nice" GEP representation is not useful.
-
Nikita Popov authored
-
Benjamin Maxwell authored
This operation provides a convenient way to query the streaming vector length regardless of the streaming mode. This most useful for functions that call/pass data to streaming functions, but are not streaming themselves. Example: ```mlir %svl_w = arm_sme.streaming_vl <word> ``` Created based on discussion here: https://github.com/llvm/llvm-project/pull/76086#discussion_r1434226352
-
Lu Weining authored
psABI v2.30 requires the extreme code model instructions sequence (pcalau12i+addi.d+lu32i.d+lu52i.d) to be adjacent. See https://github.com/llvm/llvm-project/pull/71907 and https://github.com/loongson-community/discussions/issues/17 for details.
-
David Sherwood authored
Following on from https://github.com/llvm/llvm-project/pull/72273 which added the new AArch64 loop idiom transformation pass, this patch enables the pass by default for AArch64.
-
Yi Wu authored
This patch add support of intrinsics Fortran 2008 EXECUTE_COMMAND_LINE. The patch contains both the lowering and the runtime code and works on both Windows and Linux. The patch contains a list of commits, to convey the authorship and the history of changes. Some implementation specifics or status has been added to `flang/docs/Intrinsics.md`. I have provided a summary of the usage and the options required for the `EXECUTE_COMMAND_LINE intrinsic`. The intrinsic supports both a synchronous (by default) and an asynchronous option. | System | Mode | Implemention | |---------|-------|---------------------------| | Linux | Sync | std::system() | | Windows | Sync | std::system() | | Linux | Async | fork() | | Windows | Async | CreateProcess | Support for the SYSTEM GNU extension will be added in a separate PR. Co-authored with @jeffhammond --------- Signed-off-by:
Jeff Hammond <jeff.science@gmail.com> Co-authored-by:
Jeff Hammond <jeff.science@gmail.com> Co-authored-by:
Yi Wu <yiwu02@wdev-yiwu02.arm.com>
-
Hana Dusíková authored
Replace the discarded statement by an empty compound statement so we can keep track of the whole source range we need to skip in coverage Fixes #54419
-
David Green authored
This is an extension of https://github.com/llvm/llvm-project/pull/75774, with Any and All lowering added alongside Count.
-
martinboehme authored
Revert "[clang][dataflow] Add an early-out to `flowConditionImplies()` / `flowConditionAllows()`." (#77570) Reverts llvm/llvm-project#77453
-
paperchalice authored
-
avl-llvm authored
This patch backports https://github.com/llvm/llvm-project/pull/77016 into the DWARFLinkerParallel.
-
Nikita Popov authored
-
Martin Storsjö authored
If using multiarch directories with musl, the multiarch directory still uses *-linux-gnu triples - which may or may not be intentional, while it is somewhat consistent at least. However, for musl armhf targets, make sure that this also picks arm-linux-gnueabihf, rather than arm-linux-gnueabi.
-
Martin Storsjö authored
This applies the same change as in 760261a3 (where they were applied to libcxxabi and libcxx) to libunwind as well. These options can reasonably be set either as an absolute or relative path, but if set as type PATH, they are rewritten from relative into absolute relative to the build directory, while the relative form is intended to be relative to the install prefix.
-
Martin Storsjö authored
The comment indicate that it should be possible, but as long as it wasn't a cache variable, the cmake script overwrote whatever variable the user had set.
-
Owen Pan authored
The current CI doesn't use the latest clang-format and fails most clang-format patches on the code formatting check. This patch temporarily removes the clang-format style from the .clang-format files.
-
Vlad Serebrennikov authored
Covers C++ core issues 1800, 1801, 1802, 1803, 1804.
-
Ivan Kosarev authored
As not all fake instructions have their real counterparts implemented yet, we specify no AssemblerPredicate for UseFakeTrue16Insts to allow both fake and real True16 instructions in assembler and disassembler tests in the -mattr=+real-true16 mode during the transition period. Source DPP and desitnation VOPDstOperand_t16 operands are still not supported and will be addressed separately.
-
Dominik Adamski authored
If -nogpulib option is passed by the user, then the OpenMP device runtime is not used and we should not emit globals to configure debugging at compile-time for the device runtime. Link to -nogpulib flag implementation for Clang: https://reviews.llvm.org/D125314
-
Balázs Kéri authored
`StdLibraryFunctionsChecker` is updated too with `ungetc`.
-
Craig Topper authored
-
Bhuminjay Soni authored
**Overview:** Fix a bug where Clang's range-loop-analysis incorrectly checks for trivial copyability instead of trivial copy constructibility, leading to erroneous warnings. Fixes #47355
-
Serge Pavlov authored
The intrinsics get_fpenv, set_fpenv and reset_fpenv in this change are implemented as calls to math library functions. Target specific lowering will be implemented later on.
-
Juneyoung Lee authored
This patch fixes WebAssembly's FastISel pass to correctly consider signext/zeroext parameter flags at function declaration. Previously, the flags at call sites were only considered during code generation, which caused an interesting bug report #63388 . This is problematic especially because in WebAssembly's ABI, either signext or zeroext can be tagged to a function argument, and it must be correctly reflected in the generated code. Unit test https://github.com/llvm/llvm-project/blob/main/llvm/test/CodeGen/WebAssembly/signext-zeroext.ll shows that `i8 zeroext %t` and `i8 signext %t`'s code gen are different.
-
Timm Bäder authored
-
jiahanxie353 authored
* Add IRTranslate tests for ADD, SUB, AND, OR, and XOR with scalable vector types to show that they work as expected. * Legalize G_ADD, G_SUB, G_AND, G_OR, and G_XOR of scalable vector type for the RISC-V vector extension.
-
Craig Topper authored
Move classes out of `let Predicates` scopes. The instantiation of the class should be responsible for providing the Predicates. Put the RV64 pseudoinstructions and patterns next to the RV32 version of the same category. The categories are AMOs, pseudo AMOs, and compare exchange. The main reason for this commit is that the compare exchange patterns need to be disabled when Zacas is enabled so we can directly select Zacas instructions with isel patterns. This necessitates compare exchange having a different `let Predicates=` from the others anyway.
-
Chia authored
Similar to #76550, but for `ISD::AVGCEILU`. Specifically, this patch aims to use `vaaddu` with rounding mode rnu (i.e `vxrm[1:0] = 0b00`) for `ISD::AVGCEILU`. ### Source code ``` define <vscale x 8 x i8> @vaaddu_vv_nxv8i8_ceil(<vscale x 8 x i8> %x, <vscale x 8 x i8> %y) { %xzv = zext <vscale x 8 x i8> %x to <vscale x 8 x i16> %yzv = zext <vscale x 8 x i8> %y to <vscale x 8 x i16> %add = add nuw nsw <vscale x 8 x i16> %xzv, %yzv %one = insertelement <vscale x 8 x i16> poison, i16 1, i32 0 %splat = shufflevector <vscale x 8 x i16> %one, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer %add1 = add nuw nsw <vscale x 8 x i16> %add, %splat %div = lshr <vscale x 8 x i16> %add1, %splat %ret = trunc <vscale x 8 x i16> %div to <vscale x 8 x i8> ret <vscale x 8 x i8> %ret } ``` ### Before this patch ``` vaaddu_vv_nxv8i8_ceil: vsetvli a0, zero, e8, m1, ta, ma vwaddu.vv v10, v8, v9 vsetvli zero, zero, e16, m2, ta, ma vadd.vi v10, v10, 1 vsetvli zero, zero, e8, m1, ta, ma vnsrl.wi v8, v10, 1 ret ``` ### After this patch ``` vaaddu_vv_nxv8i8_ceil: vsetvli a0, zero, e8, m1, ta, ma csrwi vxrm, 0 vaaddu.vv v8, v8, v9 ret ``` -
LLVM GN Syncbot authored
-
Vitaly Buka authored
Issue #77546 This reverts commit 07c9189f.
-
Vitaly Buka authored
Issue #77546 This reverts commit b6d15770.
-
Nicholas Mosier authored
Fix various formatting issues in MyFirstTypoFix.
-
HaohaiWen authored
Reverts llvm/llvm-project#77441 I'll land it with fix.
-
Kai Luo authored
`llvm.trap` is lowered to `PPC::TRAP` and `PPC::TRAP` is set as terminator. Verifier complains about terminator should not lie in the middle of an MBB. See #77095. Fix it by removing `isTerminator` and `isBarrier` and then set `isTrap` which was introduced by https://reviews.llvm.org/D48836# and is being used by X86 and AArch64. `PPC::TRAP` is not a hardware memory barrier and `llvm.trap` doesn't indicate a memory barrier either.
-
Amir Ayupov authored
This reverts commit 85f3d81fabb9381ce5bc0112d029a7c684b01006. Affects BOLT macro-fusion and not NFC.
-
Ding Fei authored
Invalid (direct) initializer would invalid `VarDecl` so `InitializerScopeRAII` cannot restore scope stack balance. As with other kind of initializer, `InitializerScopeRAII::pop()` is moved up before `Sema::ActOnInitializerError()` which invalidates the `VarDecl`, so scope can be balanced and current `DeclContext` can be restored. Fixes #30908
-