OSDN Git Service

android-x86/art.git
9 years agoam 466efcc8: Merge "Adding optimizing compiler test case for String.<init>." into...
Jeff Hao [Wed, 24 Jun 2015 17:13:46 +0000 (17:13 +0000)]
am 466efcc8: Merge "Adding optimizing compiler test case for String.<init>." into mnc-dev

* commit '466efcc89c7e55bf90d2af0aa92cc5e8fc2bd4f2':
  Adding optimizing compiler test case for String.<init>.

9 years agoMerge "Adding optimizing compiler test case for String.<init>." into mnc-dev
Jeff Hao [Wed, 24 Jun 2015 17:05:42 +0000 (17:05 +0000)]
Merge "Adding optimizing compiler test case for String.<init>." into mnc-dev

9 years agoam 28676346: Use a flag from the verifier to know if we should compile.
Nicolas Geoffray [Wed, 24 Jun 2015 16:34:34 +0000 (16:34 +0000)]
am 28676346: Use a flag from the verifier to know if we should compile.

* commit '286763464072ffb599846f76720c7ec54392ae6e':
  Use a flag from the verifier to know if we should compile.

9 years agoUse a flag from the verifier to know if we should compile.
Nicolas Geoffray [Wed, 24 Jun 2015 14:53:03 +0000 (15:53 +0100)]
Use a flag from the verifier to know if we should compile.

Only used for the lack of bottom type in the aget-object case
for now. Could be used for more.

bug:21865466

(cherry picked from commit 4824c27988c8eeb302791624bb3ce1d557b0db6c)

Change-Id: I2bb7fe1d4737bd92c1076b5193607d74d8761ee7

9 years agoam b5171ff4: BCE: don\'t assume a bounds check always gets a HArrayLength.
Nicolas Geoffray [Wed, 24 Jun 2015 16:14:15 +0000 (16:14 +0000)]
am b5171ff4: BCE: don\'t assume a bounds check always gets a HArrayLength.

* commit 'b5171ff4859104a1e314c3091b6bd4872ad7c2b2':
  BCE: don't assume a bounds check always gets a HArrayLength.

9 years agoam 0fd292dd: Fix codegen_test after DCE fix.
Nicolas Geoffray [Wed, 24 Jun 2015 16:01:46 +0000 (16:01 +0000)]
am 0fd292dd: Fix codegen_test after DCE fix.

* commit '0fd292ddd463f1acf26b2b17d34d9b5a4ba93985':
  Fix codegen_test after DCE fix.

9 years agoBCE: don't assume a bounds check always gets a HArrayLength.
Nicolas Geoffray [Wed, 24 Jun 2015 13:57:44 +0000 (14:57 +0100)]
BCE: don't assume a bounds check always gets a HArrayLength.

Deoptimizations may change it to a HPhi.

bug:22056703

(cherry picked from commit 8df886b9214802ad689316a1dedb00a6d102555c)

Change-Id: I8afcf88e3a12dbe4d87101e6a7cefb8b81e2bb96

9 years agoam 18b236e5: Recompute dominator tree after DCE.
Nicolas Geoffray [Wed, 24 Jun 2015 15:45:38 +0000 (15:45 +0000)]
am 18b236e5: Recompute dominator tree after DCE.

* commit '18b236e5261d2b1f312e632a4d3bb2273c8bf641':
  Recompute dominator tree after DCE.

9 years agoam 574cce14: BCE: Narrow instead of unconditionnaly overwrite the range.
Nicolas Geoffray [Wed, 24 Jun 2015 15:45:37 +0000 (15:45 +0000)]
am 574cce14: BCE: Narrow instead of unconditionnaly overwrite the range.

* commit '574cce14025e153d87ec051926d331c5a39e5f92':
  BCE: Narrow instead of unconditionnaly overwrite the range.

9 years agoFix codegen_test after DCE fix.
Nicolas Geoffray [Wed, 24 Jun 2015 13:25:09 +0000 (14:25 +0100)]
Fix codegen_test after DCE fix.

(cherry picked from commit ea80942c39cb5e9bc3e38a388583d1646c1e2a3f)

bug:22031382

Change-Id: If410045779adb9e7e611af22c988232b5bf9a902

9 years agoRecompute dominator tree after DCE.
Nicolas Geoffray [Wed, 24 Jun 2015 11:20:24 +0000 (12:20 +0100)]
Recompute dominator tree after DCE.

bug:22031382

(cherry picked from commit 1f82ecc6a0c9f88d03d6d1a6d95eeb8707bd06c1)

Change-Id: I9a74edb185cb806045903dfe9695d9cc1a02e86b

9 years agoam 310b0f5f: Fix another case of un-verified dead code.
Nicolas Geoffray [Wed, 24 Jun 2015 15:29:35 +0000 (15:29 +0000)]
am 310b0f5f: Fix another case of un-verified dead code.

* commit '310b0f5f15ac9ef8fb7ed0a12ff9ba3e4da17033':
  Fix another case of un-verified dead code.

9 years agoBCE: Narrow instead of unconditionnaly overwrite the range.
Nicolas Geoffray [Wed, 24 Jun 2015 09:38:27 +0000 (10:38 +0100)]
BCE: Narrow instead of unconditionnaly overwrite the range.

bug:21862741

(cherry picked from commit a09ff9c11f07863ac57e6120a824f0d20dfaa284)

Change-Id: Ia8e903e09a7f9c2b8ef7cf3522f73f154534b81f

9 years agoFix another case of un-verified dead code.
Nicolas Geoffray [Wed, 24 Jun 2015 11:41:20 +0000 (12:41 +0100)]
Fix another case of un-verified dead code.

bug:22042796
https://code.google.com/p/android/issues/detail?id=178008

(cherry picked from commit 1efcc22cd1895c48adccbe49270d8e8583c2b12d)

Change-Id: I5c0d783e842da39cd3dcbb2f18ccf784e797a64f

9 years agoAdding optimizing compiler test case for String.<init>.
Jeff Hao [Wed, 24 Jun 2015 00:34:04 +0000 (17:34 -0700)]
Adding optimizing compiler test case for String.<init>.

Bug: 21991156
Change-Id: Ibd0bd7d3b20680ac06ac08cb857595288c4e9b69

9 years agoam 1a63351b: Merge "ART: Follow-up to 507cc6f83bf6379728f2dd20391f2ed5fbfe6371" into...
Andreas Gampe [Tue, 23 Jun 2015 23:25:11 +0000 (23:25 +0000)]
am 1a63351b: Merge "ART: Follow-up to 507cc6f83bf6379728f2dd20391f2ed5fbfe6371" into mnc-dev

* commit '1a63351b4b68a9ffb4e55ce8185e13cda6893ec1':
  ART: Follow-up to 507cc6f83bf6379728f2dd20391f2ed5fbfe6371

9 years agoMerge "ART: Follow-up to 507cc6f83bf6379728f2dd20391f2ed5fbfe6371" into mnc-dev
Andreas Gampe [Tue, 23 Jun 2015 23:15:18 +0000 (23:15 +0000)]
Merge "ART: Follow-up to 507cc6f83bf6379728f2dd20391f2ed5fbfe6371" into mnc-dev

9 years agoART: Follow-up to 507cc6f83bf6379728f2dd20391f2ed5fbfe6371
Andreas Gampe [Tue, 23 Jun 2015 21:18:17 +0000 (14:18 -0700)]
ART: Follow-up to 507cc6f83bf6379728f2dd20391f2ed5fbfe6371

Do not trigger DCHECK aborts for final and abstract classes when
they are used from other classes. Instead issue a soft error that
leads to a runtime failure.

Bug: 21873151

(cherry picked from commit f23f33de8b3e9abd16720e0f48d43d63d41dee16)

Change-Id: Ie5251a176722811b3c74585222874313a53f7e02

9 years agoam 0cffac0c: Merge "Fix field ordering for String in hprof" into mnc-dev
Mathieu Chartier [Tue, 23 Jun 2015 23:02:37 +0000 (23:02 +0000)]
am 0cffac0c: Merge "Fix field ordering for String in hprof" into mnc-dev

* commit '0cffac0c639d81e77d82c29ed423c91fb4da073b':
  Fix field ordering for String in hprof

9 years agoMerge "Fix field ordering for String in hprof" into mnc-dev
Mathieu Chartier [Tue, 23 Jun 2015 22:54:48 +0000 (22:54 +0000)]
Merge "Fix field ordering for String in hprof" into mnc-dev

9 years agoFix field ordering for String in hprof
Mathieu Chartier [Tue, 23 Jun 2015 22:45:15 +0000 (15:45 -0700)]
Fix field ordering for String in hprof

We were inserting value field after the Object field instead of
the String fields.

Bug: 22043800
Change-Id: Ibaddbd7299562949e32eceb625feac325539e3ce

9 years agoam dd32833e: Make dex file verifier check that indexes are increasing.
Jeff Hao [Tue, 23 Jun 2015 22:12:17 +0000 (22:12 +0000)]
am dd32833e: Make dex file verifier check that indexes are increasing.

* commit 'dd32833e24241508aa697d5349edf6aba9922434':
  Make dex file verifier check that indexes are increasing.

9 years agoMake dex file verifier check that indexes are increasing.
Jeff Hao [Tue, 23 Jun 2015 03:20:30 +0000 (20:20 -0700)]
Make dex file verifier check that indexes are increasing.

Note that this still allows duplicates.

Bug: 21868011
Change-Id: Ib0e91c816eccfaf3b0dac340c05ffd5dc4df17cc

9 years agoam ad3359e7: Do not overwrite an input register in shift operations.
Nicolas Geoffray [Tue, 23 Jun 2015 11:11:50 +0000 (11:11 +0000)]
am ad3359e7: Do not overwrite an input register in shift operations.

* commit 'ad3359e77357cc5ce29ce529ab2ed9d0d8401da4':
  Do not overwrite an input register in shift operations.

9 years agoDo not overwrite an input register in shift operations.
Nicolas Geoffray [Mon, 22 Jun 2015 22:12:45 +0000 (23:12 +0100)]
Do not overwrite an input register in shift operations.

'second_reg' is an input register that can survive the instruction.
Instead use the output register as a temporary result.

bug:21667432

(cherry picked from commit a4f3581da73b83484a30ab499c4f8ad43b378dab)

Change-Id: Ic1f399964911b8a9fc57352130c92b2a0a1b8e0d

9 years agoam 7c19550e: Merge "Fix another miranda method moving GC bug" into mnc-dev
Mathieu Chartier [Tue, 23 Jun 2015 00:32:43 +0000 (00:32 +0000)]
am 7c19550e: Merge "Fix another miranda method moving GC bug" into mnc-dev

* commit '7c19550e66162442c1341e60578996f92dccf8ec':
  Fix another miranda method moving GC bug

9 years agoam bad9c7b7: New experimental GC stress mode
Mathieu Chartier [Tue, 23 Jun 2015 00:19:51 +0000 (00:19 +0000)]
am bad9c7b7: New experimental GC stress mode

* commit 'bad9c7b7f88689133cae59d9ccae231822a2020c':
  New experimental GC stress mode

9 years agoMerge "Fix another miranda method moving GC bug" into mnc-dev
Mathieu Chartier [Tue, 23 Jun 2015 00:14:43 +0000 (00:14 +0000)]
Merge "Fix another miranda method moving GC bug" into mnc-dev

9 years agoNew experimental GC stress mode
Mathieu Chartier [Sun, 14 Jun 2015 21:14:37 +0000 (14:14 -0700)]
New experimental GC stress mode

Tries to do a GC for every unique call stack (up to 16 frames).
The goal is to catch moving GC bugs and lock violations without being
rediculously slow. Some tests fail on 64 bits, 32 bit host doesn't
work. N5 is booting.

Added runtime -Xgc options: gcstress and nogcstress.

Bug: 21664466

(cherry picked from commit 310008008c90fea246efd00cb99ee7ded97c5209)

Change-Id: Icb8e420f2048e8ee83bcca7937563166a2638f5c

9 years agoam 76952000: Merge "Change GC to allow strings to use large object space." into mnc-dev
Jeff Hao [Mon, 22 Jun 2015 22:34:29 +0000 (22:34 +0000)]
am 76952000: Merge "Change GC to allow strings to use large object space." into mnc-dev

* commit '7695200065c2e81b40096e1018a0d73e7391da13':
  Change GC to allow strings to use large object space.

9 years agoMerge "Change GC to allow strings to use large object space." into mnc-dev
Jeff Hao [Mon, 22 Jun 2015 22:26:54 +0000 (22:26 +0000)]
Merge "Change GC to allow strings to use large object space." into mnc-dev

9 years agoChange GC to allow strings to use large object space.
Jeff Hao [Mon, 22 Jun 2015 22:14:49 +0000 (15:14 -0700)]
Change GC to allow strings to use large object space.

Bug: 21209641
Change-Id: Ib007a30e575e391e2b5bddb816a9d2e82502c7d5

9 years agoam 67b00a12: Merge "ART: Allow checking RETURN_VOID_NO_BARRIER on unresolved classes...
Andreas Gampe [Mon, 22 Jun 2015 21:49:28 +0000 (21:49 +0000)]
am 67b00a12: Merge "ART: Allow checking RETURN_VOID_NO_BARRIER on unresolved classes" into mnc-dev

* commit '67b00a12a07fb7c98477d9ca9a25522480fccea6':
  ART: Allow checking RETURN_VOID_NO_BARRIER on unresolved classes

9 years agoam 38fafa18: Make large string use large object space.
Jeff Hao [Mon, 22 Jun 2015 21:49:27 +0000 (21:49 +0000)]
am 38fafa18: Make large string use large object space.

* commit '38fafa18f0fcf610f6314a0fc4165e04e6e5d017':
  Make large string use large object space.

9 years agoMerge "ART: Allow checking RETURN_VOID_NO_BARRIER on unresolved classes" into mnc-dev
Andreas Gampe [Mon, 22 Jun 2015 21:36:40 +0000 (21:36 +0000)]
Merge "ART: Allow checking RETURN_VOID_NO_BARRIER on unresolved classes" into mnc-dev

9 years agoMake large string use large object space.
Jeff Hao [Mon, 22 Jun 2015 21:29:54 +0000 (14:29 -0700)]
Make large string use large object space.

Bug: 21209641
Change-Id: I731a920c02f29f0321f2077093516aaa0f8d782f

9 years agoART: Allow checking RETURN_VOID_NO_BARRIER on unresolved classes
Andreas Gampe [Mon, 22 Jun 2015 18:35:46 +0000 (11:35 -0700)]
ART: Allow checking RETURN_VOID_NO_BARRIER on unresolved classes

We must check that all fields are non-final, even for unresolved
classes. Fall back to the dex file for this information.

Bug: 22005084
Bug: https://code.google.com/p/android/issues/detail?id=177694

(cherry picked from commit 68df32091cc79468c81956633e279523b48ea8bf)

Change-Id: If2126d1be5dccadbbedcdccabde7398688d6e5ca

9 years agoFix another miranda method moving GC bug
Mathieu Chartier [Sat, 20 Jun 2015 03:24:45 +0000 (20:24 -0700)]
Fix another miranda method moving GC bug

Need to copy miranda methods over before we allocate the new vtable
or else we may have stale miranda gc roots.

Bug: 21664466
Change-Id: Ib3e415bb9e7df7abfa18c98fe01f790fa39622dc

9 years agoam 421e495c: ART: Don\'t do pre-linked calls to the interpreter bridge.
Vladimir Marko [Mon, 22 Jun 2015 16:11:35 +0000 (16:11 +0000)]
am 421e495c: ART: Don\'t do pre-linked calls to the interpreter bridge.

* commit '421e495c9bc53649605639dd738b8da8669147f1':
  ART: Don't do pre-linked calls to the interpreter bridge.

9 years agoART: Don't do pre-linked calls to the interpreter bridge.
Vladimir Marko [Mon, 22 Jun 2015 13:35:42 +0000 (14:35 +0100)]
ART: Don't do pre-linked calls to the interpreter bridge.

Bug: 21897404

(cherry picked from commit c08ab29796eeaa3b5863fbd987cd96fe7538d40c)

Change-Id: I66531379fb4468a8ddee063e664bf6593abbe7d5

9 years agoam a6efe5e8: ART: Disallow classes that are abstract and final
Andreas Gampe [Mon, 22 Jun 2015 15:45:12 +0000 (15:45 +0000)]
am a6efe5e8: ART: Disallow classes that are abstract and final

* commit 'a6efe5e813457a1c7946a1e6c62646b7bd1150df':
  ART: Disallow classes that are abstract and final

9 years agoART: Disallow classes that are abstract and final
Andreas Gampe [Sat, 20 Jun 2015 05:58:47 +0000 (22:58 -0700)]
ART: Disallow classes that are abstract and final

Make the verifier fail such classes.

Bug: 21873151

(cherry picked from commit 507cc6f83bf6379728f2dd20391f2ed5fbfe6371)

Change-Id: I217f3d71f44bccdcee7ca830e092c807928bed39

9 years agoam 88593111: Revert "Revert "Add support for inlining already sharpened interface...
Nicolas Geoffray [Mon, 22 Jun 2015 14:23:30 +0000 (14:23 +0000)]
am 88593111: Revert "Revert "Add support for inlining already sharpened interface calls.""

* commit '88593111c3a0fec728c1ced01740a20f702b3ffd':
  Revert "Revert "Add support for inlining already sharpened interface calls.""

9 years agoam ee393607: (-s ours) Revert "Add support for inlining already sharpened interface...
Nicolas Geoffray [Mon, 22 Jun 2015 14:23:29 +0000 (14:23 +0000)]
am ee393607: (-s ours) Revert "Add support for inlining already sharpened interface calls. DO NOT MERGE ANYWHERE"

* commit 'ee39360775066e6b9920348c86ea98bf01d0facf':
  Revert "Add support for inlining already sharpened interface calls. DO NOT MERGE ANYWHERE"

9 years agoam 042fd002: Revert "Revert "Use IsAssignableFrom instead of IsSubclass for robustness.""
Nicolas Geoffray [Mon, 22 Jun 2015 14:23:28 +0000 (14:23 +0000)]
am 042fd002: Revert "Revert "Use IsAssignableFrom instead of IsSubclass for robustness.""

* commit '042fd00295d21f936ba7a8c16915ce678970e658':
  Revert "Revert "Use IsAssignableFrom instead of IsSubclass for robustness.""

9 years agoRevert "Revert "Add support for inlining already sharpened interface calls.""
Nicolas Geoffray [Mon, 22 Jun 2015 14:15:07 +0000 (14:15 +0000)]
Revert "Revert "Add support for inlining already sharpened interface calls.""

bug:21867144

This reverts commit ee39360775066e6b9920348c86ea98bf01d0facf.

Change-Id: I69bf85ce7c352b1a22f36f0f2a136f95b4e73bd6

9 years agoRevert "Add support for inlining already sharpened interface calls. DO NOT MERGE...
Nicolas Geoffray [Mon, 22 Jun 2015 14:11:58 +0000 (15:11 +0100)]
Revert "Add support for inlining already sharpened interface calls. DO NOT MERGE ANYWHERE"

This reverts commit c362782609ca6fbc355ccc9ea9110fe671db9671.

Reverting in order to make a commit that will merge.

bug:21867144

9 years agoRevert "Revert "Use IsAssignableFrom instead of IsSubclass for robustness.""
Nicolas Geoffray [Mon, 22 Jun 2015 10:06:43 +0000 (11:06 +0100)]
Revert "Revert "Use IsAssignableFrom instead of IsSubclass for robustness.""

Don't use IsAssignableFrom, but check beforehand if the referrer is an
interface. Otherwise, we are being too aggressive on removing clinit
checks on interfaces (being a subclass doesn't imply the interface
has been initialized).

bug:21870666

This reverts commit 463580ca5a1e75e27ad0207537ffc6252091326a.

(cherry picked from commit b783b408112d1797da646f576a40f94bcb5162f3)

Change-Id: Ida03f453c9b0d4dda87a5696098f9ffbd69a3aa3

9 years agoam c48c7e6a: Use compiling class instead of outer class for access checks.
Nicolas Geoffray [Mon, 22 Jun 2015 13:36:34 +0000 (13:36 +0000)]
am c48c7e6a: Use compiling class instead of outer class for access checks.

* commit 'c48c7e6a540a0e23ff26ce12e2fe94adefd8ed48':
  Use compiling class instead of outer class for access checks.

9 years agoUse compiling class instead of outer class for access checks.
Nicolas Geoffray [Sat, 20 Jun 2015 21:44:47 +0000 (22:44 +0100)]
Use compiling class instead of outer class for access checks.

bug:21869678

(cherry picked from commit afd06414598e011693137ba044e38756609b2179)

Change-Id: I982ccdf46e3f4d0cc1901439e0bc2dcfa0fc661f

9 years agoam 7d593094: Use compiling class instead of referrer for access checks.
Nicolas Geoffray [Mon, 22 Jun 2015 13:23:01 +0000 (13:23 +0000)]
am 7d593094: Use compiling class instead of referrer for access checks.

* commit '7d59309458c69e1b2b2e85be5acc150979198f6f':
  Use compiling class instead of referrer for access checks.

