llvm-6502/include/llvm
Andrew Trick 10bb82e54f 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194116 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-06 02:08:26 +00:00
..
ADT Add {start,end}with_lower methods to StringRef. 2013-10-30 18:32:26 +00:00
Analysis Rewrite SCEV's backedge taken count computation. 2013-11-06 02:08:26 +00:00
Assembly
Bitcode
CodeGen Add support for stack map generation in the X86 backend. 2013-10-31 22:11:56 +00:00
Config Fix symbol defines in config.h.cmake 2013-11-05 07:27:18 +00:00
DebugInfo DWARF parser: Use ArrayRef to represent form sizes and simplify DWARFDIE::extractFast() interface. No functionality change. 2013-10-28 23:41:49 +00:00
ExecutionEngine
IR Implement AArch64 Neon Crypto instruction classes AES, SHA, and 3 SHA. 2013-11-05 17:42:05 +00:00
IRReader
LTO Use LTO_SYMBOL_SCOPE_DEFAULT_CAN_BE_HIDDEN instead of the "dso list". 2013-10-31 20:51:58 +00:00
MC Remove another unused flag. 2013-10-31 15:58:33 +00:00
Object move getSymbolNMTypeChar to the one program that needs it: nm. 2013-11-02 21:16:09 +00:00
Option
Support Remove another unused, and IMHO, not very desirable feature of ErrorOr. 2013-11-05 23:41:57 +00:00
TableGen
Target Convert comments to documentation comments (// -> ///) 2013-11-05 21:28:42 +00:00
Transforms Add a runtime unrolling parameter to the LoopUnroll pass constructor 2013-11-05 00:08:03 +00:00
AutoUpgrade.h
CMakeLists.txt
DebugInfo.h
DIBuilder.h
GVMaterializer.h Use error_code in GVMaterializer. 2013-11-05 19:36:34 +00:00
InitializePasses.h Merge CallGraph and BasicCallGraph. 2013-10-31 03:03:55 +00:00
InstVisitor.h
LinkAllIR.h
LinkAllPasses.h
Linker.h
Pass.h
PassAnalysisSupport.h
PassManager.h
PassManagers.h
PassRegistry.h
PassSupport.h