1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-24 05:23:45 +02:00
llvm-mirror/lib/Transforms
Ehsan Amiri 29ec67aa01 Extend trip count instead of truncating IV in LFTR, when legal
When legal, extending trip count in the loop control logic generates better code compared to truncating IV. This is because

(1) extending trip count is a loop invariant operation (see genLoopLimit where we prove trip count is loop invariant).
(2) Scalar Evolution seems to have problems understanding trunc when computing loop trip count. So removing them allows better analysis performed in Scalar Evolution. (In particular this fixes PR 28363 which is the motivation for this change).

I am not going to perform any performance test. Any degradation caused by this should be an indication of a bug elsewhere.

To prove legality, we rely on SCEV to prove zext(trunc(IV)) == IV (or similarly for sext). If this holds, we can prove equivalence of trunc(IV)==ExitCnt (1) and IV == zext(ExitCnt). Simply take zext of boths sides of (1) and apply the proven equivalence.

https://reviews.llvm.org/D23075

llvm-svn: 278334
2016-08-11 13:51:20 +00:00
..
Coroutines [Coroutines] Part 6: Elide dynamic allocation of a coroutine frame when possible 2016-08-10 16:40:39 +00:00
Hello Add auto-exporting of symbols from tools so that plugins work on Windows 2016-05-26 11:16:43 +00:00
InstCombine Consistently use FunctionAnalysisManager 2016-08-09 00:28:15 +00:00
Instrumentation [Profile] improve warning control option 2016-08-11 05:09:30 +00:00
IPO Changed sign of LastCallToStaticBouns 2016-08-10 21:15:22 +00:00
ObjCARC Apply clang-tidy's modernize-loop-convert to most of lib/Transforms. 2016-06-26 12:28:59 +00:00
Scalar Extend trip count instead of truncating IV in LFTR, when legal 2016-08-11 13:51:20 +00:00
Utils Fix LCSSA increased compile time 2016-08-10 17:49:11 +00:00
Vectorize Move helpers into anonymous namespaces. NFC. 2016-08-06 11:13:10 +00:00
CMakeLists.txt [coroutines] Part 3 of N: Adding Boilerplate for Coroutine Passes 2016-07-28 21:04:31 +00:00
LLVMBuild.txt [coroutines] Part 3 of N: Adding Boilerplate for Coroutine Passes 2016-07-28 21:04:31 +00:00