llvm/lib
Silviu Baranga 0c35941274 [SCEV] Generalize the SCEV algorithm for creating expressions for PHI nodes
Summary:
When forming expressions for phi nodes having an incoming value from
outside the loop A and a value coming from the previous iteration B
we were forming an AddRec if:
  - B was an AddRec
  - the value A was equal to the value for B at iteration -1 (or equal
    to the value of B shifted by one iteration, at iteration 0)

In this case, we were computing the expression to be the expression of
B, shifted by one iteration.

This changes generalizes the logic above by removing the restriction that
B needs to be an AddRec. For this we introduce two expression rewriters
that allow us to
  - shift an expression by one iteration
  - get the value of an expression at iteration 0

This allows us to get SCEV expressions for PHI nodes when these expressions
are not AddRecExprs.

Reviewers: sanjoy

Subscribers: llvm-commits, sanjoy

Differential Revision: http://reviews.llvm.org/D14175

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251700 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-30 15:02:28 +00:00
..
Analysis [SCEV] Generalize the SCEV algorithm for creating expressions for PHI nodes 2015-10-30 15:02:28 +00:00
AsmParser AsmParser: Remove implicit ilist iterator conversions, NFC 2015-10-20 01:12:49 +00:00
Bitcode Revert "Don't assert if materializing before seeing any function bodies" 2015-10-30 00:00:58 +00:00
CodeGen [MachineVerifier] Analyze MachineMemOperands for mem-to-mem moves. 2015-10-29 08:28:35 +00:00
DebugInfo Let the users of LLVMSymbolizer decide whether they want to symbolize inlined frames. 2015-10-30 00:40:20 +00:00
ExecutionEngine [Orc] Expose the compile callback API through the C bindings. 2015-10-30 03:20:21 +00:00
Fuzzer [libFuzzer] add -merge flag to merge corpora 2015-10-24 01:16:40 +00:00
IR [SCEV] Opportunistically interpret unsigned constraints as signed 2015-10-22 19:57:34 +00:00
IRReader
LibDriver [Option] Use an ArrayRef to store the Option Infos in OptTable. NFC 2015-10-21 16:30:42 +00:00
LineEditor
Linker Linker: Remove implicit ilist iterator conversion, NFC 2015-10-19 22:23:36 +00:00
LTO
MC ARM: add support for WatchOS's compact unwind information. 2015-10-28 22:56:36 +00:00
Object [AVR] Add ELF constants to headers 2015-10-23 06:05:55 +00:00
Option [Option] Use an ArrayRef to store the Option Infos in OptTable. NFC 2015-10-21 16:30:42 +00:00
Passes
ProfileData [PGO] RawProf Reader code cleanup 2015-10-28 19:34:04 +00:00
Support ARM: add watchOS default version support function. 2015-10-28 22:57:14 +00:00
TableGen [TblGen] ArrayRefize TGParser. No functional change intended. 2015-10-24 12:46:45 +00:00
Target [X86] Use is128BitVector/is256BitVector/is512BitVector in place of getSizeInBits == in some places. NFC 2015-10-30 04:31:18 +00:00
Transforms Recommit r251680 (also need to update clang test) 2015-10-30 05:07:15 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile