llvm-capstone/polly/lib
Eli Friedman 286c5a76ba [SCEVAffinator] Make precise modular math more correct.
Integer math in LLVM IR is modular. Integer math in isl is
arbitrary-precision. Modeling LLVM IR math correctly in isl requires
either adding assumptions that math doesn't actually overflow, or
explicitly wrapping the math. However, expressions with the "nsw" flag
are special; we can pretend they're arbitrary-precision because it's
undefined behavior if the result wraps. SCEV expressions based on IR
instructions with an nsw flag also carry an nsw flag (roughly; actually,
the real rule is a bit more complicated, but the details don't matter
here).

Before this patch, SCEV flags were also overloaded with an additional
function: the ZExt code was mutating SCEV expressions as a hack to
indicate to checkForWrapping that we don't need to add assumptions to
the operand of a ZExt; it'll add explicit wrapping itself. This kind of
works... the problem is that if anything else ever touches that SCEV
expression, it'll get confused by the incorrect flags.

Instead, with this patch, we make the decision about whether to
explicitly wrap the math a bit earlier, basing the decision purely on
the SCEV expression itself, and not its users.

Differential Revision: https://reviews.llvm.org/D25287

llvm-svn: 284848
2016-10-21 18:08:02 +00:00
..
Analysis [polly] Change SmallPtrSet which are being iterated into SmallSetVector 2016-10-21 17:29:10 +00:00
CodeGen [polly] Fix non-determinism in polly BlockGenerators 2016-10-19 17:56:49 +00:00
Exchange Perform copying to created arrays according to the packing transformation 2016-09-14 06:26:09 +00:00
External [cmake] Avoid warnings in feature tests. NFC. 2016-10-20 11:16:19 +00:00
JSON Fix spacing around variable initializations and for-loops. NFC. 2016-08-09 17:49:24 +00:00
Support [SCEVAffinator] Make precise modular math more correct. 2016-10-21 18:08:02 +00:00
Transform Perform copying to created arrays according to the packing transformation 2016-09-14 06:26:09 +00:00
CMakeLists.txt Add -polly-flatten-schedule pass. 2016-09-08 15:02:36 +00:00
Polly.cpp Drop '@brief' from doxygen comments 2016-09-02 06:33:33 +00:00