diff options
| author | 2014-07-09 01:46:39 +0000 | |
|---|---|---|
| committer | 2014-07-02 20:52:16 +0000 | |
| commit | 3d30b073541f19470e8b5dddef9377411fa587c3 (patch) | |
| tree | 0760d70cb42629c4b32300d4096f8f541e44fcc3 /compiler | |
| parent | 8746860d056e64dcc832264e74bda9d511e86e2d (diff) | |
| parent | 7a94961d0917495644193b281b04a570a783bb07 (diff) | |
Merge "ART: Do not emit load when inlining unused Thread.currentThread()"
Diffstat (limited to 'compiler')
| -rwxr-xr-x | compiler/dex/quick/gen_invoke.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/dex/quick/gen_invoke.cc b/compiler/dex/quick/gen_invoke.cc index 02f39ac180..6c0dfe80a6 100755 --- a/compiler/dex/quick/gen_invoke.cc +++ b/compiler/dex/quick/gen_invoke.cc @@ -1638,6 +1638,12 @@ bool Mir2Lir::GenInlinedStringCompareTo(CallInfo* info) { bool Mir2Lir::GenInlinedCurrentThread(CallInfo* info) { RegLocation rl_dest = InlineTarget(info); + + // Early exit if the result is unused. + if (rl_dest.orig_sreg < 0) { + return true; + } + RegLocation rl_result = EvalLoc(rl_dest, kRefReg, true); switch (cu_->instruction_set) { |