Commit Graph

446 Commits

Author SHA1 Message Date
Roman Lebedev 82fb4f4b22
[SCEV] Sequential/in-order `UMin` expression
As discussed in https://github.com/llvm/llvm-project/issues/53020 / https://reviews.llvm.org/D116692,
SCEV is forbidden from reasoning about 'backedge taken count'
if the branch condition is a poison-safe logical operation,
which is conservatively correct, but is severely limiting.

Instead, we should have a way to express those
poison blocking properties in SCEV expressions.

The proposed semantics is:
```
Sequential/in-order min/max SCEV expressions are non-commutative variants
of commutative min/max SCEV expressions. If none of their operands
are poison, then they are functionally equivalent, otherwise,
if the operand that represents the saturation point* of given expression,
comes before the first poison operand, then the whole expression is not poison,
but is said saturation point.
```
* saturation point - the maximal/minimal possible integer value for the given type

The lowering is straight-forward:
```
compare each operand to the saturation point,
perform sequential in-order logical-or (poison-safe!) ordered reduction
over those checks, and if reduction returned true then return
saturation point else return the naive min/max reduction over the operands
```
https://alive2.llvm.org/ce/z/Q7jxvH (2 ops)
https://alive2.llvm.org/ce/z/QCRrhk (3 ops)
Note that we don't need to check the last operand: https://alive2.llvm.org/ce/z/abvHQS
Note that this is not commutative: https://alive2.llvm.org/ce/z/FK9e97

That allows us to handle the patterns in question.

Reviewed By: nikic, reames

Differential Revision: https://reviews.llvm.org/D116766
2022-01-10 20:51:26 +03:00
Kazu Hirata 76f0f1cc5c Use {DenseSet,SetVector,SmallPtrSet}::contains (NFC) 2021-12-24 21:43:06 -08:00
Fangrui Song 0b39ec835d [Polly][Isl] Fix -Wsign-compare after D113101 2021-11-11 00:17:52 -08:00
Riccardo Mori 44596fe6a9 [Polly][Isl] Use the function unsignedFromIslSize to manage a isl::size object. NFCI
This is part of an effort to reduce the differences between the custom C++ bindings used right now by polly in lib/External/isl/include/isl/isl-noxceptions.h and the official isl C++ interface.
In the official interface the type `isl::size` cannot be casted to an unsigned without previously having checked if it contains a valid value with the function `isl::size::is_error()`.
For this reason two helping functions have been added:
 - `IslAssert`: assert that no errors are present in debug builds and just disables the mandatory error check in non-debug builds
 - `unisgnedFromIslSIze`: cast the `isl::size` object to `unsigned`

Changes made:
 - Add the functions `IslAssert` and `unsignedFromIslSize`
 - Add the utility function `rangeIslSize()`
 - Retype `MaxDisjunctsInDomain` from `int` to `unsigned`
 - Retype `RunTimeChecksMaxAccessDisjuncts` from `int` to `unsigned`
 - Retype `MaxDimensionsInAccessRange` from `int` to `unsigned`
 - Replaced some usages of `isl_size` to `unsigned` since we aim not to use `isl_size` anymore
 - `isl-noexceptions.h` has been generated by e704f73c88

No functional change intended.

Reviewed By: Meinersbur

Differential Revision: https://reviews.llvm.org/D113101
2021-11-05 11:15:22 +01:00
Michael Kruse 19db33c06e [Polly] Remove support for code generated by gfortran+DragonEgg.
DragonEgg is not maintained anymore, hence there is no need for this
functionality.

Fixes llvm.org/PR52173
2021-10-14 14:12:06 -05:00
Michael Kruse ec2029f986 [Polly] Do not inline dumpIslObj methods. NFC.
Instead of being inline and having a neverCalled() workaround to make it
work in the debugger, define it as a regular exported function.

Also add overloads for the C API types isl_* so it works with managed as
well as unmanaged ISL objects.
2021-10-12 23:52:36 -05:00
Michael Kruse 64489255be [Polly] Add greedy fusion algorithm.
When the option -polly-loopfusion-greedy is set, the ScheduleOptimizer
tries to aggressively fuse any band it can and does not violate any
dependences.

