1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
llvm-mirror/lib
Max Kazantsev d4bdf4737d [LoopPeeling] Get rid of Phis that become invariant after N steps
This patch is a generalization of the improvement introduced in rL296898.
Previously, we were able to peel one iteration of a loop to get rid of a Phi that becomes
an invariant on the 2nd iteration. In more general case, if a Phi becomes invariant after
N iterations, we can peel N times and turn it into invariant.
In order to do this, we for every Phi in loop's header we define the Invariant Depth value
which is calculated as follows:

Given %x = phi <Inputs from above the loop>, ..., [%y, %back.edge].

If %y is a loop invariant, then Depth(%x) = 1.
If %y is a Phi from the loop header, Depth(%x) = Depth(%y) + 1.
Otherwise, Depth(%x) is infinite.
Notice that if we peel a loop, all Phis with Depth = 1 become invariants,
and all other Phis with finite depth decrease the depth by 1.
Thus, peeling N first iterations allows us to turn all Phis with Depth <= N
into invariants.

Reviewers: reames, apilipenko, mkuper, skatkov, anna, sanjoy

Reviewed By: sanjoy

Subscribers: llvm-commits

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

llvm-svn: 300446
2017-04-17 09:52:02 +00:00
..
Analysis [BPI] NFC: reorder ifs to bail out earlier 2017-04-17 06:39:47 +00:00
AsmParser [IR] Take func, ret, and arg attrs separately in AttributeList::get 2017-04-13 00:58:09 +00:00
Bitcode Bitcode: Move version and global value module code parsers to separate functions. NFCI. 2017-04-12 20:02:09 +00:00
CodeGen [ProfileData] Unify getInstrProf*SectionName helpers 2017-04-15 00:09:57 +00:00
DebugInfo [llvm-pdbdump] Recursively dump class layout. 2017-04-13 21:11:00 +00:00
Demangle Add support for demangling C++11 thread_local variables. 2017-01-31 15:56:36 +00:00
ExecutionEngine [ORC] Add RPC and serialization support for Errors and Expecteds. 2017-04-13 03:51:35 +00:00
Fuzzer [libFuzzer] XFAIL fuzzer-oom.test on Darwin. 2017-04-12 23:15:10 +00:00
IR [Constants] simplify get true/false code; NFCI 2017-04-16 17:00:21 +00:00
IRReader Timer: Track name and description. 2016-11-18 19:43:18 +00:00
LibDriver Fix some ArgList uses after API change in r300135. 2017-04-12 23:43:58 +00:00
LineEditor
Linker [Linker] Provide callback for internalization 2017-03-13 18:08:11 +00:00
LTO Object, LTO: Add target triple to irsymtab and LTO API. 2017-04-14 02:55:06 +00:00
MC This patch closes PR#32216: Better testing of schedule model instruction latencies/throughputs. 2017-04-14 07:44:23 +00:00
Object This patch closes PR#32216: Better testing of schedule model instruction latencies/throughputs. 2017-04-14 07:44:23 +00:00
ObjectYAML Add virtual destructor to WasmYAML::Section or avoid memory leak 2017-03-31 22:14:14 +00:00
Option ArgList: cache index ranges containing arguments with each ID 2017-04-12 23:19:51 +00:00
Passes MemorySSA: Move to Analysis, from Transforms/Utils. It's used as 2017-04-11 20:06:36 +00:00
ProfileData [ProfileData] Unify getInstrProf*SectionName helpers 2017-04-15 00:09:57 +00:00
Support [APInt] Fix a bug in lshr by a value more than 64 bits above the bit width. 2017-04-16 01:03:51 +00:00
TableGen Use print() instead of dump() in code 2017-01-28 02:47:46 +00:00
Target [X86] Remove special handling for 16 bit for A asm constraints. 2017-04-16 20:13:08 +00:00
Transforms [LoopPeeling] Get rid of Phis that become invariant after N steps 2017-04-17 09:52:02 +00:00
XRay [XRay] - Fix spelling error to test commit access. 2017-04-06 03:32:01 +00:00
CMakeLists.txt [XRay] Define the library for XRay trace logs 2017-01-11 06:39:09 +00:00
LLVMBuild.txt