9 years agoUse compiling class instead of referrer for access checks.
Nicolas Geoffray [Fri, 19 Jun 2015 12:32:41 +0000 (13:32 +0100)]
Use compiling class instead of referrer for access checks.

bug:21869670

(cherry picked from commit 30451743493bc2f589e96d68ab98f557461f97f9)

Change-Id: Ia18986797d166470801e7a9a690c054d2dc57952

9 years agoam 1e256bf2: Be careful with predecessor/successor index.
Nicolas Geoffray [Mon, 22 Jun 2015 11:47:28 +0000 (11:47 +0000)]
am 1e256bf2: Be careful with predecessor/successor index.

* commit '1e256bf257e8d97df9b2178ae8658b731ca2d662':
  Be careful with predecessor/successor index.

9 years agoBe careful with predecessor/successor index.
Nicolas Geoffray [Fri, 19 Jun 2015 15:17:05 +0000 (16:17 +0100)]
Be careful with predecessor/successor index.

When we simplify the CFG, we must preserve things that were already
simplified. For example, the index in the predecessor list or
successor list of a block must be preserved for ensuring the
first block is a loop pre header.

bug:21867463

(cherry picked from commit 8b20f88b0a8d1b374dd5eaae289d19734c77b8f8)

Change-Id: I2581b5a50942290da96cd9ec876f6f2573e0a6c4

9 years agoam bbcec62c: Merge "Don\'t check the return type in the builder." into mnc-dev
Nicolas Geoffray [Mon, 22 Jun 2015 11:35:32 +0000 (11:35 +0000)]
am bbcec62c: Merge "Don\'t check the return type in the builder." into mnc-dev

* commit 'bbcec62c0484fbfb82ee2c317e8afa478a63027b':
  Don't check the return type in the builder.

9 years agoMerge "Don't check the return type in the builder." into mnc-dev
Nicolas Geoffray [Mon, 22 Jun 2015 11:25:02 +0000 (11:25 +0000)]
Merge "Don't check the return type in the builder." into mnc-dev

9 years agoDon't check the return type in the builder.
Nicolas Geoffray [Thu, 18 Jun 2015 17:04:12 +0000 (18:04 +0100)]
Don't check the return type in the builder.

The verifier will not complain about dead code. For the compiler,
it is benign.

bug:21863767

(cherry picked from commit 69505f86a1a653bf86c1f2b423b3e0605137d5d1)

Change-Id: I2bc7888b39c91862c6dade130eccdf92f19b3f6f

9 years agoam 39eb41f6: Merge "Do not expect 0 or 1 only when comparing a boolean." into mnc-dev
Nicolas Geoffray [Mon, 22 Jun 2015 11:10:14 +0000 (11:10 +0000)]
am 39eb41f6: Merge "Do not expect 0 or 1 only when comparing a boolean." into mnc-dev

* commit '39eb41f6ad5af18fb9225e5898f20e348e1a7d75':
  Do not expect 0 or 1 only when comparing a boolean.

9 years agoam 39d40afb: Verifier: check an aput, even if we know it will fail.
Nicolas Geoffray [Mon, 22 Jun 2015 11:10:13 +0000 (11:10 +0000)]
am 39d40afb: Verifier: check an aput, even if we know it will fail.

* commit '39d40afb789c9ae80b1105168241dcdc92491b5d':
  Verifier: check an aput, even if we know it will fail.

9 years agoMerge "Do not expect 0 or 1 only when comparing a boolean." into mnc-dev
Nicolas Geoffray [Mon, 22 Jun 2015 11:07:17 +0000 (11:07 +0000)]
Merge "Do not expect 0 or 1 only when comparing a boolean." into mnc-dev

9 years agoDo not expect 0 or 1 only when comparing a boolean.
Nicolas Geoffray [Fri, 19 Jun 2015 10:42:07 +0000 (11:42 +0100)]
Do not expect 0 or 1 only when comparing a boolean.

bug:21866529

(cherry picked from commit 3c4ab80c102ff1bfc0e74d4abddbf5454bf4008d)

Change-Id: Ibdc0d4a9730bfc6e7307282276f084dae5ac55c1

9 years agoam a04e7b7c: Run a simplification pass before code generation.
Nicolas Geoffray [Mon, 22 Jun 2015 10:52:28 +0000 (10:52 +0000)]
am a04e7b7c: Run a simplification pass before code generation.

* commit 'a04e7b7ceae01a7ceda41419e4c639a43e18361e':
  Run a simplification pass before code generation.

9 years agoVerifier: check an aput, even if we know it will fail.
Nicolas Geoffray [Fri, 19 Jun 2015 09:35:42 +0000 (10:35 +0100)]
Verifier: check an aput, even if we know it will fail.

bug:21867457

(cherry picked from commit 66389fbeb41c981648bb2e1e7e2f43089f095591)

Change-Id: Id01edeb871f6bc59518eb341e5b76f021cfdfe06

9 years agoRun a simplification pass before code generation.
Nicolas Geoffray [Thu, 18 Jun 2015 14:46:47 +0000 (15:46 +0100)]
Run a simplification pass before code generation.

The code generators assume things that only the instruction
simplier ensures. So it has to be run last in case previous
optimiziations broke those assumptions.

bug:21865464

(cherry picked from commit b2bdfce7f805b00668a2521b1c939a0aafb2be49)

Change-Id: Ibf4384a911e400eb7586bbf6b4edd6351034cbd8