As part if the implementation, the functionalty for copying a band
into an new schedule was extracted out of the ScheduleTreeRewriter.
2021-10-08 20:33:30 -05:00
Michael Kruse 9820dd970c [Polly] Support for InlineAsm.
Inline assembly was not handled at all and treated like a llvm::Value.
In particular, it tried to create a pointer it which is not allowed.

Fix by handling like a llvm::Constant such that it is just reused when
required, instead of trying to marshall it in memory.

Fixes llvm.org/PR51960
2021-09-26 03:26:43 -05:00
Michael Kruse 1cea25eec9 [Polly] Remove isConstCall.
The function was intended to catch OpenMP functions such as
get_thread_id(). If matched, the call would be considered synthesizable.

There were a few problems with this:

 * get_thread_id() is not 'const' in the sense of have the gcc manual
   defines it: "do not examine any values except their arguments".
   get_thread_id() reads OpenCL runtime libreary global state.
   What was inteded was probably 'speculable'.

 * isConstCall was implemented using mayReadOrWriteMemory(). 'const' is
   stricter than that, mayReadOrWriteMemory is e.g. true for malloc(),
   since it may only read/write addresses that are considered
   inaccessible fro the application. However, malloc is certainly not
   speculable.

 * Values that are isConstCall were not handled consistently throughout
   Polly. In particular, it was not considered for referenced values
   (OpenMP outlining and PollyACC).

Fix by removing special handling for isConstCall entirely.
2021-09-26 03:26:43 -05:00
Michael Kruse e4f3f2c0c5 [Polly] Don't prune non-external function itself from dump. 2021-08-28 17:06:53 -05:00
Michael Kruse 9cfab5e249 [Polly] Add support for -polly-dump-before/after with NPM.
The new pass manager does not allow adding module passes at the
-polly-position=before-vectorizer extension point. Introduce a
DumpFunctionPass that dumps only current function. In contrast to the
legacy pass manager's -polly-dump-before, each function will be dumped
into its own file. -polly-dump-before-file is still not supported.

The DumpFunctionPass uses llvm::CloneModule to copy the current function
into a new module and then write it into a file.
2021-08-22 20:43:35 -05:00
Michael Kruse 58e4e71fc8 [Polly] Introduce caching for the isErrorBlock function. NFC.
Compilation of the file insn-attrtab.c of the SPEC CPU 2017 502.gcc_r
benchmark takes excessive time (> 30min) with Polly enabled. Most time
is spent in the isErrorBlock function querying the DominatorTree.
The isErrorBlock is invoked redundantly over the course of ScopDetection
and ScopBuilder. This patch introduces a caching mechanism for its
result.

Instead of a free function, isErrorBlock is moved to ScopDetection where
its cache map resides. This also means that many functions directly or
indirectly calling isErrorBlock are not "const" anymore. The
DetectionContextMap was marked as "mutable", but IMHO it never should
have been since it stores the detection result.

502.gcc_r only takes excessive time with the new pass manager. The
reason seeams to be that it invalidates the ScopDetection analysis more
often than the legacy pass manager, for unknown reasons.
2021-08-18 14:05:50 -05:00
Michael Kruse e8c8407aca [Polly] Break early when the result is known. NFC. 2021-08-18 12:41:04 -05:00
Riccardo Mori d3fdbda6b0 [Polly][Isl] Move to the new-polly-generator branch version of isl-noexceptions.h. NFCI
This is part of an effort to reduce the differences between the custom C++ bindings used right now by polly in `lib/External/isl/include/isl/isl-noxceptions.h` and the official isl C++ interface.

With this commit we are moving from the `polly-generator` branch to the `new-polly-generator` branch that is more mantainable and is based on the official C++ interface `cpp-checked.h`.

