4606 Commits

Author SHA1 Message Date
Michael Kruse
26697f4d07
[Polly] Correct integer comparison bit width (#190493)
For making an integer compareable to bool, don't compare it to bool.

Bug occured during the reduction of #190459
2026-04-06 01:09:51 +00:00
Michael Kruse
f959327bc8
[Polly][NFC] Convert ScopBuilder::buildUnsignedConditionSets() to isl++ (#190487) 2026-04-04 21:01:20 +00:00
Florian Hahn
ff4c6fe24e
[SCEV] Move NoWrapFlags definition outside SCEV scope, use for SCEVUse. (#190199)
The patch moves out of SCEV's scope so they can be re-used for SCEVUse.
SCEVUse gets an additional getNoWrapFlags helper that returns the union
of the expressions SCEV flags and the use-specific flags.

SCEVExpander has been updated to use this new helper.

In order to avoid other changes, the original names are exposed via
constexpr in SCEV. Not sure if there's a nicer way. One alternative
would be to define the enum in struct, and have SCEV inherit from it.

The patch also clarifies that the SCEVUse flags encode NUW/NSW, and
hides getInt, setInt, etc to avoid potential mis-use.

PR: https://github.com/llvm/llvm-project/pull/190199
2026-04-04 15:03:36 +00:00
Michael Kruse
fb3fada084
[Polly][NFC] Convert ScopBuilder::getPwAff() to isl++ (#190458) 2026-04-04 13:20:15 +00:00
Michael Kruse
47d8003948
[Polly][NFC] Use factory pattern (#190456)
To (theoretically) reduce coupling of Scop and ScopBuilder.
2026-04-04 12:49:13 +00:00
Michael Kruse
948a64720b
[Polly] Assumptions used to derive domain must not be pruned by that domain (#190436)
The code that emits the conditions for whether a statement is executed
by checking whether we are in the statement's domain may apply
assumptions (such as an integer truncation being reversible). Later code
then assumes that these assumptions are only relevent for then the
statement is executed, but actually it is used for determining whether
it is executed.

Break this circular reasoning by introducing an `IsInsideDomain` flag
that can be set when the domain has not been verified yet.

Fixes #190128

Thanks to @thapgua for the bug report
2026-04-04 13:42:04 +02:00
Florian Hahn
7edf8a7b51
[SCEV] Replace some hasFlags calls with hasNo(Un)SignedWrap (NFC). (#190352)
This is slightly more compact and reduces diff when switching to enum
class (https://github.com/llvm/llvm-project/pull/190199).

PR: https://github.com/llvm/llvm-project/pull/190352
2026-04-03 16:09:40 +00:00
Michael Kruse
bed2761bc0
[Polly] Print params with stmt tracing (#189362)
It was helpful for #189350.
2026-04-02 10:51:39 +00:00
Michael Kruse
7fb4f732f5
[Polly] Avoid __builtin_assume circular context reasoning (#189350)
The conversion of SCEVs to isl::pw_aff may only be valid under
conditions that have to be confirmed via RTC. This also happens with
__builtin_assume. These user-added assumptions are then added to
ScopInfo::Context. However, the conclusion in ScopInfo::Context is then
also used to simplify ("gist") its own RTC preconditions in
ScopInfo::AssumedContext and ScopInfo::InvalidContext away.

Avoid by adding user assumptions with preconditions to
ScopInfo::DefinedBehaviourContext instead, which is not used to simplify
AssumedContext/InvalidContext.

Fixes #187922

Thanks @thapgua for the report
2026-03-30 11:08:23 +00:00
Michael Kruse
458f1aae8d
[Polly] Forward VFS from PassBuilder for IO sandboxing (#188657)
#184545 default-enables the IO sandbox in assert-builds. This causes
Clang using Polly to crash (#188568).

The issue is that `PassBuilder` uses `vfs::getRealFileSystem()` by
default which is considered a IO sandbox violation in the Clang process.
With this PR store the VFS from the `PassBuilder` from the original
`registerPollyPasses` call for creating other `PassBuilder` instances.

This PR also adds infrastructure for running Polly in `clang` (in
addition in `opt`). `opt` does not enable the sandbox such that we need
separate tests using Clang.

Closes: #188568
2026-03-28 23:55:05 +01:00
Michael Kruse
bd6e8a8c66
[Polly] Update isl to isl-0.27-89-gdc16f8e3 (#188013)
Update isl to include

https://repo.or.cz/isl.git/commit/ee3677039011f2f87f3630f8b2a004f9e4944a08
which fixes #187216

Closes #187216

Thanks @skimo-openhub for the fix and @thapgua for the bugreport.
2026-03-23 11:04:21 +00:00
Alexis Engelke
0d05c882ce
[Support] Use block numbers for LoopInfo BBMap (#103400)
Replace the DenseMap from blocks to their innermost loop a vector
indexed by block numbers, when possible. Supporting number updates is
not trivial as we don't store a list of basic blocks, so this is not
implemented.

NB: I'm generally not happy with the way loops are stored. As I think
that there's room for improvement, I don't want to touch the
representation at this point.

Pull Request: https://github.com/llvm/llvm-project/pull/103400
2026-03-19 11:18:06 +01:00
Alexis Engelke
bfedc2aa76
[Polly][NFC] Drop uses of BranchInst (#187301) 2026-03-18 16:46:28 +01:00
Alexis Engelke
43ec60eee5
Reland "[DomTree] Assert non-null block for pre-dom tree" (#187005)
Reland #186790 with fix for SCEV. A loop can have more than one latch,
in which case getLoopLatch returns null.
2026-03-17 14:10:04 +00:00
Alexis Engelke
e30aa40aa6
Revert "[DomTree] Assert non-null block for pre-dom tree" (#186831)
Reverts llvm/llvm-project#186790

Breaks buildbots, there are more SLPVectorizer problems.

https://lab.llvm.org/buildbot/#/builders/52/builds/15810
2026-03-16 17:29:35 +01:00
Alexis Engelke
d4c22859db
[DomTree] Assert non-null block for pre-dom tree (#186790)
In a pre-dominator tree, blocks should never be null.
2026-03-16 16:07:49 +01:00
Alexis Engelke
36041192cf
[IR] Don't allow successors() over block without terminators (#186646)
There's no point constructing a dominator tree or similar on
known-broken IR. Generally, functions should be able to assume that IR
is valid (i.e., passes the verifier). Users of this "feature" were:

- Verifier, fixed by verifying existence of terminators first.
- FuzzMutate, worked around by temporarily inserting terminators.
- OpenMP to run analyses while building the IR, worked around by
temporarily inserting terminators.
- Polly to work with an empty dominator tree, fixed by temporarily
adding an unreachable inst.
- MergeBlockIntoPredecessor, inadvertently, fixed by adding terminator
before updating MemorySSA.
- Some sloppily written unit tests.
2026-03-15 20:34:38 +00:00
Florian Hahn
f8734a5e10
[SCEV] Introduce SCEVUse, use it instead of const SCEV * (NFCI). (#91961)
This patch introduces SCEVUse, which is a tagged pointer containing the
used const SCEV *, plus extra bits to store NUW/NSW flags that are only
valid at the specific use.

This was suggested by @nikic as an alternative
to https://github.com/llvm/llvm-project/pull/90742.

This patch just updates most SCEV infrastructure to operate on SCEVUse
instead of const SCEV *. It does not introduce any code that makes use
of the use-specific flags yet which I'll share as follow-ups.

Compile-time impact: https://llvm-compile-time-tracker.com/compare.php?from=ee34eb6edccdebc2a752ffecdde5faae6b0d5593&to=5a7727d7819414d2acbc5b6ab740f0fc2363e842&stat=instructions%3Au
2026-03-13 16:23:06 +00:00
Michael Kruse
42b4dce07c
[Polly] Use GenDT in assertion (#186164)
`DT` is always the analysis for the to-be-optimized function while
`GenDT` is the analysis of the function that we currently generate code
for, which can also be an outlined function. Here, we want to check
dominance in the generated code, hence we must use `GenDT`.

#179433 already fixed the same issue for `BlockGenerator`. The same
pattern is used in `RegionGenerator` which is fixed here. A good
argument to avoid code duplication.

Fixes: #185313

Thanks to @jaschiu for the bug report and reproducer
2026-03-12 16:36:19 +00:00
Michael Kruse
e6aafae828
[Polly] Update isl to isl-0.27-86-gcf471c16 (#184044)
Update isl to include
https://repo.or.cz/isl.git/commit/d1b49851aca59c1edd01cb1dc97674e6d79d07af
which fixes #180958

Closes #180958

Thanks @skimo-openhub for the fix and @thapgua for the bugreport.
2026-03-01 22:06:59 +00:00
Michael Kruse
8e8974e5eb
[Polly] Update isl to isl-0.27-82-g38cf72a4 (#182786)
Update isl to include
https://repo.or.cz/isl.git/commit/38cf72a41b708475fc22dc9fc62c7caae1ac29f6
which fixes #179993. This changes some string representations of ISL
objects in tests which are updated.

Fixes #179993

Thanks @skimo-openhub for the fix and @thapgua for the bugreport.
2026-02-23 01:09:36 +01:00
Alexis Engelke
b82c7fc652
[CMake][LLVM] Add PCH infrastructure and LLVMSupport PCH (#176420)
This patch implements PCH support. PCH is enabled by default, unless
noted below, and can be disabled with
-DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON.

* Libraries can define precompiled headers using a newly added
PRECOMPILE_HEADERS keyword. If specified, the listed headers will be
compiled into a pre-compiled header using standard CMake mechanisms.

* Libraries that don't define their own PRECOMPILE_HEADERS but directly
depend on a library or component that defines its own PCH will reuse
that PCH. This reuse is not transitive to prevent excessive use of
unrelated headers. If multiple dependencies provide a reusable PCH, the
first one with the longest dependency chain (stored in the CMake target
property LLVM_PCH_PRIORITY) is used. However, due to CMake limitations,
only PCH from targets that are already defined can be reused; therefore
libraries that should reuse a PCH must be defined later in the CMake
file (=> add_subdirectory order matters).

* Libraries and executables can prevent PCH reuse with the keyword
DISABLE_PCH_REUSE. This both prevents reuse from dependencies and reuse
by other dependants. This is useful when, e.g., internal headers are
used in the PCH or the used headers are unlikely to provide benefits for
dependants.

* Precompiled headers are only used for C++ sources, not for C.

* With GCC, PCH provide very little benefits (tested with GCC 14 and 15)
due to increased template instatiation costs, but substantially increase
max-rss and build directory size. Therefore, disable PCH with GCC by
default; this can be explicitly overridden on the command line with
-DCMAKE_DISABLE_PRECOMPILE_HEADERS=OFF.

* With ccache and non-Clang compilers, changes in macro definitions are
not always accurately forwarded with ccache's preprocessed mode. To be
on the safe side, when ccache is enabled, disable PCH with all non-Clang
compilers; this can be explicitly overridden.

* With sccache, changes in macro definitions are not identified, which
in some cases can lead to false positive cache hits. Conservatively
disable PCH with sccache by default.

* Add a base PCH to LLVMSupport, which includes widely used standard
library and Support+ADT headers. The pch.h is placed in include so that
later PCH headers can extend that list of headers.

* Flang PCH use is ported to the general mechanism.

Addition of PCH headers for other components (e.g., IR, CodeGen) will be
posted as separate PRs.

RFC:
https://discourse.llvm.org/t/rfc-use-pre-compiled-headers-to-speed-up-llvm-build-by-1-5-2x/89345
2026-02-20 12:07:18 +01:00
Michael Kruse
d5607ad55c
[Polly][ScopInfo] Lazy Scop instantiation (#179535)
The old NPM was using ScopInfo pass introduced in
https://reviews.llvm.org/D20962, which in contrast to the LPM was using
ScopInfoRegionPass. ScopInfo was instantiating all Scop objects
immediately. After codegenning, all Scop objects need to be recomputed
anyway, making this approach wastful. The PhaseManager inherited this
behaviour from the NPM, leading to some concerns.

Replace the instantiate-all behavior of ScopInfo with an on-demand
instantiation. SCoPs now must be iterated using ScopDetection instead
using ScopInfo, but only some unsed legacy NPM passes (now removed) were
doing that anyway.
2026-02-16 23:28:51 +01:00
Michael Kruse
3272ba7b8f
[Polly] Honor 'scops' phase being disabled (#180380)
`opt -passes=polly-custom<detect>`, or `stopafter=detect` would still
run the ScopInfo analysis even though it should run when explicitly
enabled or required by another phase.
2026-02-16 11:00:49 +01:00
Shilei Tian
70905e0afa
[RFC][IR] Remove Constant::isZeroValue (#181521)
`Constant::isZeroValue` currently behaves same as
`Constant::isNullValue` for all types except floating-point, where it
additionally returns true for negative zero (`-0.0`). However, in
practice, almost all callers operate on integer/pointer types where the
two are equivalent, and the few FP-relevant callers have no meaningful
dependence on the `-0.0` behavior.

This PR removes `isZeroValue` to eliminate the confusing API. All
callers are changed to `isNullValue` with no test failures.

`isZeroValue` will be reintroduced in a future change with clearer
semantics: when null pointers may have non-zero bit patterns,
`isZeroValue` will check for bitwise-all-zeros, while `isNullValue` will
check for the semantic null (which
may be non-zero).
2026-02-15 12:06:42 -05:00
Michael Kruse
ac57c4a728
[Polly] Update isl to isl-0.27-78-gfc484e00 (#180377)
Update isl to include
https://repo.or.cz/isl.git/commit/fc484e004200964f8f18249de1f510393ec924a9
which fixes #180000.

The isl update also fixes #34710 which had the same cause but with an
empty access domain (#180000 has an empty statement domain). Thus we
also revert 163cacb46960be4dd0d8562737bbf0ea97cb14ad which now only adds
unnecessary overhead.

A regression test has been added to isl which is why we do not add a
test in Polly.

Fixes: #180000

Thanks @skimo-openhub for the fix and @thapgua for the bugreport.
2026-02-08 00:30:33 +01:00
Michael Kruse
0f88b5da06 [Polly] LLVM_DEBUG -> POLLY_DEBUG 2026-02-03 21:18:46 +01:00
Michael Kruse
9ceb6a8b40 [Polly][NFCI] Avoid R-value modification 2026-02-03 12:34:12 +01:00
Michael Kruse
347e21a244
[Polly] Use GenDT in assertion (#179433)
`DT` is always the analysis for the to-be-optimized function while
`GenDT` is the analysis of the function that we currently generate code
for which can also be an outlined function. Here, we want to check
dominance in the generated code, hence we must use `GenDT`.

Fixes: #179135
2026-02-03 11:10:54 +00:00
Michael Kruse
cdab38f776
[Polly] Update isl to isl-0.27-77-g99a07a03 (#179350)
Update isl to include
https://repo.or.cz/isl.git/commit/99a07a039237f11bccc1ef80a7b6cc76ae5f98c5
which fixes #177808

Thanks @skimo-openhub for the fix and @Andarwinux for the crash report

Fixes: #177808
2026-02-02 23:02:03 +00:00
Michael Kruse
bba5371e32 [Polly][CI] Add ScriptedBuilder scripts
Add ScriptedBuilder-equivalents of the current PollyBuilder-based
buildbots.
2026-02-01 02:31:38 +01:00
Michael Kruse
e509974d42 [Polly][CI] Unconditionally delete test-suite build
The test-suite should be recompiled every time, even in incremental
builds.
2026-01-29 15:00:25 +01:00
Michael Kruse
85812fde9e
[Polly][DeLICM] Check for error state (#178281)
When the ISL max-operations is exceeded, `is_wrapping` will return an
error state. Propagate the error state to the caller.

Fixes #175953
2026-01-27 19:37:41 +00:00
Michael Kruse
e5d235831d
[Polly] Reject scalable vector types (#177871)
Polly currently does not consider types without fixed length, which can
be encountered if an input source uses e.g. ARM SVE builtins. Such
programs have already been optimized manually. Non-fixed type lengths
also add to the difficulty of dependency analysis. Skip such types
entirely for now.
 
Fixes: #177859
2026-01-25 20:08:45 +00:00
Michael Kruse
dcb6e15a83 [Polly] Avoid dependence on x86 backend
Unbreak the polly-arm-linux buildbot.
2026-01-24 20:04:15 +01:00
Michael Kruse
8dcc9b6355
[Polly] Update isl to isl-0.27 (#177776)
Fixes: #177527

Updated test cases:

* CodeGen/OpenMP/matmul-parallel.ll, ScheduleOptimizer/pattern-matching-based-opts.ll
  Before the update, ISL bailed out the dependency computation due to
  hitting the max operation limit. The commit
  https://repo.or.cz/isl.git/commit/4bdfe2567715c5d1a8287c07d8685eb3db281e32
  seems to have reduced the complexity needed of the dependency
  computation, thus now being able to recognize some loops as parallel.
  The tests were checking that the outer loop is not parallel, but some
  inner loops can be parallized, particularly the array packing loops.

 * DeLICM/reduction_looprotate_hoisted.ll
   changes in how isl generates expressions

 * ScheduleOptimizer/pattern-matching-based-opts_5.ll
   changes in how isl generates expressions, and AST node changes
2026-01-24 17:07:21 +01:00
Florian Hahn
3fb914d851
[SCEV] Add initial support for ptrtoaddr. (#158032)
Add initial support for PtrToAddr to SCEV, including a new
SCEVPtrToAddrExpr and SCEV expansion support for it.

PR: https://github.com/llvm/llvm-project/pull/158032
2026-01-16 11:58:04 +00:00
Karthika Devi C
bf845a4364
[Polly] Add null pointer check before size retrieval (#174309)
This patch avoids assertion failures by ensuring a null pointer check is
performed before accessing the object's size.
Note: The corresponding test case remains too large even after
reduction, so it has not been included in this patch.

Fixes #174147
2026-01-14 19:49:19 +05:30
Michael Kruse
c55c2ab806
[Buildbot][Polly] Move polly-x86_64-linux-test-suite build instructions into main repository (#166809)
Allow the main llvm-project repository to contain the buildbot builder
instructions, instead of storing them in llvm-zorg. The corresponding
llvm-zorg PR is https://github.com/llvm/llvm-zorg/pull/648.

Using polly-x86_64-linux-test-suite as a proof-of-concept because that
builder is currently offline, I am its maintainer, and is easier to
build than an configuration supporting offload. Once the design has been
decided, more builders can follow.

Advantages are:
* It is easier to make changes in the llvm-project repository. There are
  more reviewers than for the llvm-zorg repository.
* Buildbot changes can be made in the same PR with changes that require
  updating the buildbot, e.g. changing the name of a CMake option.
* Configuration changes take effect immeditately when landing; no
  buildbot master restart needed.
* Some builders store a CMake cache file in the llvm-project repository
  for the reasons above. However, the number of changes that can be made
  with a CMake cache file alone are limited.

Compared to AnnotatedBuilder, advantages are:
* Reproducing a buildbot configuration locally made easy: just execute
  the script in-place. No llvm-zorg, local buildbot worker, or buildbot
  master needed.
* Same for testing a change of a builder before landing it in llvm-zorg.
  Doing so with an AnnotatedBuilder requires two llvm-zorg checkouts:
  One for making the change of the builder script itself, which then is
  pushed to a private llvm-zorg branch on GitHub, and a second that is
  modified to fetch that branch instead of
  https://github.com/llvm/llvm-zorg/tree/main.
* The AnnotatedBuilder scripts are located in the llvm-zorg repository
  and the buildbot-workers always checkout is always the top-of-trunk.
  This means that a buildbot configuration is split over three checkouts:
     * The checkout of llvm-project to be tested
     * The checkout of llvm-zorg by the buildbot-worker fetches; always the
        top-of-trunk, i.e may not match the revision of llvm-project that is
        executed (such as the CMake cache files located there), especially when
        using the "Force build" feature.
     * The checkout of llvm-zorg that the buildbot-master is running, which
       is updated only when the master is manually restarted.
* The "Force Build" feature also allows for test-building any
  llvm-project PR. This is correctly handled by zorg's
  `addGetSourcecodeSteps`, but does not work with AnnotatedBuilders that
  checkout the llvm-project source on their own.

The goal is to move as much as possible into the llvm-project repository
such that there cannot be a mismatch between checkouts of different
repositories. Ideally, the buildbot-master only needs to be
updated+restarted for adding/removing workers, not for build
configuration changes.

---------

Co-authored-by: Jan Patrick Lehr <jp.lehr@gmail.com>
2026-01-07 10:02:04 +01:00
Michael Kruse
af3a0e61f4
[Polly] Allow changing array dims when importing JScop (#174582)
This is in preparation to avoid relying on GEPs to derive dependency
information; Clang will eventually emit `ptradd` instead of
`getelementptr`.
2026-01-06 13:07:03 +00:00
Alexis Engelke
f54df0d09e
[LLVM][NFC] Move PassPlugin from Passes to separate library
This avoid pulling in the entire Passes library with all passes as
dependencies when just referring to PassPlugin, which is in fact
independent of the Passes themselves.

Pull Request: https://github.com/llvm/llvm-project/pull/173279
2025-12-22 18:11:34 +01:00
Alexis Engelke
2634a2bda1 Revert "[LLVM][NFC] Move PassPlugin from Passes to Extensions lib" and subsequent commit
This reverts commit d87b47d3a893b849cfd1ee5309b9fec2b0aec8cd.
This reverts commit f7ed3d44a198bfe689a1aa284452e875d5bb8a55.
2025-12-22 15:51:37 +00:00
Alexis Engelke
d87b47d3a8
[LLVM][NFC] Move PassPlugin from Passes to Extensions lib
This avoid pulling in the entire Passes library with all passes as
dependencies when just referring to PassPlugin, which is in fact
independent of the Passes themselves.

Pull Request: https://github.com/llvm/llvm-project/pull/172478
2025-12-22 11:42:27 +01:00
Michael Kruse
06e4728f83
[Polly] Recalculate dependencies after import-jscop (#172640)
The new access functions may have different dependencies than the
original ones. Invalidate the dependency analysis after an jscop-import.
2025-12-17 12:20:19 +00:00
Ramkumar Ramachandra
85fafd5db0
[SCEVExp] Get DL from SE, strip constructor arg (NFC) (#171823) 2025-12-11 14:26:47 +00:00
Sebastian Pop
c08f49b685
[delinearize] use SCEV exprs in getIndexExpressionsFromGEP (#162888)
clean up interface of getIndexExpressionsFromGEP to get SCEV expressions
instead of int for Sizes of the arrays.
This intends to simplify the code in #156342 by avoiding conversions
from SCEV to int and back to SCEV.
2025-12-03 22:21:09 -06:00
Michael Kruse
f12ad95991
[Polly] Remove ScopPass infrastructure (#125783)
PR #125442 replaces the pass-based Polly architecture with a monolithic
pass consisting of phases. Reasons listed in
https://github.com/llvm/llvm-project/pull/125442.

With this change, the SCoP-passes became redundant problematic versions
of the same functionality and are removed.
2025-11-16 14:12:52 +00:00
Michael Kruse
7a0f7dbf2d
[Polly] Introduce PhaseManager and remove LPM support (#125442) (#167560)
Reapply of a22d1c2225543aa9ae7882f6b1a97ee7b2c95574. Using this PR for
pre-merge CI.

Instead of relying on any pass manager to schedule Polly's passes, add
Polly's own pipeline manager which is seen as a monolithic pass in
LLVM's pass manager. Polly's former passes are now phases of the new
PhaseManager component.

Relying on LLVM's pass manager (the legacy as well as the New Pass
Manager) to manage Polly's phases never was a good fit that the
PhaseManager resolves:

* Polly passes were modifying analysis results, in particular RegionInfo
and ScopInfo. This means that there was not just one unique and
"definite" analysis result, the actual result depended on which analyses
ran prior, and the pass manager was not allowed to throw away cached
analyses or prior SCoP optimizations would have been forgotten. The LLVM
pass manger's persistance of analysis results is not contractual but
designed for caching.

* Polly depends on a particular execution order of passes and regions
(e.g. regression tests, invalidation of consecutive SCoPs). LLVM's pass
manager does not guarantee any excecution order.

* Polly does not completely preserve DominatorTree, RegionInfo,
LoopInfo, or ScalarEvolution, but only as-needed for Polly's own uses.
Because the ScopDetection object stores references to those analyses, it
still had to lie to the pass manager that they would be preserved, or
the pass manager would have released and recomputed the invalidated
analysis objects that ScopDetection/ScopInfo was still referencing. To
ensure that no non-Polly pass would see these not-completely-preserved
analyses, all analyses still had to be thrown away after the
ScopPassManager, respectively with a BarrierNoopPass in case of the LPM.
 
* The NPM's PassInstrumentation wraps the IR unit into an `llvm::Any`
object, but implementations such as PrintIRInstrumentation call
llvm_unreachable on encountering an unknown IR unit, such as SCoPs, with
no extension points to add support. Hence LLVM crashes when dumping IR
between SCoP passes (such as `-print-before-changed` with Polly being
active).

The new PhaseManager uses some command line options that previously
belonged to Polly's legacy passes, such as `-polly-print-detect` (so the
option will continue to work). Hence the LPM support is incompatible
with the new approach and support for it is removed.
2025-11-14 00:45:54 +01:00
Karthika Devi C
6408703de5
[Polly] Retain vectorization for fallback loop when RTC is unsatisfiable (#165525)
When Polly generates a false runtime condition (RTC), the associated
Polly generated loop is never executed and is eventually eliminated. As
a result, the fallback loop becomes the default execution path.
Disabling vectorization for this fallback loop will be
counterproductive. This patch ensures that vectorization is only
disabled when the RTC is not false (no Codegen failure).
2025-11-10 13:48:15 +05:30
Kazu Hirata
bb367c14ae [polly] Fix unused variable warnings
This patch fixes:

  polly/lib/Transform/ScheduleOptimizer.cpp:935:17: error: unused
  variable 'File' [-Werror,-Wunused-variable]

  polly/lib/Transform/ScheduleOptimizer.cpp:936:9: error: unused
  variable 'Line' [-Werror,-Wunused-variable]

  polly/lib/Transform/ScheduleOptimizer.cpp:937:17: error: unused
  variable 'Msg' [-Werror,-Wunused-variable]
2025-11-05 08:23:22 -08:00