521820 Commits

Author SHA1 Message Date
Florian Hahn
f9120dc2a6
[VPlan] Make sure vector trip count is ready for prepareToExecute (NFC)
Split off from https://github.com/llvm/llvm-project/pull/112145. This
ensures that getOrCreateVectorTripCount creates the trip count as needed
when induction resume value creation is moved to VPlan and no longer
creates the vector trip count early.
2024-12-16 20:44:20 +00:00
erichkeane
df0b34cbeb [OpenACC/NFC] Fix 'trailing objects' CRTP.
A previous patch mistakenly set the CRTP object for the trailing objects
incorrectly.  This patch fixes those.  This wasn't noticed in testing,
  since these types have the same layout.
2024-12-16 12:43:45 -08:00
Thurston Dang
1297933f35
[CodeGen] Disable ran-out-of-registers-error* tests (#120142)
Two tests are failing on the buildbot in stage2/asan with a stack
use-after-scope:
https://lab.llvm.org/buildbot/#/builders/52/builds/4533 (first failure
here; contains https://github.com/llvm/llvm-project/pull/119492 and
https://github.com/llvm/llvm-project/pull/119640)
    ...
    https://lab.llvm.org/buildbot/#/builders/52/builds/4550

This patch disables the tests for now, to allow the bots to return to
green (instead of reverting the patch series).
2024-12-16 12:39:03 -08:00
Andrzej Warzyński
9f1c8b13f1
[mlir][tensor][SVE] Add e2e test for tensor.pack targeting SVE (#119692) 2024-12-16 20:38:37 +00:00
Andrzej Warzyński
b558c6b288
[mlir][nfc] Update vectorize-tensor-extract.mlir (4/N) (#119697) 2024-12-16 20:38:19 +00:00
Andrzej Warzyński
58da789e72
[mlir][linalg] Fix and Refactor DecomposeOuterUnitDimsUnPackOpPattern (#119379) 2024-12-16 20:38:00 +00:00
QuietMisdreavus
1be4a67454
[ExtractAPI] reorder the module names in extension symbol graph file names (#119925)
Resolves rdar://140298287

ExtractAPI's support for printing Objective-C category extensions from
other modules emits symbol graphs with an
`ExtendedModule@HostModule.symbols.json`. However, this is backwards
from existing symbol graph practices, causing issues when these symbol
graphs are consumed alongside symbol graphs generated with other tools
like Swift. This PR flips the naming scheme to be in line with existing
symbol graph tooling.
2024-12-16 13:36:19 -07:00
Valentin Clement (バレンタイン クレメン)
f8656204d7
[flang][cuda] Do not lower device target in porgram as global (#120126)
As it was done in #102512, do not create global for arrays declared in
program unit with cuda data attribute.
2024-12-16 12:34:01 -08:00
Aiden Grossman
1751914a52
[Github] Add some additional system packages (#119988)
This patch adds some additional system packages to the CI container.
These are necessary for use in the new premerge workflows. The size
increase is not super small, but should be manageable with the size
increase being about 100MB.
2024-12-16 12:30:01 -08:00
Jonas Devlieghere
8f151f0f55
[lldb] Unify window resizing logic in command line driver
Unify the logic for window resizing in the command line driver. This was
prompted by the Windows bot not knowing about the ws_col field.
2024-12-16 12:22:25 -08:00
Alex MacLean
f9c8c01d38
[NVPTX] Aggressively try to replace image handles with references (#119730)
Even in cases where handles are supported, references are still
preferable for performance. This is because, a ref uses one
less register and can avoid the handle creating code associated with
taking the address of a tex/surf/sampler.
2024-12-16 11:53:30 -08:00
erichkeane
bfc2dbe02e [OpenACC] Implement data construct 'at least 1 of ... clauses' rule
All 4 of the 'data' constructs have a requirement that at least 1 of a
small list of clauses must appear on the construct.  This patch
implements that restriction, and updates all of the tests it takes to
do so.
2024-12-16 11:52:57 -08:00
Florian Hahn
89d5272841
[VPlan] Remove getPreheader(). (NFC)
The preheader is now the entry block, connected to the vector.ph.

Clean up after https://github.com/llvm/llvm-project/pull/114292.
2024-12-16 19:48:02 +00:00
fabrizio-indirli
b95dfa3920
[mlir][spirv] Fix LowerABIAttributesPass to generate EntryPoints for SPV1.4 (#118994)
- Extend the SPIRV::LowerABIAttributesPass to detect when the target env
is using SPIR-V ver >= 1.4, and in this case add all the functions'
interface storage variables to the spirv.EntryPoint calls, as required
by the spec of OpEntryPoint:
"_Before version 1.4, the interface’s storage classes are limited to the
Input and Output storage classes. Starting with version 1.4, the
interface’s storage classes are all storage classes used in declaring
all global variables referenced by the entry point’s call tree_."
- Fix: generate the replacement ops (spirv.AddressOf and .AccessChain)
in the order in which the associated variable appears in the function
signature

Signed-off-by: Fabrizio Indirli <Fabrizio.Indirli@arm.com>
2024-12-16 14:12:32 -05:00
Jonas Devlieghere
3dfc1d9b0b
[lldb] Use the terminal height for paging editline completions (#119914)
Currently, we arbitrarily paginate editline completions to 40 elements.
On large terminals, that leaves some real-estate unused. On small
terminals, it's pretty annoying to not see the first completions. We can
address both issues by using the terminal height for pagination.

This builds on the improvements of #116456.
2024-12-16 11:11:17 -08:00
Sergei Barannikov
696d120d09
[NVPTX] Pattern match texture/surface intrinsics (NFCI) (#119982)
Pull Request: https://github.com/llvm/llvm-project/pull/119982
2024-12-16 22:06:32 +03:00
Nick Desaulniers
750cb896ca
[libc][docs] Refresh landing page (#120122)
- Replace section on ABI Compatibility with a rephrased warning at the
top of
  the page.
- Add links to the Note.
- Update C and POSIX standards.
- Inline link to fuzzing.
2024-12-16 10:47:37 -08:00
Adrian Prantl
9ee454a57c [lldb] Fix RST table formatting 2024-12-16 10:42:37 -08:00
Simon Pilgrim
89e530a27c [CostModel[X86] Update shuffle non-pow-2 tests to not analyse shuffle(undef,undef)
Avoid shuffle patterns that can be folded away.
2024-12-16 18:32:13 +00:00
Simon Pilgrim
d7f3775977 [X86] combineEXTRACT_SUBVECTOR - fold extract_subvector(pshufd(v,i)) -> pshufd(extract_subvector(v,i))
Attempt to avoid unnecessary wide PSHUFD or VPERMILIPS/D instructions by pre-extracting the subvector source if thats its only use.
2024-12-16 18:32:12 +00:00
Petr Hosek
7bf3137c39
[libc] Breakup freelist_malloc into separate files (#119806)
This better matches the structure we use for the rest of libc.
2024-12-16 10:30:27 -08:00
Alexander Yermolovich
0a7e048667
[BOLT][DWARF][NFC] Minimize dwarf5-debug-names-gnu-push-tls-address.s (#120103)
Removed unnecessary parts from the .text section.
2024-12-16 09:54:00 -08:00
Mészáros Gergely
ef31141ebd
[clang-cl][flang][dxc] Fix opts exposed to clang-cl/dxc by mistake (#118640)
When these options were enabled for flang the visibility was also
extended to clang-cl and dxc. This was due to a
misunderstanding of the default value for `Visibility`.
2024-12-16 18:52:32 +01:00
Vitaly Buka
31272e4f83
[libc++] Update locale grouping tests (#119463)
Fixes #119047
2024-12-16 12:50:59 -05:00
Kazu Hirata
1dac0cd41f
[memprof] Use ListSeparator (NFC) (#120047)
ListSeparator from StringExtras.h is essentially the same as
FieldSeparator being removed in this patch.  ListSeparator returns the
empty string on the first use via "operator StringRef()".  It returns
", " on subsequent uses.
2024-12-16 09:41:16 -08:00
Kazu Hirata
4f279a5701
[Linalg] Migrate away from PointerUnion::{is,get} (NFC) (#120043)
Note that PointerUnion::{is,get} have been soft deprecated in
PointerUnion.h:

  // FIXME: Replace the uses of is(), get() and dyn_cast() with
  //        isa<T>, cast<T> and the llvm::dyn_cast<T>

I'm not touching PointerUnion::dyn_cast for now because it's a bit
complicated; we could blindly migrate it to dyn_cast_if_present, but
we should probably use dyn_cast when the operand is known to be
non-null.
2024-12-16 09:40:38 -08:00
Sander de Smalen
4032ce3413 Revert "[compiler-rt][AArch64] Allow platform-specific mangling of SME routines. (#119864)"
This reverts commit e0fb3acd8a0b2a9340b9b2ae370c84c98f1a5cc2.
2024-12-16 17:39:04 +00:00
erichkeane
fbb14dd977 [OpenACC] Implement 'use_device' clause AST/Sema
This is a clause that is only valid on 'host_data' constructs, and
identifies variables which it should use the current device address.
From a Sema perspective, the only thing novel here is mild changes to
how ActOnVar works for this clause, else this is very much like the rest
of the 'var-list' clauses.
2024-12-16 09:35:57 -08:00
Kazu Hirata
11d2911ef1 [lldb] Fix warnings
This patch fixes:

  third-party/unittest/googletest/include/gtest/gtest.h:1379:11:
  error: comparison of integers of different signs: 'const unsigned
  long' and 'const int' [-Werror,-Wsign-compare]
2024-12-16 09:34:08 -08:00
Justin Bogner
de401599b1
[HLSL] Add RWBuffer::Load(Index) (#117018)
This method is the same as `operator[]`, except that it returns a value
instead of a reference.
2024-12-16 09:31:24 -08:00
Simon Pilgrim
8217c2eaef
[VectorCombine] foldShuffleOfBinops - extend to handle icmp/fcmp ops as well (#120075)
Extend binary instructions matching to match compare instructions + predicate as well.
2024-12-16 17:23:04 +00:00
Renaud Kauffmann
9919295cfd
[mlir][gpu] Adding ELF section option to the gpu-module-to-binary pass (#119440)
This is a follow-up of #117246.

I thought then it would be easy to edit a DictionaryAttr but it turns
out that these attributes are immutable and need to be passed during the
construction of the gpu.binary Op.

The first commit was using the NVVMTargetAttr to pass the information.
After feedback from @fabianmcg, this PR now passes the information
through a new option of the gpu-module-to-binary pass.

Please add reviewers, as you see fit.
2024-12-16 09:09:41 -08:00
Schrodinger ZHU Yifan
f75c84674c
[libc] fix atomic and apply an explicit check on unique object representations (#119715) 2024-12-16 12:04:52 -05:00
Vedant Paranjape
b21fa18b44
[LoopVersioning] Add a check to see if the input loop is in LCSSA form (#116443)
Loop Optimizations expect the input loop to be in LCSSA form. But it
seems that LoopVersioning doesn't have any check to see if the loop is
actually in LCSSA form. As a result, if we give it a loop which is not
in LCSSA form but still correct semantically, the resulting
transformation fails to pass through verifier pass with the following
error.

Instruction does not dominate all uses!
%inc = add nsw i16 undef, 1
store i16 %inc, ptr @c, align 1

As the loop is not in LCSSA form, LoopVersioning's transformations leads
to invalid IR! As some instructions do not dominate all their uses.

This patch checks if a loop is in LCSSA form, if not it will call
formLCSSARecursively on the loop before passing it to LoopVersioning.

Fixes: #36998
2024-12-16 11:55:19 -05:00
Simon Pilgrim
0954c67d7a [DAG] visitFREEZE - only fold integer types to an all ones constant
ISD::isBuildVectorAllOnes can peek through bitcasts, so this can match against FP NAN (ish) data (e.g. double (bitcast i64 -1)) under certain circumstances - bail if the type isn't an integer and let bitcast folding handle it first.

Fixes #120093
2024-12-16 16:46:38 +00:00
Ramkumar Ramachandra
290f38cd1a
IR: fix getSwappedCmpPredicate() return type (#120097)
The change 51a895a (IR: introduce struct with CmpInst::Predicate and
samesign) missed a change to ICmpInst::getSwappedCmpPredicate(), which
intends to return a CmpPredicate, but returns a Predicate instead. Fix
this.
2024-12-16 16:29:21 +00:00
Hugo Trachino
3cbc73f71e
[MLIR][Arith] Add CeilFloorDivExpandOpsPatterns to conversion to LLVM (Reland) (#118839)
When running `convert-to-llvm`, `ceildiv` and `floordiv` ops, which do not
have direct llvm conversion pattern, would not get lowered to llvm
dialect. This patch adds CeilFloorDivExpandOpsPatterns to both
`convert-to-llvm` and `arith-to-llvm` (deprecated) lowering those ops to
lower level arith ops which can be lowered to llvm using LLVM
conversion.

Reland of https://github.com/llvm/llvm-project/pull/117305 after
buildbot failures.
See:
https://lab.llvm.org/buildbot/#/builders/80/builds/7168
https://lab.llvm.org/buildbot/#/builders/130/builds/7036
https://lab.llvm.org/buildbot/#/builders/138/builds/7290

Added dependence to ArithTransforms in ArithToLLVM. In previous
discussion, it has been suggested to move the
CeilFloorDivExpandOpsPatterns to ArithUtils but I think linking
ArithTransforms makes more sense as otherwise :
* ArithToLLVM needs a new dependency to ArithUtils
* ArithUtils needs new dependency to ArithTransforms or move the
patterns as well which will create more dependencies
* It creates lots of code motion which makes it hard to review.
2024-12-16 16:15:13 +00:00
Alexey Bataev
d1a7225076 [SLP]Check if the node must keep its original bitwidth
Need to check if during previous analysis the node has requested to keep
its original bitwidth to avoid incorrect codegen.

Fixes #120076
2024-12-16 08:01:22 -08:00
Slava Zakharin
2402bccc80
[flang] Turn SimplifyHLFIRIntrinsics into a greedy rewriter. (#119946)
This is almost an NFC, except that folding changed ordering
of some operations.
2024-12-16 08:00:29 -08:00
Slava Zakharin
f239922cdc
[flang] Enable hlfir.sum inlining by default. (#119937)
There is already a LIT test for hlfir.sum inlining that uses
the engineering option. I would like to keep the option
for short period of time to be able to revert
in case of performance regressions that I was not able to see.
2024-12-16 07:59:15 -08:00
Dmitry Vasilyev
d576021853
[lldb] Disable TestIOHandlerResizeNoEditline.py for Windows hosts (#120025)
See #120021 for details.
2024-12-16 19:52:30 +04:00
Florian Hahn
7bfcf93527
[SCEV] Use Step and Start to check if SCEVWrapPredicate is implied. (#118184)
A SCEVWrapPredicate A implies B, if
 * they have the same flag,
 * both steps are positive and
 * B's start and step are ULE/SLE (for NSUW/NSSW) than A's.

See https://alive2.llvm.org/ce/z/n2T4ss (first pair with known constants
as strides, second pair with variable strides).

Note that this is limited to steps of the same size, due to NSUW having
slightly different semantics than regular NUW. We should be able to
remove this restriction for NSSW (which matches NSW) in the future.

PR: https://github.com/llvm/llvm-project/pull/118184
2024-12-16 15:51:22 +00:00
Alexey Bataev
c53901405a [SLP][NFC]Add a test with incorrect bitwidth for the node, previously identified as non-shrinkable 2024-12-16 07:50:49 -08:00
Hari Limaye
9f63940a65
[AArch64] Handle ANY_EXTEND in BuildShuffleExtendCombine (#118308)
Handle ANY_EXTEND when combining a buildvector/shuffle of extended
operands, as we can safely ignore ANY_EXTENDS when checking if all signs
of the other extends are matching.
2024-12-16 15:49:09 +00:00
David Green
39c9dda1aa
[AArch64] Move SME_ZA_LDR and SME_ZA_STR into FIRST_TARGET_MEMORY_OPCODE. NFCI (#120091)
These opcodes are currently in the "strictfp" section. They should
either be in "memory", or moved into the generic ocodes.

Note that isTargetMemoryOpcode/FIRST_TARGET_MEMORY_OPCODE doesn't seem
to be used for anything at the moment.
2024-12-16 15:46:48 +00:00
Louis Dionne
4104906a23 [libc++] Revert new test for integral_constant that breaks CI
This commit reverts c3276a96d9 and 1901da32, which added a test to
ensure that type traits are derived from integral_constant. While that
is a fine test to add, the commit didn't go through a PR and as a result
it looks like some of our CI has been broken by it.

This should be an uncontroversial change, but let's re-land it via a PR
to get our usual CI coverage.
2024-12-16 10:41:16 -05:00
Nikita Popov
35d4f20098
[CMake] Use correct exports file for MLIR tools (#120079)
llvm_add_tool() currently does not respect the passed project and puts
all tools into LLVMExports.cmake. This means that we end up with
binaries like mlir-opt in LLVMExports.cmake instead of
MLIRTargets.cmake, where they should be.

Adjust llvm_add_tool() to take the project into account.
2024-12-16 16:27:25 +01:00
Aiden Grossman
76f258920d
[MLGO] Do not include urgent LRs in max cascade calculation (#120052)
A previous PR introduced a threshold where we would mask out a LR that
had been evicted a certain number of times to combat pathological
compile time cases with a somewhat adversarial model. However, this
patch did not take into account urgent LRs which led to compilation
failures when greedy would expect us to provide an eviction and we could
not due to the newly introduced logic.
2024-12-16 07:14:34 -08:00
Sudharsan Veeravalli
5c5f66937f
[RISCV] Add ISAInfoTest tests for a few XQCI extensions (#120060)
Missed out adding rv32 only support test checks for a few of the
extensions.
2024-12-16 20:40:50 +05:30
Krzysztof Drewniak
b3d392af5b
[mlir][tblgen] Fix bug around parsing optional prop-dict keys (#120045)
The printer for prop-dict would elide properties that had their default
value, such as optional properties that were not present. The parser
would similarly not raise an error if such a key was missing. However,
after not raising an error, the parser would attempt to convert the null
attribute to a property anyway, causing failures.

This commit fixes the issue and adds tests.
2024-12-16 07:10:17 -08:00