Changes made:
 - There are now many sublcasses for `isl::ast_node` representing different isl types. Use `isl::ast_node_for`, `isl::ast_node_user`, `isl::ast_node_block` and `isl::ast_node_mark` where needed.
 - There are now many sublcasses for `isl::schedule_node` representing different isl types. Use `isl::schedule_node_mark`, `isl::schedule_node_extension`, `isl::schedule_node_band` and `isl::schedule_node_filter` where needed.
 - Replace the `isl::*::dump` with `dumpIslObj` since the isl dump method is not exposed in the C++ interface.
 - `isl::schedule_node::get_child` has been renamed to `isl::schedule_node::child`
 - `isl::pw_multi_aff::get_pw_aff` has been renamed to `isl::pw_multi_aff::at`
 - The constructor `isl::union_map(isl::union_pw_multi_aff)` has been replaced with the static method `isl::union_map::from()`
 - Replace usages of `isl::val::add_ui` with `isl::val::add`
 - `isl::union_set_list::alloc` is now a constructor
 - All the `isl_size` values are now wrapped inside the class `isl::size` use `isl::size::release` to get the internal `isl_size` value where needed.
 - `isl-noexceptions.h` has been generated by 73f5ed1f4d

No functional change intended.

Reviewed By: Meinersbur

Differential Revision: https://reviews.llvm.org/D107225
2021-08-16 15:53:26 +02:00
Tarindu Jayatilaka 7a797b2902 Take OptimizationLevel class out of Pass Builder
Pulled out the OptimizationLevel class from PassBuilder in order to be able to access it from within the PassManager and avoid include conflicts.

Reviewed By: mtrofin

Differential Revision: https://reviews.llvm.org/D107025
2021-07-29 21:57:23 -07:00
Riccardo Mori d5ee355f89 [Polly][Isl] Use isl::union_map::unite() instead of isl::union_map::add_map(). NFC
This is part of an effort to reduce the differences between the custom C++ bindings used right now by polly in `lib/External/isl/include/isl/isl-noxceptions.h` and the official isl C++ interface.

Changes made:
 - Use `isl::union_map::unite()` instead of `isl::union_map::add_map()`
 - `isl-noexceptions.h` has been generated by this 3f43ae29fa

Depends on D106059

Reviewed By: Meinersbur

Differential Revision: https://reviews.llvm.org/D106061
2021-07-19 12:11:00 +02:00
Riccardo Mori bad3ebbaae [Polly][Isl] Stop generating isl::union_{set,map} from isl::space. NFC
This is part of an effort to reduce the differences between the custom C++ bindings used right now by polly in `lib/External/isl/include/isl/isl-noxceptions.h` and the official isl C++ interface.

