From b29e4d1423028fab47db3be6e41e4b2a067bf100 Mon Sep 17 00:00:00 2001 From: buzbee Date: Mon, 26 Sep 2011 15:05:48 -0700 Subject: Misc codegen fixes related to register promotion The post-promotion world no longer guarantees that wide result pairs don't overlap with source operands. Also had to narrow a load-elimination optimization to apply only when using temp registers for Dalvik virtual registers. Change-Id: I2afbbec865d5a14d46e539cce4d8b3d0e4e8880b --- src/compiler/codegen/RallocUtil.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/compiler/codegen/RallocUtil.cc') diff --git a/src/compiler/codegen/RallocUtil.cc b/src/compiler/codegen/RallocUtil.cc index 6875718154..69b98d4814 100644 --- a/src/compiler/codegen/RallocUtil.cc +++ b/src/compiler/codegen/RallocUtil.cc @@ -547,6 +547,12 @@ extern RegisterInfo* oatIsTemp(CompilationUnit* cUnit, int reg) return (p->isTemp) ? p : NULL; } +extern RegisterInfo* oatIsPromoted(CompilationUnit* cUnit, int reg) +{ + RegisterInfo* p = getRegInfo(cUnit, reg); + return (p->isTemp) ? NULL : p; +} + extern bool oatIsDirty(CompilationUnit* cUnit, int reg) { RegisterInfo* p = getRegInfo(cUnit, reg); @@ -849,7 +855,7 @@ STATIC void copyRegInfo(CompilationUnit* cUnit, int newReg, int oldReg) /* * Return an updated location record with current in-register status. * If the value lives in live temps, reflect that fact. No code - * is generated. The the live value is part of an older pair, + * is generated. If the live value is part of an older pair, * clobber both low and high. * TUNING: clobbering both is a bit heavy-handed, but the alternative * is a bit complex when dealing with FP regs. Examine code to see -- cgit v1.2.3-59-g8ed1b