llvm-project/polly
Roman Lebedev 1fb6104293
Reland "[SCEV] Model ptrtoint(SCEVUnknown) cast not as unknown, but as zext/trunc/self of SCEVUnknown"
This relands commit 1c021c64ca which was
reverted in commit 17cec6a11a because
an assertion was being triggered, since `BuildConstantFromSCEV()`
wasn't updated to handle the case where the constant we want to truncate
is actually a pointer. I was unsuccessful in coming up with a test case
where we'd end there with constant zext/sext of a pointer,
so i didn't handle those cases there until there is a test case.

Original commit message:

While we indeed can't treat them as no-ops, i believe we can/should
do better than just modelling them as `unknown`. `inttoptr` story
is complicated, but for `ptrtoint`, it seems straight-forward
to model it just as a zext-or-trunc of unknown.

This may be important now that we track towards
making inttoptr/ptrtoint casts not no-op,
and towards preventing folding them into loads/etc
(see D88979/D88789/D88788)

Reviewed By: mkazantsev

Differential Revision: https://reviews.llvm.org/D88806
2020-10-12 23:02:55 +03:00
..
cmake [Windows][Polly] Disable LLVMPolly module for all compilers on Windows 2020-09-15 09:12:38 +03:00
docs Bump the trunk major version to 12 2020-07-15 12:05:05 +02:00
include/polly [Polly][NewPM] Port Simplify to the new pass manager 2020-09-20 19:18:01 -07:00
lib [NewPM] Use PassInstrumentation for -verify-each 2020-10-07 19:24:25 -07:00
test Reland "[SCEV] Model ptrtoint(SCEVUnknown) cast not as unknown, but as zext/trunc/self of SCEVUnknown" 2020-10-12 23:02:55 +03:00
tools Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
unittests [Polly] Support linking ScopPassManager against LLVM dylib 2020-08-07 06:46:35 +02:00
utils Harmonize Python shebang 2020-07-16 21:53:45 +02:00
www [BasicAA] Replace -basicaa with -basic-aa in polly 2020-06-30 15:50:17 -07:00
.arclint
.gitattributes
.gitignore
CMakeLists.txt [cmake] Make gtest include directories a part of the library interface 2020-08-27 15:35:57 +02:00
CREDITS.txt
LICENSE.txt Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
README

README

Polly - Polyhedral optimizations for LLVM
-----------------------------------------
http://polly.llvm.org/

Polly uses a mathematical representation, the polyhedral model, to represent and
transform loops and other control flow structures. Using an abstract
representation it is possible to reason about transformations in a more general
way and to use highly optimized linear programming libraries to figure out the
optimal loop structure. These transformations can be used to do constant
propagation through arrays, remove dead loop iterations, optimize loops for
cache locality, optimize arrays, apply advanced automatic parallelization, drive
vectorization, or they can be used to do software pipelining.