From e418dda75998e0186f7580c2c54705767c3c8f1f Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Tue, 11 Aug 2015 20:03:09 -0700 Subject: Be more flexible on the code unit size when inlining. This change increases the maximum code unit size, and fold parameters in the inlinee in the hope to reduce the overall size of the graph. We then make sure we don't inline methods that have more than N HInstructions. Also, remove the kAccDontInline flag on ArtMethod. The compiler does not need it anymore. Change-Id: I4cd3da40e551f30ba83b8b274728b87e67f6812e --- compiler/optimizing/nodes.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'compiler/optimizing/nodes.h') diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h index 851dd4ff5e..f2db33086c 100644 --- a/compiler/optimizing/nodes.h +++ b/compiler/optimizing/nodes.h @@ -3775,11 +3775,15 @@ class HXor : public HBinaryOperation { class HParameterValue : public HExpression<0> { public: HParameterValue(uint8_t index, Primitive::Type parameter_type, bool is_this = false) - : HExpression(parameter_type, SideEffects::None()), index_(index), is_this_(is_this) {} + : HExpression(parameter_type, SideEffects::None()), + index_(index), + is_this_(is_this), + can_be_null_(!is_this) {} uint8_t GetIndex() const { return index_; } - bool CanBeNull() const OVERRIDE { return !is_this_; } + bool CanBeNull() const OVERRIDE { return can_be_null_; } + void SetCanBeNull(bool can_be_null) { can_be_null_ = can_be_null; } bool IsThis() const { return is_this_; } @@ -3793,6 +3797,8 @@ class HParameterValue : public HExpression<0> { // Whether or not the parameter value corresponds to 'this' argument. const bool is_this_; + bool can_be_null_; + DISALLOW_COPY_AND_ASSIGN(HParameterValue); }; @@ -4444,6 +4450,7 @@ class HLoadString : public HExpression<1> { // TODO: Can we deopt or debug when we resolve a string? bool NeedsEnvironment() const OVERRIDE { return false; } bool NeedsDexCache() const OVERRIDE { return true; } + bool CanBeNull() const OVERRIDE { return false; } static SideEffects SideEffectsForArchRuntimeCalls() { return SideEffects::CanTriggerGC(); -- cgit v1.2.3-59-g8ed1b