9 years agoam 096f357c: Merge "Bailout from compilation if an invoke is malformed." into mnc-dev
Nicolas Geoffray [Mon, 22 Jun 2015 09:38:39 +0000 (09:38 +0000)]
am 096f357c: Merge "Bailout from compilation if an invoke is malformed." into mnc-dev

* commit '096f357c5dda663c6fbb58bd0154c091aec51f63':
  Bailout from compilation if an invoke is malformed.

9 years agoam c9345cc2: Merge "Fix wrong DCHECK in bounds check elimination." into mnc-dev
Nicolas Geoffray [Mon, 22 Jun 2015 09:38:38 +0000 (09:38 +0000)]
am c9345cc2: Merge "Fix wrong DCHECK in bounds check elimination." into mnc-dev

* commit 'c9345cc258d6a4e164b7e64ee1e67e69a180b972':
  Fix wrong DCHECK in bounds check elimination.

9 years agoam 25fde612: Fix a bug in optimizing when the null constant has been DCE.
Nicolas Geoffray [Mon, 22 Jun 2015 09:38:37 +0000 (09:38 +0000)]
am 25fde612: Fix a bug in optimizing when the null constant has been DCE.

* commit '25fde612b0df01a086cd4c801b7bd3a10e93a0e9':
  Fix a bug in optimizing when the null constant has been DCE.

9 years agoam ff82263e: Fix String Change baseline compiler errors.
Nicolas Geoffray [Mon, 22 Jun 2015 09:38:36 +0000 (09:38 +0000)]
am ff82263e: Fix String Change baseline compiler errors.

* commit 'ff82263e2b96ad099c56c19b91c2286baaf82fa7':
  Fix String Change baseline compiler errors.

9 years agoMerge "Bailout from compilation if an invoke is malformed." into mnc-dev
Nicolas Geoffray [Mon, 22 Jun 2015 09:25:56 +0000 (09:25 +0000)]
Merge "Bailout from compilation if an invoke is malformed." into mnc-dev

9 years agoBailout from compilation if an invoke is malformed.
Nicolas Geoffray [Thu, 18 Jun 2015 10:11:27 +0000 (11:11 +0100)]
Bailout from compilation if an invoke is malformed.

Because the verifier does not check trivially dead instructions,
the compilers must prepare for bogus instructions. This change
fixes the case the arguments for an invoke do not match the
formal parameters.

bug:21865459

(cherry picked from commit 2e33525bd4eb892246b4c244c6d4ebf6c6d07501)

Change-Id: I392f86eafefde28263fe35a31f17b398ff8dfc24

9 years agoMerge "Fix wrong DCHECK in bounds check elimination." into mnc-dev
Nicolas Geoffray [Mon, 22 Jun 2015 09:16:04 +0000 (09:16 +0000)]
Merge "Fix wrong DCHECK in bounds check elimination." into mnc-dev

9 years agoFix wrong DCHECK in bounds check elimination.
Nicolas Geoffray [Sat, 20 Jun 2015 22:49:01 +0000 (23:49 +0100)]
Fix wrong DCHECK in bounds check elimination.

The lower range of an array length instruction can
be changed by other instructions than HBoundsCheck,
like HNewArray.

bug:21862741

(cherry picked from commit 8d82a0c2b2b12f259ccb357d3b1e699c68ad0400)

Change-Id: I1bb1a4f4c6673509dd3fb5184c32992bed876250

9 years agoFix a bug in optimizing when the null constant has been DCE.
Nicolas Geoffray [Wed, 17 Jun 2015 22:09:05 +0000 (23:09 +0100)]
Fix a bug in optimizing when the null constant has been DCE.

If it has been DCE, we should create a new one, instead of
using the old one.

Also move the first DCE to a place where it could actually
be useful.

bug:21870788

(cherry picked from commit 18e6873c469b48aaed22148451523479eece98e3)

Change-Id: I3b3ab2dafe8ce5fb60868fd1a6ef0eeefe666e0c

9 years agoFix String Change baseline compiler errors.
Nicolas Geoffray [Sun, 21 Jun 2015 17:57:02 +0000 (18:57 +0100)]
Fix String Change baseline compiler errors.

The String Change adds multiple move results if the uninitialized string
is in multiple registers. This adds StoreLocals on the same instruction,
which isn't allowed. Now, a LoadLocal is added for each extra move
needed.

bug:21902634

(cherry picked from commit aa919207d2fb63af11d72d3b7cdbc435769565af)

Change-Id: I057d14cdac437d06eec20caaddd430c304e58196

9 years agoam 7257ece4: Use signed encoding when using relative CFI addresses.
David Srbecky [Sat, 20 Jun 2015 05:46:48 +0000 (05:46 +0000)]
am 7257ece4: Use signed encoding when using relative CFI addresses.

* commit '7257ece418469b284ae3cf1d9ba6617a62bdfc4f':
  Use signed encoding when using relative CFI addresses.

9 years agoUse signed encoding when using relative CFI addresses.
David Srbecky [Sat, 20 Jun 2015 04:01:22 +0000 (05:01 +0100)]
Use signed encoding when using relative CFI addresses.

This is required for gdb to work.
libunwind works with either encoding.

(cherry picked from commit 17065880693d1b15ffeb60b9955a2d092839977f)

Bug: 21924613
Change-Id: I4e4f1cf9c65d48fa885a5993eeeed0253a3f2579