Changes made:
 - Stop generating `isl::union_set` and isl::union_map` from `isl::space` and instead generate them from `isl::ctx`
 - Disable clang-format on `isl-noexceptions.h`
 - Removed `isl::union_{set,map}` generator from `isl::space` from `isl-noexceptions.h`
 - `isl-noexceptions.h` has been generated by this 87c3413b6f

Reviewed By: Meinersbur

Differential Revision: https://reviews.llvm.org/D106059
2021-07-19 11:24:53 +02:00
Riccardo Mori 0813bd1696 [Polly][Isl] Use isl::*::ctx instead of isl::*::get_ctx. NFC
This is part of an effort to reduce the differences between the custom C++ bindings used right now by polly in `lib/External/isl/include/isl/isl-noxceptions.h` and the official isl C++ interface.

Changes made:
 - Use `isl::*::ctx()` instead of `isl::*::get_ctx()` (for example `isl::space::ctx()` instead of `isl::space::get_ctx()`)
 - Add `isl::` namespace in front of isl types to avoid confusion (for example `isl::space::ctx` and `isl::ctx`
 - `isl-noexceptions.h` has been generated by this b64e33c62d

Reviewed By: Meinersbur

Differential Revision: https://reviews.llvm.org/D105691
2021-07-09 21:14:14 +02:00
patacca b55aedd0b8 [Polly][Isl] Use isl::union_set::unite() instead of isl::union_set::add_set(). NFC
This is part of an effort to reduce the differences between the custom C++ bindings used right now by polly in `lib/External/isl/include/isl/isl-noxceptions.h` and the official isl C++ interface.

Changes made:
 - Use `isl::union_set::unite()` instead of `isl::union_set::add_set()`
 - `isl-noexceptions.h` has been generated by this 390c44982b

Depends on D104994

Reviewed By: Meinersbur

Differential Revision: https://reviews.llvm.org/D105444
2021-07-07 16:26:55 +02:00
patacca f482497c38 [Polly][Isl] Use isl::set::tuple_dim, isl::map::domain_tuple_dim and isl::map::range_tuple_dim. NFC
This is part of an effort to reduce the differences between the custom C++ bindings used right now by polly in `lib/External/isl/include/isl/isl-noxceptions.h` and the official isl C++ interface.

Changes made:
 - Use `isl::set::tuple_dim` instead of `isl::set::dim` and `isl::set::n_dim`
 - Use `isl::map::domain_tuple_dim` instead of `isl::map::dim`
 - Use `isl::map::range_tuple_dim` instead of `isl::map::dim`
 - isl-noexceptions.h has been generated by this 45576e1b42

Note that not all the usage of `isl::{set,map}::dim` where replaced

Reviewed By: Meinersbur

Differential Revision: https://reviews.llvm.org/D104994
2021-07-06 11:20:45 +02:00
patacca cfe117def7 [Polly][Isl] Replacing isl method `to_str()` with `stringFromIslObj()`. NFC.
This is part of an effort to reduce the differences between the custom C++ bindings used right now by polly in `lib/External/isl/include/isl/isl-noxceptions.h` and the official isl C++ interface.

Changes made:
 - Removing method `to_str()` from all the classes in the isl C++ bindings.
 - Overload method `stringFromIslObj()` so it accepts isl C++ objects.
 - To keep backward compatibility `stringFromIslObj()` now accepts a value that is returned if the isl C object is `null` or doesn't have a string representation (by default it's an empty string). In some cases it's better to have the string "null" instead of an empty string.
 - isl-noexceptions.h has been generated by this d33ec3a3bb

Reviewed By: Meinersbur

Differential Revision: https://reviews.llvm.org/D104211
2021-06-15 14:22:10 +02:00
patacca 7c7978a122 [Polly][Isl] Removing explicit operator bool() from isl C++ bindings. NFC.
This is part of an effort to reduce the differences between the custom C++ bindings used right now by polly in `lib/External/isl/include/isl/isl-noxceptions.h` and the official isl C++ interface.

Changes made:
 - Removing explicit operator bool() from all the classes in the isl C++ bindings.
 - Replace each call to operator bool() to method `is_null()`.
 - isl-noexceptions.h has been generated by this 27396daac5

Reviewed By: Meinersbur

Differential Revision: https://reviews.llvm.org/D103976
2021-06-11 14:44:24 +02:00
Michael Kruse a56bd7dec8 [Polly][Matmul] Re-pack A in every iteration.
Packed_A must be copied repeatedly, not just for the first iteration of
the outer tile.

This fixes llvm.org/PR50557
2021-06-09 15:19:52 -05:00
patacca 9b41d0958e [Polly][Isl] Removing nullptr constructor from C++ bindings. NFC.
[Polly][Isl] Removing nullptr constructor from C++ bindings. NFC.

This is part of an effort to reduce the differences between the custom C++ bindings used right now by polly in `lib/External/isl/include/isl/isl-noxceptions.h` and the official isl C++ interface.

Changes made:
 - Removed `std::nullptr_t` constructor from all the classes in the isl C++ bindings.
 - `isl-noexceptions.h` has been generated by this a7e00bea38

Reviewed By: Meinersbur

Differential Revision: https://reviews.llvm.org/D103751
2021-06-08 23:46:28 +02:00
patacca f60ea691a9 Revert "[Polly][Isl] Removing nullptr constructor from C++ bindings. NFC."
This reverts commit be5e2fc7bf.

This introduced a building error for polly. https://lab.llvm.org/buildbot#builders/10/builds/4951
2021-06-08 17:12:10 +02:00
patacca be5e2fc7bf [Polly][Isl] Removing nullptr constructor from C++ bindings. NFC.
[Polly][Isl] Removing nullptr constructor from C++ bindings. NFC.

This is part of an effort to reduce the differences between the custom C++ bindings used right now by polly in `lib/External/isl/include/isl/isl-noxceptions.h` and the official isl C++ interface.

Changes made:
 - Removed `std::nullptr_t` constructor from all the classes in the isl C++ bindings.
 - `isl-noexceptions.h` has been generated by this a7e00bea38

Reviewed By: Meinersbur

Differential Revision: https://reviews.llvm.org/D103751
2021-06-08 15:28:20 +02:00
Michael Kruse 86008477a4 [Polly] Avoid compiler warning. NFC.
Avoid the warning

    /polly/lib/Support/RegisterPasses.cpp:833:3: warning: default label in switch which covers all enumeration values [-Wcovered-switch-default]
      default:
      ^

since all cases are now handled.

Thanks to Luke Benes for reporting.
2021-05-22 00:21:20 -05:00
Michael Kruse ad568f4286 [Polly] Add support for -polly-dump-after(-file) with the NPM.
For the same reason as with -polly-dump-before, it is only supported
with -polly-position=early.
2021-05-17 22:20:47 -05:00
Michael Kruse 29bef8e4e3 [Polly] Add support for -polly-dump-before(-file) with the NPM.
Only supported with -polly-position=early. Unfortunately, the
extension point callpack for VectorizerStart only passes a
FunctionPassManager, making it impossible to add a module pass.
2021-05-17 20:58:37 -05:00
Michael Kruse 5aafcb2b44 [Polly] Add support for -polly-position=early with the NPM.
This required support for the canonicalization passes, inlcuding
porting RewriteByReferenceParams to the NPM.

For some reason, the legacy pass pipeline with -polly-position=early did
not run the CodePreparation pass. This was fixed as well.
2021-05-14 12:55:03 -05:00
Arthur Eubanks 34a8a437bf [NewPM] Hide pass manager debug logging behind -debug-pass-manager-verbose
Printing pass manager invocations is fairly verbose and not super
useful.

This allows us to remove DebugLogging from pass managers and PassBuilder
since all logging (aside from analysis managers) goes through
instrumentation now.

This has the downside of never being able to print the top level pass
manager via instrumentation, but that seems like a minor downside.

Reviewed By: ychen

Differential Revision: https://reviews.llvm.org/D101797
2021-05-07 21:51:47 -07:00
Michael Kruse 286677870b [Polly][ManualOpt] Match interpretation of unroll metadata to LoopUnrolls's.
We previously had a different interpretation of unroll transformation
attributes than how LoopUnroll interpreted it. In particular,
llvm.loop.unroll.enable was needed explicitly to enable it and disabling
metadata was ignored.
Additionally, it required that either full unrolling or an unroll factor
to be specified or fail otherwise. An unroll factor is still required,
but the transformation is ignored with the hope that LoopUnroll is going
to apply the unrolling, since Polly currently does not implement an
heuristic.

Fixes llvm.org/PR50109
2021-04-24 04:30:19 -05:00
Michael Kruse 8796451d6e [Polly] Port DeadCodeElim to the NewPM. 2021-03-24 01:01:29 -05:00
Michael Kruse 3f170eb197 [Polly][Optimizer] Apply user-directed unrolling.
Make Polly look for unrolling metadata (https://llvm.org/docs/TransformMetadata.html#loop-unrolling) that is usually only interpreted by the LoopUnroll pass and apply it to the SCoP's schedule.

While not that useful by itself (there already is an unroll pass), it introduces mechanism to apply arbitrary loop transformation directives in arbitrary order to the schedule. Transformations are applied until no more directives are found. Since ISL's rescheduling would discard the manual transformations and it is assumed that when the user specifies the sequence of transformations, they do not want any other transformations to apply. Applying user-directed transformations can be controlled using the `-polly-pragma-based-opts` switch and is enabled by default.

This does not influence the SCoP detection heuristic. As a consequence, loop that do not fulfill SCoP requirements or the initial profitability heuristic will be ignored. `-polly-process-unprofitable` can be used to disable the latter.

Other than manually editing the IR, there is currently no way for the user to add loop transformations in an order other than the order in the default pipeline, or transformations other than the one supported by clang's LoopHint. See the `unroll_double.ll` test as example that clang currently is unable to emit. My own extension of `#pragma clang loop` allowing an arbitrary order and additional transformations is available here: https://github.com/meinersbur/llvm-project/tree/pragma-clang-loop. An effort to upstream this functionality as `#pragma clang transform` (because `#pragma clang loop` has an implicit transformation order defined by the loop pipeline) is D69088.

