Revert "Revert "Refactor HGraphBuilder and SsaBuilder to remove HLocals""
This patch merges the instruction-building phases from HGraphBuilder
and SsaBuilder into a single HInstructionBuilder class. As a result,
it is not necessary to generate HLocal, HLoadLocal and HStoreLocal
instructions any more, as the builder produces SSA form directly.
Saves 5-15% of arena-allocated memory (see bug for more data):
GMS 20.46MB => 19.26MB (-5.86%)
Maps 24.12MB => 21.47MB (-10.98%)
YouTube 28.60MB => 26.01MB (-9.05%)
This CL fixed an issue with parsing quickened instructions.
Bug: 27894376
Bug: 27998571
Bug: 27995065
Change-Id: I20dbe1bf2d0fe296377478db98cb86cba695e694
diff --git a/compiler/optimizing/liveness_test.cc b/compiler/optimizing/liveness_test.cc
index 92a987c..bd74368 100644
--- a/compiler/optimizing/liveness_test.cc
+++ b/compiler/optimizing/liveness_test.cc
@@ -154,7 +154,7 @@
// return a;
//
// Bitsets are made of:
- // (constant0, constant4, constant5, phi)
+ // (constant0, constant5, constant4, phi)
const char* expected =
"Block 0\n" // entry block
" live in: (0000)\n"
@@ -165,11 +165,11 @@
" live out: (0110)\n"
" kill: (0000)\n"
"Block 2\n" // else block
- " live in: (0100)\n"
+ " live in: (0010)\n"
" live out: (0000)\n"
" kill: (0000)\n"
"Block 3\n" // then block
- " live in: (0010)\n"
+ " live in: (0100)\n"
" live out: (0000)\n"
" kill: (0000)\n"
"Block 4\n" // return block
@@ -291,7 +291,7 @@
// }
// return 5;
// Bitsets are made of:
- // (constant0, constant4, constant5, phi)
+ // (constant0, constant5, constant4, phi)
const char* expected =
"Block 0\n"
" live in: (0000)\n"
@@ -310,7 +310,7 @@
" live out: (0110)\n"
" kill: (0000)\n"
"Block 4\n" // return block
- " live in: (0010)\n"
+ " live in: (0100)\n"
" live out: (0000)\n"
" kill: (0000)\n"
"Block 5\n" // exit block
@@ -386,7 +386,7 @@
// Make sure we create a preheader of a loop when a header originally has two
// incoming blocks and one back edge.
// Bitsets are made of:
- // (constant0, constant4, constant5, phi in block 8)
+ // (constant0, constant5, constant4, phi in block 8)
const char* expected =
"Block 0\n"
" live in: (0000)\n"
@@ -397,11 +397,11 @@
" live out: (0110)\n"
" kill: (0000)\n"
"Block 2\n"
- " live in: (0100)\n"
+ " live in: (0010)\n"
" live out: (0000)\n"
" kill: (0000)\n"
"Block 3\n"
- " live in: (0010)\n"
+ " live in: (0100)\n"
" live out: (0000)\n"
" kill: (0000)\n"
"Block 4\n" // loop header