9 years agoam 673b4302: ART: Check for expected args for instance methods
Andreas Gampe [Sat, 20 Jun 2015 04:23:45 +0000 (04:23 +0000)]
am 673b4302: ART: Check for expected args for instance methods

* commit '673b4302edf6d1604e69a1427eea5324016bbab2':
  ART: Check for expected args for instance methods

9 years agoART: Check for expected args for instance methods
Andreas Gampe [Sat, 20 Jun 2015 03:37:46 +0000 (20:37 -0700)]
ART: Check for expected args for instance methods

Don't assume that the receiver is expected. This was writing out
of bounds (or triggering a DCHECK).

Bug: 21817284
Bug: 21872240
Bug: https://code.google.com/p/android/issues/detail?id=176571
Bug: https://code.google.com/p/android/issues/detail?id=176572

(cherry picked from commit ef0b1a1dbc99fe7c92f9598cbfc164763c1b66d7)

Change-Id: I7cad2c1dfc39feb0b1b4660deeb43afdcb844ba3

9 years agoam cbf5d896: ART: Check var-arg count earlier in method verifier
Taiju Tsuiki [Sat, 20 Jun 2015 01:59:01 +0000 (01:59 +0000)]
am cbf5d896: ART: Check var-arg count earlier in method verifier

* commit 'cbf5d89665cfb48778b2946794fbea43067ff04a':
  ART: Check var-arg count earlier in method verifier

9 years agoART: Check var-arg count earlier in method verifier
Taiju Tsuiki [Mon, 13 Apr 2015 05:21:00 +0000 (14:21 +0900)]
ART: Check var-arg count earlier in method verifier

Check the count in vararg instructions before filling the temp
array. Avoids a DCHECK.

Bug: 21869663
Bug: 20170976

(cherry picked from commit 29498a23bcfe47a7134552aacad5524ecb484a49)

Change-Id: I1ff93502ab84c5967ad54d1b50dba517da791637

9 years agoam 1bd841a2: Merge "ART: Fix BCE lint issue" into mnc-dev
Mingyao Yang [Fri, 19 Jun 2015 23:57:31 +0000 (23:57 +0000)]
am 1bd841a2: Merge "ART: Fix BCE lint issue" into mnc-dev

* commit '1bd841a26a0810decbd3cd9dcc3c0dca5773dc2b':
  ART: Fix BCE lint issue

9 years agoMerge "ART: Fix BCE lint issue" into mnc-dev
Mingyao Yang [Fri, 19 Jun 2015 23:45:43 +0000 (23:45 +0000)]
Merge "ART: Fix BCE lint issue" into mnc-dev

9 years agoART: Fix BCE lint issue
Andreas Gampe [Thu, 11 Jun 2015 01:33:26 +0000 (18:33 -0700)]
ART: Fix BCE lint issue

Bug: 21034044

(cherry picked from commit 45d68f138a31a3ff9b45cda313f0ba27f1431f26)

Change-Id: I7f382a3124955eff5c0b96ca39ec67fb658fa3d0

9 years agoam f0ed1f0f: Merge "Fix GC map generation edge case" into mnc-dev
Mathieu Chartier [Fri, 19 Jun 2015 22:28:21 +0000 (22:28 +0000)]
am f0ed1f0f: Merge "Fix GC map generation edge case" into mnc-dev

* commit 'f0ed1f0fe2643c49997ea0e0bd04226ef7ba33fa':
  Fix GC map generation edge case

9 years agoMerge "Fix GC map generation edge case" into mnc-dev
Mathieu Chartier [Fri, 19 Jun 2015 22:19:22 +0000 (22:19 +0000)]
Merge "Fix GC map generation edge case" into mnc-dev

9 years agoFix GC map generation edge case
Mathieu Chartier [Fri, 19 Jun 2015 20:55:27 +0000 (13:55 -0700)]
Fix GC map generation edge case

Previously we checked the number of bits, but then rounded up to a
byte boundary. If ref_bitmap_bits was 65535, it would pass the check
but not actually fit in the 13 bits for ref_bitmap_bytes since we
rounded up to 8192 bytes.

Regression test infeasible due to smali limitations.

Bug: 21888453
Change-Id: If4b769431f27ecca14fe7852d017bcde01b3e146

9 years agoam 31fa4b57: Remove bogus DCHECK in BCE.
Nicolas Geoffray [Fri, 19 Jun 2015 20:45:37 +0000 (20:45 +0000)]
am 31fa4b57: Remove bogus DCHECK in BCE.

* commit '31fa4b57132a2352630b599b4da7e69f77376dcb':
  Remove bogus DCHECK in BCE.

9 years agoRemove bogus DCHECK in BCE.
Nicolas Geoffray [Wed, 17 Jun 2015 09:17:49 +0000 (10:17 +0100)]
Remove bogus DCHECK in BCE.

When creating a phi for the array length when we add HDeoptimization
nodes, we might update accesses in inner loops to use that phi instead
of the array length. The BCE phase was not expecting this case.

Bug: 21034044

(cherry picked from commit 3cde6227678cf62e06bca264671d1e957456ac3d)

Change-Id: I639f4ea6f5889726142041a42736183f162c7437

9 years agoam bca381a1: Fix premature deoptimization if the loop body isn\'t entered.
Mingyao Yang [Fri, 19 Jun 2015 19:55:14 +0000 (19:55 +0000)]
am bca381a1: Fix premature deoptimization if the loop body isn\'t entered.

* commit 'bca381a12965a98e3727e93986dd0a195db500a0':
  Fix premature deoptimization if the loop body isn't entered.