Additional transformations from my downstream pragma-clang-loop branch are tiling, interchange, reversal, unroll-and-jam, thread-parallelization and array packing. Unroll was chosen because it uses already-defined metadata and does not require correctness checks.

Reviewed By: sebastiankreutzer

Differential Revision: https://reviews.llvm.org/D97977
2021-03-15 13:05:39 -05:00
Roman Lebedev 78b8ce40ef
Reland [SCEV] Improve modelling for (null) pointer constants
This reverts commit 329aeb5db4,
and relands commit 61f006ac65.

This is a continuation of D89456.

As it was suggested there, now that SCEV models `PtrToInt`,
we can try to improve SCEV's pointer handling.
In particular, i believe, i will need this in the future
to further fix `SCEVAddExpr`operation type handling.

This removes special handling of `ConstantPointerNull`
from `ScalarEvolution::createSCEV()`, and add constant folding
into `ScalarEvolution::getPtrToIntExpr()`.
This way, `null` constants stay as such in SCEV's,
but gracefully become zero integers when asked.

Reviewed By: Meinersbur

Differential Revision: https://reviews.llvm.org/D98147
2021-03-13 16:05:34 +03:00
Roman Lebedev 329aeb5db4
Temporairly evert "[SCEV] Improve modelling for (null) pointer constants"
This appears to have broken ubsan bot:
https://lab.llvm.org/buildbot/#/builders/85/builds/3062
https://reviews.llvm.org/D98147#2623549

