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
diff --git a/src/compiler/CompilerIR.h b/src/compiler/CompilerIR.h
index e9a2656..5b92af1 100644
--- a/src/compiler/CompilerIR.h
+++ b/src/compiler/CompilerIR.h
@@ -84,6 +84,22 @@
ArenaBitVector* bv;
};
+struct InvokeInfo {
+ int numArgWords; // Note: word count, not arg count
+ RegLocation* args; // One for each word of arguments
+ RegLocation result; // Eventual target of MOVE_RESULT
+ int optFlags;
+ InvokeType type;
+ uint32_t dexIdx;
+ uint32_t methodIdx;
+ uintptr_t directCode;
+ uintptr_t directMethod;
+ RegLocation target; // Target of following move_result
+ bool skipThis;
+ bool isRange;
+ int offset; // Dalvik offset
+};
+
/*
* Data structure tracking the mapping between a Dalvik register (pair) and a
* native register (pair). The idea is to reuse the previously loaded value
@@ -755,8 +771,7 @@
void oatInsertLIRAfter(LIR* currentLIR, LIR* newLIR);
-MIR* oatFindMoveResult(CompilationUnit* cUnit, BasicBlock* bb, MIR* mir,
- bool wide);
+MIR* oatFindMoveResult(CompilationUnit* cUnit, BasicBlock* bb, MIR* mir);
/* Debug Utilities */
void oatDumpCompilationUnit(CompilationUnit* cUnit);