diff options
| author | 2015-11-10 17:14:35 +0000 | |
|---|---|---|
| committer | 2015-11-10 18:19:47 +0000 | |
| commit | 9e23df5c21bed53ead79e3131b67105abc8871e4 (patch) | |
| tree | b04e042b8de54e631f8f2452eb8ae4de9e23e39e /compiler/optimizing/nodes.cc | |
| parent | 8a6463a7052ec69e7c0b94a65b26807f570e6359 (diff) | |
Optimizing: Improve constant folding + DCE for inlining.
Run constant folding before DCE in inliner to eliminate more
code that can prevent inlining. Improve the constant folding
to evaluate Equals and NotEquals for null inputs.
Change-Id: I876ffb903ef39484370b6c8793f0f8467a977362
Diffstat (limited to 'compiler/optimizing/nodes.cc')
| -rw-r--r-- | compiler/optimizing/nodes.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/optimizing/nodes.cc b/compiler/optimizing/nodes.cc index f006df1852..1a4685309d 100644 --- a/compiler/optimizing/nodes.cc +++ b/compiler/optimizing/nodes.cc @@ -1090,6 +1090,8 @@ HConstant* HBinaryOperation::TryStaticEvaluation() const { } else if (GetRight()->IsLongConstant()) { return Evaluate(GetLeft()->AsLongConstant(), GetRight()->AsLongConstant()); } + } else if (GetLeft()->IsNullConstant() && GetRight()->IsNullConstant()) { + return Evaluate(GetLeft()->AsNullConstant(), GetRight()->AsNullConstant()); } return nullptr; } |