528207 Commits

Author SHA1 Message Date
Michael Flanders
cbd3801acf
[analyzer] Allow overriding Unknown memspaces using a ProgramState trait (#123003)
In general, if we see an allocation, we associate the immutable memory
space with the constructed memory region.
This works fine if we see the allocation.
However, with symbolic regions it's not great because there we don't
know anything about their memory spaces, thus put them into the Unknown
space.

The unfortunate consequence is that once we learn about some aliasing
with this Symbolic Region, we can't change the memory space to the
deduced one.

In this patch, we open up the memory spaces as a trait, basically
allowing associating a better memory space with a memregion that
was created with the Unknown memory space.

As a side effect, this means that now queriing the memory space of a
region depends on the State, but many places in the analyzer, such as
the Store, doesn't have (and cannot have) access to the State by design.

This means that some uses must solely rely on the memspaces of the
region, but any other users should use the getter taking a State.

Co-authored-by: Balazs Benics <benicsbalazs@gmail.com>
2025-02-22 12:37:00 +01:00
Hristo Hristov
c0d140353e
[libc++][docs][NFC] Update supported OpenXL version (#127072)
According to the documentation:
The base LLVM version was changed between minor versions: 
- 17.1.2 is based on LLVM17 
- 17.1.3 is based on LLVM19 
https://www.ibm.com/docs/en/openxl-c-and-cpp-aix/17.1.2?topic=whats-new
https://www.ibm.com/docs/en/openxl-c-and-cpp-aix/17.1.3?topic=whats-new

Co-authored-by: Hristo Hristov <zingam@outlook.com>
2025-02-22 13:18:07 +02:00
Florian Hahn
b74413bf91 [VPlan] Use VPSingleDef instead of VPValue in HCFG builder (NFC).
Use VPSingleDef to remove unneeded casts to a recipe type.
2025-02-22 11:15:37 +00:00
Mikhail Gudim
f5d153ef26
[VectorCombine] Fold binary op of reductions. (#121567)
Replace binary of of two reductions with one reduction of the binary op
applied to vectors. For example:

```
%v0_red = tail call i32 @llvm.vector.reduce.add.v16i32(<16 x i32> %v0)
%v1_red = tail call i32 @llvm.vector.reduce.add.v16i32(<16 x i32> %v1)
%res = add i32 %v0_red, %v1_red
```
gets transformed to:

```
%1 = add <16 x i32> %v0, %v1
%res = call i32 @llvm.vector.reduce.add.v16i32(<16 x i32> %1)
```
2025-02-22 06:11:33 -05:00
Kai Sasaki
8d5c1e61c6
[mlir][vector] Skip uniform vectorization for non scalar type (#128294) 2025-02-22 19:57:48 +09:00
Balazs Benics
db836edf47
Revert "[analyzer] Delay the checker constructions after parsing" (#128350)
Reverts llvm/llvm-project#127409

This caused a test failure:

LLVM Buildbot has detected a new failure on builder
`sanitizer-aarch64-linux-bootstrap-hwasan` running on
`sanitizer-buildbot11` while building `clang` at step 2 "annotate".

Full details are available at:
https://lab.llvm.org/buildbot/#/builders/55/builds/7431

<details>
<summary>Here is the relevant piece of the build log for the
reference</summary>

```
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using ld.lld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/ld.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 86643 tests, 72 workers --
Testing: 
FAIL: Clang :: Analysis/cxx11-crashes.cpp (1006 of 86643)
******************** TEST 'Clang :: Analysis/cxx11-crashes.cpp' FAILED ********************
Exit Code: 134

Command Output (stderr):
--
RUN: at line 1: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/lib/clang/21/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=core -std=c++11 -verify /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/clang/test/Analysis/cxx11-crashes.cpp
+ /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/lib/clang/21/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=core -std=c++11 -verify /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/clang/test/Analysis/cxx11-crashes.cpp
libc++abi: Pure virtual function called!
/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/tools/clang/test/Analysis/Output/cxx11-crashes.cpp.script: line 1: 1936960 Aborted                 /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/lib/clang/21/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=core -std=c++11 -verify /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/clang/test/Analysis/cxx11-crashes.cpp

--

********************
Testing: 
FAIL: Clang :: Analysis/stack-block-returned.cpp (1505 of 86643)
******************** TEST 'Clang :: Analysis/stack-block-returned.cpp' FAILED ********************
Exit Code: 134

Command Output (stderr):
--
RUN: at line 1: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/lib/clang/21/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=core -fblocks -verify /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/clang/test/Analysis/stack-block-returned.cpp
+ /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/lib/clang/21/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=core -fblocks -verify /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/clang/test/Analysis/stack-block-returned.cpp
libc++abi: Pure virtual function called!
/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/tools/clang/test/Analysis/Output/stack-block-returned.cpp.script: line 1: 1940139 Aborted                 /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/lib/clang/21/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=core -fblocks -verify /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/clang/test/Analysis/stack-block-returned.cpp

--

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. 
Slowest Tests:
--------------------------------------------------------------------------
59.70s: Clang :: Driver/fsanitize.c
48.34s: Clang :: Preprocessor/riscv-target-features.c
41.66s: Clang :: OpenMP/target_defaultmap_codegen_01.cpp
40.68s: Clang :: OpenMP/target_update_codegen.cpp
39.21s: Clang :: Driver/arm-cortex-cpus-2.c
38.19s: Clang :: Driver/arm-cortex-cpus-1.c
36.55s: Clang :: Preprocessor/arm-target-features.c
Step 11 (stage2/hwasan check) failure: stage2/hwasan check (failure)
...
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using ld.lld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/ld.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using lld-link: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/lld-link
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using ld64.lld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:512: note: using wasm-ld: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 86643 tests, 72 workers --
Testing: 
FAIL: Clang :: Analysis/cxx11-crashes.cpp (1006 of 86643)
******************** TEST 'Clang :: Analysis/cxx11-crashes.cpp' FAILED ********************
Exit Code: 134

Command Output (stderr):
--
RUN: at line 1: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/lib/clang/21/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=core -std=c++11 -verify /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/clang/test/Analysis/cxx11-crashes.cpp
+ /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/lib/clang/21/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=core -std=c++11 -verify /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/clang/test/Analysis/cxx11-crashes.cpp
libc++abi: Pure virtual function called!
/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/tools/clang/test/Analysis/Output/cxx11-crashes.cpp.script: line 1: 1936960 Aborted                 /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/lib/clang/21/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=core -std=c++11 -verify /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/clang/test/Analysis/cxx11-crashes.cpp

--

********************
Testing: 
FAIL: Clang :: Analysis/stack-block-returned.cpp (1505 of 86643)
******************** TEST 'Clang :: Analysis/stack-block-returned.cpp' FAILED ********************
Exit Code: 134

Command Output (stderr):
--
RUN: at line 1: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/lib/clang/21/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=core -fblocks -verify /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/clang/test/Analysis/stack-block-returned.cpp
+ /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/lib/clang/21/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=core -fblocks -verify /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/clang/test/Analysis/stack-block-returned.cpp
libc++abi: Pure virtual function called!
/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/tools/clang/test/Analysis/Output/stack-block-returned.cpp.script: line 1: 1940139 Aborted                 /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build_hwasan/lib/clang/21/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=core -fblocks -verify /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/clang/test/Analysis/stack-block-returned.cpp

--

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. 
Slowest Tests:
--------------------------------------------------------------------------
59.70s: Clang :: Driver/fsanitize.c
48.34s: Clang :: Preprocessor/riscv-target-features.c
41.66s: Clang :: OpenMP/target_defaultmap_codegen_01.cpp
40.68s: Clang :: OpenMP/target_update_codegen.cpp
39.21s: Clang :: Driver/arm-cortex-cpus-2.c
38.19s: Clang :: Driver/arm-cortex-cpus-1.c
36.55s: Clang :: Preprocessor/arm-target-features.c

```

</details>
2025-02-22 11:44:04 +01:00
Florian Hahn
26afa2deea [VPlan] Create VPInstructions after setting preds in HCFG builder (NFC)
Set VPBBs predecessors before creating VPInstructions, as setting
incoming values for non-header phis directly there will require
predecessors to be available.
2025-02-22 10:33:17 +00:00
Antonio Frighetto
93b263a01c [SimplifyCFG] Drop unused LockstepReverseIterator class (NFC)
Unmaintained code has been removed.
2025-02-22 11:26:13 +01:00
Kazu Hirata
34172bba11
[CodeGen] Avoid repeated hash lookups (NFC) (#128300) 2025-02-22 02:24:35 -08:00
Antonio Frighetto
48a6df3604 Reapply "[Utils] Consolidate LockstepReverseIterator into own header (NFC)"
Common code has been unified and generalized.

Original commit: 123dca9b56e1359d8ec7771ea3bd0afd4b1ea6af

Previously reverted due to accidentally merged incompletely. The issue has
been addressed by restoring missing code.
2025-02-22 11:21:36 +01:00
Jacek Caban
b09dfbd699
[LLD][COFF] Add support for x86_64 archives on ARM64X (#128241)
If the ECSYMBOLS section is missing in the archive, the archive could be
either a native-only ARM64 or x86_64 archive. Check the machine type of
the object containing a symbol to determine which symbol table to use.
2025-02-22 11:20:58 +01:00
Kazu Hirata
3747ba4847
[SPIRV] Avoid repeated hash lookups (NFC) (#128303) 2025-02-22 02:13:28 -08:00
Kazu Hirata
48bccee6b3
[Hexagon] Avoid repeated hash lookups (NFC) (#128302) 2025-02-22 02:13:16 -08:00
Kazu Hirata
94b810661a
[DebugInfo] Avoid repeated hash lookups (NFC) (#128301) 2025-02-22 02:13:02 -08:00
Kazu Hirata
7c7e11b0fd
[AMDGPU] Avoid repeated hash lookups (NFC) (#128298) 2025-02-22 02:09:48 -08:00
Kazu Hirata
8f7e34b0af
[clang-offload-packager] Avoid repeated hash lookups (NFC) (#128297) 2025-02-22 02:09:27 -08:00
Balazs Benics
f0088ee87c
[analyzer] Delay the checker constructions after parsing (#127409)
If we were to delay checker constructions after we have a filled
ASTContext, then we could get rid of a bunch of "lazy initializers" in
checkers.

Turns out in the register functions of the checkers we could transfer
the ASTContext and all other things to checkers, so those could benefit
from in-class initializers and const fields.

For example, if a checker would take the ASTContext as the first field,
then the rest of the fields could use it in their in-class initializers,
so the ctor of the checker would only need to set a single field!

This would open uup countless opportunities for cleaning up the
asthetics of our checkers.

I attached a single use-case for the AST and the PP as demonstrating
purposes. You can imagine the rest.

**FYI: This may be a breaking change** to some downstream users that may
had some means to attach different listeners and what not to e.g. the
Preprocessor inside their checker register functions. Since we delay the
calls to these register fns after parsing is already done, they would of
course miss the parsing Preprocessor events.
2025-02-22 10:52:31 +01:00
cooperp
f4e8f6da41
[Reassociate] Use a reference to DataLayout instead of copying the underlying string data (NFC) (#128269)
I noticed this when looking at all allocations by clang. For a medium
sized file this was around 6000 calls to operator new, although i
suspect there were more allocations in total as the SmallVectors in
DataLayout may have their own allocations in some cases.

In a follow-up i'm tempted to make the DataLayout copy constructor
private, to avoid this in future. There are a few tests which copy the
DataLayout, and perhaps need to (I didn't check yet), but we could
provide a clone() method for them if needed. Its only accidental copying
I think we should consider avoiding, not people who really do need to
copy it for reasons.
2025-02-22 10:37:24 +01:00
Devon Loehr
bac4171073
Remove xbegin and _xend (#126952)
`intrin.h` contains declarations for both `xbegin` and `_xend`, but they
should already be included transitively from `rtmintrin.h` via
`immintrin.h` and/or `x86intrin.h`. Having them in both places causes
problems if both headers are included.

Furthermore, the `intrin.h` declaration of `xbegin` seems to be bugged
anyway, since it's missing its leading underscore.

Fixes #95133
2025-02-22 16:46:08 +08:00
Andreas Jonson
876174ffd7 [InstCombine] Test for ephemeral nonnull load. (NFC) 2025-02-22 08:34:59 +01:00
Yingwei Zheng
126016b662
[InstCombine] Simplify nonnull pointers (#128111)
This patch is the follow-up of
https://github.com/llvm/llvm-project/pull/127979. It introduces a helper
`simplifyNonNullOperand` to avoid duplicate logic. It also addresses the
one-use issue in `visitLoadInst`, as discussed in
https://github.com/llvm/llvm-project/pull/127979#issuecomment-2671013972.
The `nonnull` attribute is also supported. Proof:
https://alive2.llvm.org/ce/z/MCKgT9
2025-02-22 15:30:04 +08:00
Sudharsan Veeravalli
60f3fdde88
[RISCV][Outliner] Use MCRegister. NFC (#128291) 2025-02-22 12:46:03 +05:30
Timm Baeder
2c00b3b859
[clang][bytecode] Silently reject ctors of invalid decls (#128290)
The follow-up diagnostic would otherwise be:

array.cpp:111:33: note: undefined constructor '(unnamed struct at
array.cpp:111:11)' cannot be used in a constant expression
array.cpp:111:11: note: declared here
  111 | constexpr struct { Unknown U; } InvalidCtor;
      |           ^

... and complaining about the undefined constructor of a class that is
invalid anyway doesn't make much sense.
2025-02-22 08:01:56 +01:00
Christian Sigg
c645981f2d [mlir][bazel] Port ab166d4d10
Second attempt.
2025-02-22 07:42:56 +01:00
Uday Bondhugula
86ef031b64
[MLIR][Affine] Fix affine memory op verifiers to check valid dim/symbols properly (#127375)
The checks only checked if the operands were either valid dims and
symbols without checking which ones should be valid dims and which
should be valid symbols. The necessary methods to check already existed.

With this fix, for some existing tests, it leads to a more accurate
error message. In other cases, invalid IRs are caught as shown in the
test case added.

Related to: https://github.com/llvm/llvm-project/issues/120189
2025-02-22 11:43:14 +05:30
Craig Topper
39d1bd8586 [RISCV] Remove unused VPseudo tablegen class. NFC
I think this was once used for whole register move pseudos that we
deleted a while ago.
2025-02-21 22:10:09 -08:00
Ayokunle Amodu
dc72a93d2b
[MLIR][Affine] Add check for 'affine.for' Bound Map Results (#127105)
Fixes issue #120001.

Add missing check in affine.for op's verifier for lower/upper bound maps
to have at least one result.
2025-02-22 11:32:22 +05:30
Craig Topper
444859634f
[MachineVerifier] Use Register instead of unsigned for DenseSet key. NFC (#128234) 2025-02-21 21:25:21 -08:00
Owen Pan
ffc61dc393
[clang-format] Allow specifying the language for .h files (#128122)
Closes #128119
2025-02-21 20:46:43 -08:00
Kazu Hirata
434d86ac92 [lldb] Fix warnings
This patch fixes:

  lldb/tools/lldb-dap/lldb-dap.cpp:5184:9: error: 'scoped_lock' may
  not intend to support class template argument deduction
  [-Werror,-Wctad-maybe-unsupported]

  lldb/tools/lldb-dap/lldb-dap.cpp:5200:7: error: 'unique_lock' may
  not intend to support class template argument deduction
  [-Werror,-Wctad-maybe-unsupported]

  lldb/tools/lldb-dap/lldb-dap.cpp:5222:5: error: 'scoped_lock' may
  not intend to support class template argument deduction
  [-Werror,-Wctad-maybe-unsupported]

  lldb/tools/lldb-dap/lldb-dap.cpp:5236:3: error: 'unique_lock' may
  not intend to support class template argument deduction
  [-Werror,-Wctad-maybe-unsupported]
2025-02-21 20:37:16 -08:00
Yingwei Zheng
646e4f2eed
[DAGCombiner] visitFREEZE: Early exit when N is deleted (#128161)
`N` may get merged with existing nodes inside the loop. Early exit when
it is deleted to avoid the crash.
Alternative solution: use `DAGNodeDeletedListener` to refresh the value
of N.

Closes https://github.com/llvm/llvm-project/issues/128143.
2025-02-22 12:06:34 +08:00
Yingwei Zheng
3ec83f5774
[X86][DAGCombiner] Fix assertion failure in combinei64TruncSrlAdd (#128194)
Closes https://github.com/llvm/llvm-project/issues/128158.
2025-02-22 12:05:59 +08:00
John Harrison
998b28f196
[lldb-dap] Refactoring lldb-dap port listening mode to allow multiple connections. (#116392)
This adjusts the lldb-dap listening mode to accept multiple clients.
Each client initializes a new instance of DAP and an associated
`lldb::SBDebugger` instance.

The listening mode is configured with the `--connection` option and
supports listening on a port or a unix socket on supported platforms.

When running in server mode launch and attach performance should
be improved by lldb sharing symbols for core libraries between debug
sessions.
2025-02-21 18:30:43 -08:00
Matt Arsenault
1bb43068f1
PeepholeOpt: Allow introducing subregister uses on reg_sequence (#127052)
This reverts d246cc618adc52fdbd69d44a2a375c8af97b6106. We now handle
composing subregister extracts through reg_sequence.
2025-02-22 09:16:14 +07:00
Valentin Clement (バレンタイン クレメン)
93b2e47f12
[flang][cuda] Avoid assign element mismatch when doing data transfer from a constant (#128252)
Currently when we do a CUDA data transfer from a constant, we embox it
and delegate the assignment to the runtime. When the type of the
constant is not exactly the same as the destination descriptor, the
runtime will emit an assignment mismatch error.

Convert the constant when necessary so the assignment is fine.
2025-02-21 17:46:46 -08:00
Sebastian Pop
5f8da7e773
[DA] remove wrap-around check from affine definition (#116632)
Fix https://github.com/llvm/llvm-project/issues/51512
by reverting a part of commit
c0661aeaf8
that modified the definition affine subscripts.
2025-02-21 18:17:02 -06:00
Mosè Giordano
d175aed4fd
[Tosa] Add necessary unordered_map header file (#128248)
Ref:
https://github.com/llvm/llvm-project/pull/126992#discussion_r1966320748
2025-02-21 18:01:11 -06:00
Oleksandr T.
7cfab6c4eb
[HLSL] add parentheses in assertion to eliminate -Wparentheses warning (#128246)
Fixes #128210
2025-02-22 01:56:38 +02:00
Philip Reames
aef63c506b
[RISCV] Assembler support for XRivosVizip (#127694)
This implements assembler support for the XRivosVizip custom/vendor
extension from Rivos Inc. which is defined in:
https://github.com/rivosinc/rivos-custom-extensions (See
src/xrivosvizip.adoc)

Codegen support will follow in a separate change.
2025-02-21 15:44:33 -08:00
Zahi Moudallal
5d0c5c638a
[MLIR][ARITH] Adds missing foldings for truncf (#128096)
This patch is mainly to deal with folding `truncf`, as follows:
`truncf(extf(a))` -> `a`, if `a` has the same bitwidth as the result
`truncf(extf(a))` -> `truncf(a)`, if `a` has larger bitwidth than the
result
2025-02-21 15:37:19 -08:00
Valentin Clement (バレンタイン クレメン)
6038fd44d4
[flang][cuda] Lower atomiccas, atomicxor and atomicexch (#128242)
Lower atomiccas, atomicxor and atomicexch to corresponding llvm atomic
operations.
2025-02-21 15:12:52 -08:00
Alexey Bataev
8ffdc3b207 [SLP]Fix a crash when checking a scalar in a reordered buildvector node
Need to check reordered scalars, not the original ones, to correctly
check proper scalar.
2025-02-21 14:59:43 -08:00
Teresa Johnson
92e02ad9dc
[MemProf] Display backedges with dotted line in dot graphs (#128235)
Add checking of this behavior in the postbuild dot graphs, facilitated
by PR128226 which marked these edges at the end of the graph building.
2025-02-21 14:49:28 -08:00
Alex MacLean
79261d4aab
[NVPTX][InferAS] assume alloca instructions are in local AS (#121710) 2025-02-21 14:32:54 -08:00
Tom Stellard
ca0406dd1c
DeveloperPolicy: Update commit access requirements (#127006)
See https://discourse.llvm.org/t/rfc-commit-access-criteria/84073
2025-02-21 14:29:59 -08:00
Joseph Huber
6b3e7657cf
[libc] Enable 'strftime' for the GPU targets (#128220)
Summary:
These should allow us to build with locale support for libcxx.
2025-02-21 16:29:15 -06:00
Michael Jones
7f5a2cbe76
[libc][bazel] add targets to build the scanf family (#128082)
Now that scanf is a little cleaner, this patch adds rules to build it
via bazel.
2025-02-21 14:27:04 -08:00
Brox Chen
61c6e0061c
[AMDGPU][True16][CodeGen] flat/global/scratch load/store pseudo for true16 (#127945)
T16D16 table is implemented in
https://github.com/llvm/llvm-project/pull/127673

this is a follow up patch to add load/store pseudo for:
flat_store 
global_load/global_store
scratch_load/scratch_store

in true16 mode and updated the codegen test file
2025-02-21 17:06:48 -05:00
Jerry-Ge
2b06ceebb5
[mlir][tosa] Align operator descriptions with the spec (#128046)
This commit aligns the operator descriptions to the v1.0 spec
(https://www.mlplatform.org/tosa/tosa_spec.html)

Co-authored-by: Peng Sun <[peng.sun@arm.com](mailto:peng.sun@arm.com)>
Signed-off-by: Luke Hutton
<[luke.hutton@arm.com](mailto:luke.hutton@arm.com)>

Signed-off-by: Luke Hutton <luke.hutton@arm.com>
Co-authored-by: Luke Hutton <luke.hutton@arm.com>
Co-authored-by: Peng Sun <peng.sun@arm.com>
2025-02-21 13:15:51 -08:00
Vincent Lee
74084ae731
[FatLTO] Allow -fno-fat-lto-objects to override -ffat-lto-objects (#128157)
For builds that cannot be easily modified and enabled with
`-ffat-lto-objects`, `-fno-fat-lto-objects` acts as an escape hatch to
disable this option (which is standard to how clang and lld flags are
used).
2025-02-21 13:15:03 -08:00