llvm-project/llvm/lib
Andrew Trick 34e2f0c4ea Rewrite SCEV's backedge taken count computation.
Patch by Michele Scandale!

Rewrite of the functions used to compute the backedge taken count of a
loop on LT and GT comparisons.

I decided to split the handling of LT and GT cases becasue the trick
"a > b == -a < -b" in some cases prevents the trip count computation
due to the multiplication by -1 on the two operands of the
comparison. This issue comes from the conservative computation of
value range of SCEVs: taking the negative SCEV of an expression that
have a small positive range (e.g. [0,31]), we would have a SCEV with a
fullset as value range.

Indeed, in the new rewritten function I tried to better handle the
maximum backedge taken count computation when MAX/MIN expression are
used to handle the cases where no entry guard is found.

Some test have been modified in order to check the new value correctly
(I manually check them and reasoning on possible overflow the new
values seem correct).

I finally added a new test case related to the multiplication by -1
issue on GT comparisons.

llvm-svn: 194116
2013-11-06 02:08:26 +00:00
..
Analysis Rewrite SCEV's backedge taken count computation. 2013-11-06 02:08:26 +00:00
AsmParser Remove linkonce_odr_auto_hide. 2013-11-01 17:09:14 +00:00
Bitcode Use error_code in GVMaterializer. 2013-11-05 19:36:34 +00:00
CodeGen Slightly change the way stackmap and patchpoint intrinsics are lowered. 2013-11-05 22:44:04 +00:00
DebugInfo DebugInfo: Make pubnames header printing similar to unit header printing 2013-11-01 17:53:30 +00:00
ExecutionEngine The FIXME was indeed fixed in the linker, comment removed. 2013-10-25 12:01:53 +00:00
IR Use error_code in GVMaterializer. 2013-11-05 19:36:34 +00:00
IRReader Add 'const' qualifiers to static const char* variables. 2013-07-16 01:17:10 +00:00
LTO Remove linkonce_odr_auto_hide. 2013-11-01 17:09:14 +00:00
Linker Add a 'deleteModule' method to the Linker class. 2013-10-16 08:59:57 +00:00
MC Add to the disassembler C API output reference types for 2013-11-01 00:00:07 +00:00
Object Support for microMIPS branch instructions. 2013-11-04 14:53:22 +00:00
Option Use startswith_lower() where possible. 2013-11-04 19:22:50 +00:00
Support X86: Add a description for AMD bdver3 aka Steamroller. 2013-11-04 10:29:20 +00:00
TableGen Fix most memory leaks in tablegen. 2013-10-31 04:07:41 +00:00
Target Get rid of current calculation function and adjustment scheme 2013-11-05 23:36:58 +00:00
Transforms [objc-arc] Convert the one directional retain/release relation assert to a conditional check + fail. 2013-11-05 16:02:40 +00:00
CMakeLists.txt Move LTO support library to a component, allowing it to be tested 2013-09-24 23:52:22 +00:00
LLVMBuild.txt Move LTO support library to a component, allowing it to be tested 2013-09-24 23:52:22 +00:00
Makefile Reformat Makefile. No other changes. 2013-10-30 04:03:03 +00:00