summaryrefslogtreecommitdiff
path: root/compiler/optimizing/loop_optimization.h
diff options
context:
space:
mode:
authorAart Bik <ajcbik@google.com>2016-10-20 16:14:16 -0700
committerAart Bik <ajcbik@google.com>2016-10-24 12:55:48 -0700
commitcc42be074ed15235426cdbcb34f357ead2be2caf (patch)
treed0ac4dca432e1bb26e21634f21ffc3e05db5020e /compiler/optimizing/loop_optimization.h
parenta8188191477b7b5b01a3c4426c51c48cd55f6678 (diff)
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
Diffstat (limited to 'compiler/optimizing/loop_optimization.h')
-rw-r--r--compiler/optimizing/loop_optimization.h4
1 files changed, 4 insertions, 0 deletions
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);