9 years agoFix premature deoptimization if the loop body isn't entered.
Mingyao Yang [Tue, 19 May 2015 23:01:59 +0000 (16:01 -0700)]
Fix premature deoptimization if the loop body isn't entered.

Add a test between initial_ and end_ to see if the loop body is entered.
If the loop body isn't entered at all, we jump to the loop header. Loop header is
still executed and is going to test the condition again and loop body won't be
entered. This makes sure no deoptimization is triggered if the loop body isn't
even entered.

Bug: 21034044

(cherry picked from commit 3584bce5b1f45e5741d3a6ca24884a36320ecb6b)

Change-Id: I2b6de1f22fbc4568ca419f76382ebd87806d9694

9 years agoam db538d30: Merge "ART stack unwinding fixes for libunwind/gdb/lldb." into mnc-dev
David Srbecky [Fri, 19 Jun 2015 18:35:53 +0000 (18:35 +0000)]
am db538d30: Merge "ART stack unwinding fixes for libunwind/gdb/lldb." into mnc-dev

* commit 'db538d309bc34e025e921a04f10b4ee745bd9f1d':
  ART stack unwinding fixes for libunwind/gdb/lldb.

9 years agoMerge "ART stack unwinding fixes for libunwind/gdb/lldb." into mnc-dev
David Srbecky [Fri, 19 Jun 2015 18:25:56 +0000 (18:25 +0000)]
Merge "ART stack unwinding fixes for libunwind/gdb/lldb." into mnc-dev

9 years agoam 3e91a44b: Fix case where block has no predecessor for StringChange.
Jeff Hao [Fri, 19 Jun 2015 18:18:25 +0000 (18:18 +0000)]
am 3e91a44b: Fix case where block has no predecessor for StringChange.

* commit '3e91a44bc9063f7f69b5415e3cf162991f73283f':
  Fix case where block has no predecessor for StringChange.

9 years agoFix case where block has no predecessor for StringChange.
Jeff Hao [Wed, 17 Jun 2015 23:04:26 +0000 (16:04 -0700)]
Fix case where block has no predecessor for StringChange.

Removes part that checks for throwing half of instruction. It's no
longer necessary. Also adds regression test.

Bug: 21902684
Change-Id: Ic600165e6b3719de3d83a73b8a1fa64473668fc8

9 years agoam e7738e8b: Quick: Handle total high/low register overlap on arm/mips.
Vladimir Marko [Fri, 19 Jun 2015 16:51:41 +0000 (16:51 +0000)]
am e7738e8b: Quick: Handle total high/low register overlap on arm/mips.

* commit 'e7738e8bf567153fde593404d380a5c79ba6bfa8':
  Quick: Handle total high/low register overlap on arm/mips.

9 years agoQuick: Handle total high/low register overlap on arm/mips.
Vladimir Marko [Fri, 19 Jun 2015 13:56:38 +0000 (14:56 +0100)]
Quick: Handle total high/low register overlap on arm/mips.

OpRegCopyWide() in arm and mips backends didn't handle the
total register overlap when the registers holding the source
and destination pairs are the same but in reverse order.

Bug: 21897012

(cherry picked from commit 8958f7f8702327e713264d0538ab5dec586f3738)

Change-Id: I20afce6cc3213e7f7b3edaef91f3ec29c469f877

9 years agoam 9f7687cb: Quick: Fix optimizations for empty if blocks.
Vladimir Marko [Fri, 19 Jun 2015 15:54:25 +0000 (15:54 +0000)]
am 9f7687cb: Quick: Fix optimizations for empty if blocks.

* commit '9f7687cb5c1390ec4bcc2f8fa10dbee33aff3d6a':
  Quick: Fix optimizations for empty if blocks.

9 years agoQuick: Fix optimizations for empty if blocks.
Vladimir Marko [Fri, 19 Jun 2015 11:58:22 +0000 (12:58 +0100)]
Quick: Fix optimizations for empty if blocks.

If a block ending with if-eqz or if-nez has the same "taken"
and "fallthrough", we cannot assume that the value has been
checked against zero in one of the succesors. This affects
the null check elimination pass as well as GVN. Refactor all
those checks to a single function in BasicBlock and check
that the "taken" and "falthrough" are different when needed.

Bug: 21614284

(cherry picked from commit f11c420c448baffac6a70ac0884d481ab347e257)

Change-Id: I062e0042de3470ce8680b586487b9c7acbd206bc

9 years agoam dd3c7d2d: ART: Remove old DCHECK that trips Baseline
David Brazdil [Fri, 19 Jun 2015 09:34:30 +0000 (09:34 +0000)]
am dd3c7d2d: ART: Remove old DCHECK that trips Baseline

* commit 'dd3c7d2d6124ceb346b4ed9aa7115f75fc6d3f9f':
  ART: Remove old DCHECK that trips Baseline

9 years agoART: Remove old DCHECK that trips Baseline
David Brazdil [Thu, 18 Jun 2015 11:40:01 +0000 (12:40 +0100)]
ART: Remove old DCHECK that trips Baseline

Codegen verified that the entry block always falls through to the next
block. While this is the case with Optimizing, it doesn't hold for
Baseline but it doesn't need to since codegen handles it fine.

Bug:21913514
Change-Id: I751ef227e6cf103af3e7fc35fca4b01c663385a1
(cherry picked from commit 015c7e63604c038e866d7af3850c557403cddc8b)