It looks like LSR needs some kind of a change around insertion point handling.
Reverting until i have a fix.

This reverts commit 61f006ac65.
2021-03-13 09:10:28 +03:00
Roman Lebedev 61f006ac65
[SCEV] Improve modelling for (null) pointer constants
This is a continuation of D89456.

As it was suggested there, now that SCEV models `PtrToInt`,
we can try to improve SCEV's pointer handling.
In particular, i believe, i will need this in the future
to further fix `SCEVAddExpr`operation type handling.

This removes special handling of `ConstantPointerNull`
from `ScalarEvolution::createSCEV()`, and add constant folding
into `ScalarEvolution::getPtrToIntExpr()`.
This way, `null` constants stay as such in SCEV's,
but gracefully become zero integers when asked.

Reviewed By: Meinersbur

Differential Revision: https://reviews.llvm.org/D98147
2021-03-12 22:11:58 +03:00
Michael Kruse ab0556bb20 [Polly] Regenerate isl-noexceptions.h.
Regenerate the C++ wrapper header from the current isl version's
headers.

The most notable change is that some dimension sizes are represented by
an isl_size (instead of unsigned), which is a signed int. Additionally,
some function may return -1 in case of an error which already had been
fixed in the past. The C++ may no return -1 instead of UINT_MAX which
caused the problems.

Some types in Polly had been changed from unsigned to isl_size
(that were not already auto) and some loops/comparision had to be
changed to avoid unsigned/signed comparison warnings.
2021-02-14 19:17:54 -06:00
Michael Kruse 9b123cde63 [Polly] Sanitize optimization levels.
The description of the -polly switch stated that it was only enabled
with -O3. This was a lie, the optimization level was ignored. Only at
-O0 Polly was not added to the pass pipeline because the pass builder,
but only because the extension points were not triggered.

