From cc42be074ed15235426cdbcb34f357ead2be2caf Mon Sep 17 00:00:00 2001 From: Aart Bik Date: Thu, 20 Oct 2016 16:14:16 -0700 Subject: Improved induction variable analysis and loop optimizations. Rationale: Rather than half-baked reconstructing cycles during loop optimizations, this CL passes the SCC computed during induction variable analysis to the loop optimizer (trading some memory for more optimizations). This further improves CaffeineLogic from 6000us down to 4200us (dx) and 2200us to 1690us (jack). Note that this is on top of prior improvements in previous CLs. Also, some narrowing type concerns are taken care of during transfer operations. Test: test-art-host Change-Id: Ice2764811a70073c5014b3a05fb51f39fd2f4c3c --- compiler/optimizing/loop_optimization.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'compiler/optimizing/loop_optimization.h') diff --git a/compiler/optimizing/loop_optimization.h b/compiler/optimizing/loop_optimization.h index 4113357035..e18d17531e 100644 --- a/compiler/optimizing/loop_optimization.h +++ b/compiler/optimizing/loop_optimization.h @@ -64,6 +64,10 @@ class HLoopOptimization : public HOptimization { void SimplifyBlocks(LoopNode* node); void RemoveIfEmptyInnerLoop(LoopNode* node); + bool IsPhiInduction(HPhi* phi); + bool IsEmptyHeader(HBasicBlock* block); + bool IsEmptyBody(HBasicBlock* block); + bool IsOnlyUsedAfterLoop(HLoopInformation* loop_info, HInstruction* instruction, /*out*/ int32_t* use_count); -- cgit v1.2.3-59-g8ed1b