diff options
author | Calin Juravle <calin@google.com> | 2015-01-12 18:45:46 +0000 |
---|---|---|
committer | Calin Juravle <calin@google.com> | 2015-01-21 14:26:35 +0000 |
commit | 77520bca97ec44e3758510cebd0f20e3bb4584ea (patch) | |
tree | 2e3be6fdc182e5cf5ae390019457af5e9c1ed242 /compiler/optimizing/code_generator.h | |
parent | 4d2c611bf17ff309abfa152e56c0b98a21ec8787 (diff) |
Record implicit null checks at the actual invoke time.
ImplicitNullChecks are recorded only for instructions directly (see NB
below) preceeded by NullChecks in the graph. This way we avoid recording
redundant safepoints and minimize the code size increase.
NB: ParallalelMoves might be inserted by the register allocator between
the NullChecks and their uses. These modify the environment and the
correct action would be to reverse their modification. This will be
addressed in a follow-up CL.
Change-Id: Ie50006e5a4bd22932dcf11348f5a655d253cd898
Diffstat (limited to 'compiler/optimizing/code_generator.h')
-rw-r--r-- | compiler/optimizing/code_generator.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/optimizing/code_generator.h b/compiler/optimizing/code_generator.h index 682c260585..f66aed912a 100644 --- a/compiler/optimizing/code_generator.h +++ b/compiler/optimizing/code_generator.h @@ -152,6 +152,8 @@ class CodeGenerator { virtual bool NeedsTwoRegisters(Primitive::Type type) const = 0; void RecordPcInfo(HInstruction* instruction, uint32_t dex_pc); + bool CanMoveNullCheckToUser(HNullCheck* null_check); + void MaybeRecordImplicitNullCheck(HInstruction* instruction); void AddSlowPath(SlowPathCode* slow_path) { slow_paths_.Add(slow_path); |