In the NewPM, the VectorizerStart extensions point is actually trigger
even with -O0 which leads to the following crash:

   Assertion `Level != OptimizationLevel::O0 && "Must request optimizations!"' failed.

We sanitize the optimization levels using the following rules for both
pass mangers:

 1. Only enable Polly if optimizing at all (-O1, -O2 or -O3).
 2. Do not enable Polly when optimizing for size.
 3. Ignore the optimization level for diagnostic passes (printer, viewer
    or JScop-exporter).
 4. If only diagnostic passes enabled, skip the code-generation.
 5. Fix the description of the -polly command line option.
2021-02-11 23:07:48 -06:00
Fangrui Song 564788ddce [Polly] Fix -Wunused-lambda-capture 2021-02-10 09:19:05 -08:00
Fangrui Song 89e257bd62 [Polly] Fix -DPOLLY_ENABLE_GPGPU_CODEGEN=off build after 222d380d2f 2021-02-10 09:17:13 -08:00
Michael Kruse 222d380d2f [Polly] Make the NewPM pass pipeline more similar to the legacy's.
Even though it has some oddities, both pipelines should be as similar as
possible. Also use report_fatal_error instead of assertions to ensure a
proper failure in release builds for unsupported options.

This finalizes the patch serious to make Polly run in the default
configuration when using the NewPM by default.
2021-02-09 23:56:22 -06:00
Michael Kruse 08bab4b030 [Polly] Make NewPM's IslAstAnalysis more similar to the legacy IslAstInfoWrapperPass.
In particular, print the ast with -debug-only=polly-ast, print a
per-scop header with print<polly-ast> and force-add the analysis with
-polly-code-generation=ast.
2021-02-09 23:56:21 -06:00
Michael Kruse 13f758a805 [Polly] Improve Simplify pass PM integration.
1. LegacyPM: Rename SimplifyLegacyPass to SimplifyWrapperPass.
2. LegacyPM: Complete create/init functions in LinkAllPasses.h
3. NewPM: Only invalidate non-Scop passes if changed.
4. NewPM: Add to default pass pipeline.
5. NewPM: Print -analyze header for each print<polly-simplify>
2021-02-09 23:56:21 -06:00
Michael Kruse e200df952b [Polly] Port IslScheduleOptimizer to the NewPM. 2021-02-09 23:56:21 -06:00
Michael Kruse e7b9e43c9a [Polly] Register pass-instrumentation for NewPM's Scop level.
The pass-instrumentation pass is implicitly execute by the NewPM
whenever a new analysis runs. Not registering it will cause the crash
whenever a scop pass requests an analysis.

For instance this is the case for the IstAstAnalysis requesting the
DependenceAnalsis result.
2021-02-09 23:56:20 -06:00
Michael Kruse b687fc9122 [Polly] Port PruneUnprofitable to the NewPM. 2021-02-09 23:56:20 -06:00
Michael Kruse 7903d594ea [Polly] Port DeLICM to the NewPM. 2021-02-09 23:56:19 -06:00
Michael Kruse 4c64d8ee3a [Polly] Port ForwardOpTree to the NewPM. 2021-02-09 23:56:19 -06:00
Michael Kruse 3dcb535115 [Polly] Remove use of -O3 in regression test.
In addition to that regression tests should not test the intire pass
pipeline (unless they are testing the pipeline itself), the Polly-ACC
currently does not support the new pass manager. If enabled by default,
such tests will therefore fail.

Use the -polly-gpu-runtime and -polly-gpu-arch options also as default
values for the PPCGCodeGeneration pass. This requires to move the option
to be moved from the pipeline-building Register passes to the
PPCGCodeGeneration implementation.

Fixes the spir-typesize.ll buildbot fail.
2021-02-09 18:13:35 -06:00