From 3c19d3e029a9fcc123d2c6fd1e5e13867d2cfe1f Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Tue, 19 Apr 2016 14:36:35 +0100 Subject: Reuse HUseListNode<>s when replacing instruction or input. Compiling the Nexus 5 boot image with the 64-bit dex2oat on host this CL reduces the memory used for compiling the most hungry method, BatteryStats.dumpLocked(), by ~5.6MiB: Before: MEM: used: 44393040, allocated: 45361248, lost: 968208 Number of arenas allocated: 319, Number of allocations: 815492, avg size: 54 ... UseListNode 10308480 ... After: MEM: used: 38554536, allocated: 39463008, lost: 908472 Number of arenas allocated: 274, Number of allocations: 572221, avg size: 67 ... UseListNode 4469976 ... With 32-bit dex2oat, the UseListNode would be 2/3 of the values for 64-bit dex2oat (both before and after). Bug: 28173563 Change-Id: Ia4fabe03568f0e0dbf2cdf2b031863602aea3530 --- compiler/optimizing/ssa_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/optimizing/ssa_test.cc') diff --git a/compiler/optimizing/ssa_test.cc b/compiler/optimizing/ssa_test.cc index 218bd53bc2..429763423c 100644 --- a/compiler/optimizing/ssa_test.cc +++ b/compiler/optimizing/ssa_test.cc @@ -346,7 +346,7 @@ TEST_F(SsaTest, Loop5) { "BasicBlock 7, pred: 6\n" " 12: Exit\n" "BasicBlock 8, pred: 2, 3, succ: 4\n" - " 13: Phi(2, 1) [8, 8, 11]\n" + " 13: Phi(2, 1) [11, 8, 8]\n" " 14: Goto\n"; const uint16_t data[] = ONE_REGISTER_CODE_ITEM( -- cgit v1.2.3-59-g8ed1b