From 3c04974a90b0e03f4b509010bff49f0b2a3da57f Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Wed, 24 Sep 2014 18:10:46 +0100 Subject: Optimize suspend checks in optimizing compiler. - Remove the ones added during graph build (they were added for the baseline code generator). - Emit them at loop back edges after phi moves, so that the test can directly jump to the loop header. - Fix x86 and x86_64 suspend check by using cmpw instead of cmpl. Change-Id: I6fad5795a55705d86c9e1cb85bf5d63dadfafa2a --- compiler/optimizing/code_generator.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'compiler/optimizing/code_generator.h') diff --git a/compiler/optimizing/code_generator.h b/compiler/optimizing/code_generator.h index 55f5d8df5f..b58f3b3efc 100644 --- a/compiler/optimizing/code_generator.h +++ b/compiler/optimizing/code_generator.h @@ -143,6 +143,13 @@ class CodeGenerator : public ArenaObject { is_leaf_ = false; } + // Clears the spill slots taken by loop phis in the `LocationSummary` of the + // suspend check. This is called when the code generator generates code + // for the suspend check at the back edge (instead of where the suspend check + // is, which is the loop entry). At this point, the spill slots for the phis + // have not been written to. + void ClearSpillSlotsFromLoopPhisInStackMap(HSuspendCheck* suspend_check) const; + protected: CodeGenerator(HGraph* graph, size_t number_of_registers) : frame_size_(kUninitializedFrameSize), -- cgit v1.2.3-59-g8ed1b