From 15bf9804820b73765899e4b3e0d8a1fa15e0dbd3 Mon Sep 17 00:00:00 2001 From: buzbee Date: Tue, 12 Jun 2012 17:49:27 -0700 Subject: More Quick compiler restructuring Yet another round of compiler restructuring to remove references to MIR and BasicBlock structures in the lower levels of code generation. Eliminating these will make it easer to share code with the LLVM-IR -> LIR lowering pass. This time I'm focusing on the Invokes and special-cased inlined intrinsics. Note that this CL includes a somewhat subtle difference in handling MOVE_RETURNs following an INVOKE. Previously, we fused INVOKEs and MOVE_RETURNs for inlined intrinsics. To simplify the world, we're now fusing all INVOKE/MOVE_RETURN pairs (though it shouldn't impact the codegen non-inlined invokes. Changes in latest patch set: Two of the old intrinsic generators did not fuse the following MOVE_RESULT, so the results were dropped on the floor. Also, allowed match of MOVE_RESULT_OBJECT (which previously had not been matched because no inline intrisic used it as a return value). Change-Id: I93fec0cd557398ad7b04bdcc0393f27d3644913d --- src/compiler/codegen/MethodBitcode.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/compiler/codegen/MethodBitcode.cc') diff --git a/src/compiler/codegen/MethodBitcode.cc b/src/compiler/codegen/MethodBitcode.cc index 4ada78cfb0..3b6b087e8d 100644 --- a/src/compiler/codegen/MethodBitcode.cc +++ b/src/compiler/codegen/MethodBitcode.cc @@ -336,7 +336,7 @@ bool convertMIRNode(CompilationUnit* cUnit, MIR* mir, BasicBlock* bb, rlSrc[0] = rlSrc[1] = rlSrc[2] = badLoc; if (attrs & DF_UA) { if (attrs & DF_A_WIDE) { - rlSrc[nextLoc++] = oatGetSrcWide(cUnit, mir, nextSreg, nextSreg + 1); + rlSrc[nextLoc++] = oatGetSrcWide(cUnit, mir, nextSreg); nextSreg+= 2; } else { rlSrc[nextLoc++] = oatGetSrc(cUnit, mir, nextSreg); @@ -345,7 +345,7 @@ bool convertMIRNode(CompilationUnit* cUnit, MIR* mir, BasicBlock* bb, } if (attrs & DF_UB) { if (attrs & DF_B_WIDE) { - rlSrc[nextLoc++] = oatGetSrcWide(cUnit, mir, nextSreg, nextSreg + 1); + rlSrc[nextLoc++] = oatGetSrcWide(cUnit, mir, nextSreg); nextSreg+= 2; } else { rlSrc[nextLoc++] = oatGetSrc(cUnit, mir, nextSreg); @@ -354,16 +354,16 @@ bool convertMIRNode(CompilationUnit* cUnit, MIR* mir, BasicBlock* bb, } if (attrs & DF_UC) { if (attrs & DF_C_WIDE) { - rlSrc[nextLoc++] = oatGetSrcWide(cUnit, mir, nextSreg, nextSreg + 1); + rlSrc[nextLoc++] = oatGetSrcWide(cUnit, mir, nextSreg); } else { rlSrc[nextLoc++] = oatGetSrc(cUnit, mir, nextSreg); } } if (attrs & DF_DA) { if (attrs & DF_A_WIDE) { - rlDest = oatGetDestWide(cUnit, mir, 0, 1); + rlDest = oatGetDestWide(cUnit, mir); } else { - rlDest = oatGetDest(cUnit, mir, 0); + rlDest = oatGetDest(cUnit, mir); if (rlDest.ref) { objectDefinition = true; } @@ -993,7 +993,7 @@ void convertExtendedMIR(CompilationUnit* cUnit, BasicBlock* bb, MIR* mir, for (int i = 0; i < mir->ssaRep->numUses; i++) { RegLocation loc; if (rlDest.wide) { - loc = oatGetSrcWide(cUnit, mir, i, i+1); + loc = oatGetSrcWide(cUnit, mir, i); i++; } else { loc = oatGetSrc(cUnit, mir, i); -- cgit v1.2.3-59-g8ed1b