- May 20, 2024
-
-
Leon Clark authored
This reverts commit fb2c6597.
-
Hubert Tong authored
Fix linkage of `build_name`; it is not supposed to have external linkage.
-
Kazu Hirata authored
-
Shan Huang authored
Fixes #92537
-
Andrew Ng authored
For PlayStation, make the propagation of DLL import/export attributes for explicit template instantiations the same as MSVC and Windows Itanium.
-
jofrn authored
This predicate tells GlobalISelEmitter and DAGISelEmitter to check that the instruction to emit has only one use of its result. This can be used on a PatFrag instead of defining custom predicates for both emitters per record that requires it.
-
Haojian Wu authored
clang rejects some valid code (see testcases) because of an incorrect transformed deduction guides. This patch fixes it. We miss the template argument packs during the transformation (`auto (type-parameter-0-0...) -> Foo<>`). In `TreeTransform::TransformTemplateArguments `, we have a logic of handling template argument packs which were originally added to support CTAD alias, it doesn't seem to be needed, we need to unpack them.
-
Florian Hahn authored
Extra tests for https://github.com/llvm/llvm-project/pull/92307
-
Yingwei Zheng authored
According to IEEE Std 754-2019, `sqrt` returns nan when the input is negative (except for -0). In this case, we cannot make assumptions about sign bit of the result. Fixes https://github.com/llvm/llvm-project/issues/92217
-
Danila Malyutin authored
We do not need to concern ourselves with CGSCC since all remaining CG related updates went away in fa6ea7a4 as pointed out by @nikic in https://github.com/llvm/llvm-project/pull/87963#issuecomment-2113937182.
-
Florian Hahn authored
Split off from https://github.com/llvm/llvm-project/pull/89386, this extends the binary matcher to support matching commuative operations. This is used for a new m_c_BinaryOr matcher, used in simplifyRecipe. PR: https://github.com/llvm/llvm-project/pull/92539
-
Théo Degioanni authored
The parametric op was not checking the symbol it points to is a type or attribute. This PR also fixes a small bug where an invalid IRDL file would not end processing in mlir-opt. I also improved the error messages for the already handled irdl.base invalid symbols.
-
Sergio Afonso authored
This patch splits definitions for the OpenMP dialect into multiple files to simplify the addition of new features, reduce merge conflicts, make it easier to understand, etc. The split is based on the structure of the more mature LLVMIR dialect. More specifically: - The OpenMP dialect definition is located in OpenMPDialect.td. - Base classes for OpenMP operations and types, as well as generic OpenMP types are moved to OpenMPOpBase.td. - OpenMP enumeration attributes, their case attributes and shared base classes for these are placed in OpenMPEnums.td. - Other OpenMP attributes are separated into OpenMPAttrDefs.td. - OpenMPOps.td only contains operation definitions. Even though this change should be useful on its own, it is intended as a precursor to a follow-up PR in which operation arguments and attributes are split into clause-specific classes which are then shared by all operations to which they apply to. Without this prior change, that approach would make the OpenMPOps.td file harder to navigate.
-
Han-Kuan Chen authored
already.
-
NAKAMURA Takumi authored
-
Tom Eccles authored
This means that this pass will also run on hlfir intrinsics which are not inside of functions. See RFC: https://discourse.llvm.org/t/rfc-add-an-interface-for-top-level-container-operations Some of the changes are from moving the declaration and definition of the constructor into tablegen (as requested during code review of another pass).
-
Ramkumar Ramachandra authored
Add examples of patterns that can be simplified, but are currently not. This patch serves as a pre-commit test.
-
Nikita Popov authored
This patch canonicalizes constant expression GEPs to use i8 source element type, aka ptradd. This is the ConstantFolding equivalent of the InstCombine canonicalization introduced in #68882. I believe all our optimizations working on constant expression GEPs (like GlobalOpt etc) have already been switched to work on offsets, so I don't expect any significant fallout from this change. This is part of: https://discourse.llvm.org/t/rfc-replacing-getelementptr-with-ptradd/68699
-
Dmitry Vasilyev authored
This patch fixes #92574. It is a replacement for #92575.
-
NAKAMURA Takumi authored
- Introduce `LeafExprSet`, - Suppress traversing LAnd and LOr expr under system headers. - Handle LAnd and LOr as instrumented leaves to override `!isInstrumentedCondition(C)`. - Replace Loc with FileLoc if it is expanded with system headers. Fixes #78920
-
hanbeom authored
This change looks for cases of symmetric constant loading. `symmetric constant load` is when the upper 32 bits and lower 32 bits of a 64-bit register load the same value. When it finds this, it replaces it with an instruction that loads only the lower 32 bits of the constant and stores it in the upper and lower bits simultaneously. For example: renamable $x8 = MOVZXi 49370, 0 renamable $x8 = MOVKXi $x8, 320, 16 renamable $x8 = MOVKXi $x8, 49370, 32 renamable $x8 = MOVKXi $x8, 320, 48 becomes renamable $x8 = MOVZXi 49370, 0 renamable $x8 = MOVKXi $x8, 320, 16 renamable $x8 = ORRXrs $x8, $x8, 32
-
bd1976bris authored
Adjust the PS5 driver defaults for the -fvisibility-from-dllstorageclass sub-options so that only globals with dllimport/dllexport annotations are adjusted. This allows globals without dllimport/export to retain the visibility and pre-emptability assigned during IR-Gen. Set -fvisibility=hidden on PS5 by default to compensate for no longer overriding the visibility of definitions without dllexport. Note there is no behavior change for PS4 (the behavior of overriding the visibility for all globals is retained on PS4).
-
hanbeom authored
-
Shan Huang authored
This PR fixes issue #77415 and is revised from PR #77419 . PR #77419 breaks the newly added test in the same PR on windows, because GVNSink is non-deterministic when sorting `BasicBlock*` pointers. This is reflected in the failure report. ``` # | C:\src\llvm-project\llvm\test\Transforms\GVNSink\sink-ignore-dbg-intrinsics.ll:28:10: error: CHECK: expected string not found in input # | ; CHECK: %a.sink = phi i32 [ %a, %if.then ], [ %b, %if.else ] # | ^ # | <stdin>:24:8: note: scanning from here # | if.end: ; preds = %if.else, %if.then # | ^ # | <stdin>:25:2: note: possible intended match here # | %b.sink = phi i32 [ %b, %if.else ], [ %a, %if.then ] # | ^ # | # | Input file: <stdin> # | Check file: C:\src\llvm-project\llvm\test\Transforms\GVNSink\sink-ignore-dbg-intrinsics.ll ``` According to the report, what the CheckFile wants to match is the `%a.sink`, however there is `%b.sink`. But this mismatch does not mean that this commit is wrong, since the occurrence of either `%a.sink` or `%b.sink` is correct. The root cause of this test failure is the strict check rule in the regression test committed. So I refined the regression test with a more general check rule to only detect whether there is an instruction with suffix `.sink` in the `if.end` block. Hope this won't fail the test. If this PR still fails to build, I will close this PR and try to find another right way to fix this.
-
Elvis Wang authored
With ShortFowrardBranchOpt(SFB) or ConditionalMoveFusion, scalar ICmp and scalar Select instructions will lower to SELECT_CC and lower to PseudoCCMOVGPR which will generate a conditional branch instruction and a move instruction. The cost of scalar (ICmp + Select) = (0 + Select instruction cost)
-
Daniel Grumberg authored
[clang][ExtractAPI] Remove symbols defined in categories to external types unless requested (#92522) rdar://128259890
-
Sven van Haastregt authored
-
Nikolas Klauser authored
Fixes #54705
-
hev authored
-
Chen Zheng authored
Perform bitcast lowering requires 64-bit to be native supported, However this is not true on 32-bit targets. Explicitly require 64-bit target. Fixes #92233
-
Fangrui Song authored
When the address pointer encoding in FDEs uses DW_EH_PE_absptr|DW_EH_PE_sdata4, the address is sign-extended to 64-bit by `readFdeAddr`. We should truncate the address to 32-bit for ELFCLASS32. Otherwise, `isInt<32>(pc - va)` could be false, leading to a spurious error in `getFdeData`. In LLVM, this appears a MIPS-specific issue. Fix #88852 Pull Request: https://github.com/llvm/llvm-project/pull/92438
-
YunQiang Su authored
FP32 is the only supported FPMode of mips1. FPXX requires MIPS2+ and FP64 requires MIPS32r2+.
-
YunQiang Su authored
MSA requires -mfp64. If FP64 is supported by CPU (mips32r2+), and no -mfp32/-mfpxx is explicitly given, let's add +fp64. Otherwise some cmd like clang --target=mips -mips32r5 -mmsa will issue LLVM backend ICE.
-
YunQiang Su authored
MSA registers share the FPRs as its bottom half. So that we can use MSA instructions to work with normal float/double: double a, b, c; asm volatile ("fmadd.d %w0, %w1, %w2" : "+f"(a) : "f"(b), "f"(c)); GCC has support it for quite long time. -
Fangrui Song authored
Commit 6c0665e2 (https://reviews.llvm.org/D45164) enabled certain constant expression evaluation for `MCObjectStreamer` at parse time (e.g. `.if` directives, see llvm/test/MC/AsmParser/assembler-expressions.s). `getUseAssemblerInfoForParsing` was added to make `clang -c` handling inline assembly similar to `MCAsmStreamer` (e.g. `llvm-mc -filetype=asm`), where such expression folding (related to `AttemptToFoldSymbolOffsetDifference`) is unavailable. I believe this is overly conservative. We can make some parse-time expression folding work for `clang -c` even if `clang -S` would still report an error, a MCAsmStreamer issue (we cannot print `.if` directives) that should not restrict the functionality of MCObjectStreamer. ``` % cat b.cc asm(R"( .pushsection .text,"ax" .globl _start; _start: ret .if . -_start == 1 ret .endif .popsection )"); % gcc -S b.cc && gcc -c b.cc % clang -S -fno-integrated-as b.cc # succeeded % clang -c b.cc # succeeded with this patch % clang -S b.cc # still failed <inline asm>:4:5: error: expected absolute expression 4 | .if . -_start == 1 | ^ 1 error generated. ``` However, removing `getUseAssemblerInfoForParsing` would make MCDwarfFrameEmitter::Emit (for .eh_frame FDE) slow (~4% compile time regression for sqlite3.c amalgamation) due to expensive `AttemptToFoldSymbolOffsetDifference`. For now, make `UseAssemblerInfoForParsing` false in MCDwarfFrameEmitter::Emit. Close #62520 Link: https://discourse.llvm.org/t/rfc-clang-assembly-object-equivalence-for-files-with-inline-assembly/78841 Pull Request: https://github.com/llvm/llvm-project/pull/91082
-
Jessica Clarke authored
For the amdgcn_*_buffer_load_lds intrinsics this field is later overriden, so avoid pointlessly calling MVT::getVT in that case. Importantly, this is also the only case I can find in tree where a PointerType is passed to MVT::getVT, so this will allow us to forbid doing so in future, keeping MVT::iPTR as originating solely from TableGen as was claimed next to its definition in MachineValueType.h (but lost in the autogeneration conversion).
-
Kazu Hirata authored
-
Mingming Liu authored
Revert "[ThinLTO] Populate declaration import status except for distributed ThinLTO under a default-off new option" (#92715) Reverts llvm/llvm-project#88024 Build bot failures (https://lab.llvm.org/buildbot/#/builders/259/builds/4727 and https://lab.llvm.org/buildbot/#/builders/9/builds/43876)
-
Nikita Popov authored
When calculating the exit count exhaustively, if any of the involved operations is non-deterministic, the exit count we compute at compile-time and the exit count at run-time may differ. Using these non-deterministic constant folding results is only correct if we actually replace all uses of the instruction with the value. SCEV (or its consumers) generally don't do this. Handle this by adding a new AllowNonDeterministic flag to the constant folding API, and disabling it in SCEV. If non-deterministic results are not allowed, do not fold FP lib calls in general, and FP operations returning NaNs in particular. This could be made more precise (some FP libcalls like fabs are fully deterministic), but I don't think this that precise handling here is worthwhile. Fixes the interesting part of https://github.com/llvm/llvm-project/issues/89885.
-
Chuanqi Xu authored
As the title suggests, the `ASTWriter:getTypeID` method is not used. This patch removes it.
-