diff options
| author | Ben Cheng <bccheng@android.com> | 2010-06-02 15:33:51 -0700 |
|---|---|---|
| committer | Ben Cheng <bccheng@android.com> | 2010-06-02 15:46:30 -0700 |
| commit | d44faf5ca0afd3aee4e25284d0d86bd4e734b423 (patch) | |
| tree | 6e4d77bfc3423d4d91812856bfa9fdd95fe9880f /vm/compiler/codegen/arm/CodegenDriver.c | |
| parent | 3387a2d758034f1f72a46c420aeb797972ada329 (diff) | |
Include move-result into the same trace as the invoke.
In preparation for method inlining implementation. Example trace:
D/dalvikvm( 708): Compiler: Building trace for fibonacci, offset 0x10
D/dalvikvm( 708): 0x426b6fa8: 0x0016 const-wide/16 v0, (#2), (#0)
D/dalvikvm( 708): 0x426b6fac: 0x009c sub-long v0, v7, v0
D/dalvikvm( 708): 0x426b6fb0: 0x0070 invoke-direct v6, v0, v1
D/dalvikvm( 708): 0x426b6fb6: 0x000b move-result-wide v0, (#0), (#0)
D/dalvikvm( 708): TRACEINFO (3): 0x426b6f88 Lcom/android/unit_tests/PerformanceTests$FibonacciSlow;fibonacci 0x10 8 of 32, 7 blocks
D/dalvikvm( 708): 7 blocks in total
D/dalvikvm( 708): Block 0 (insn 0010 - 0010 empty)
D/dalvikvm( 708): Fallthrough : block 1 (0010)
D/dalvikvm( 708): Block 1 (insn 0010 - 0014)
D/dalvikvm( 708): Taken branch: block 3 (0000)
D/dalvikvm( 708): Fallthrough : block 2 (0017)
D/dalvikvm( 708): Block 2 (insn 0017 - 0017)
D/dalvikvm( 708): Fallthrough : block 4 (0018)
D/dalvikvm( 708): Block 3 (insn 0000 - 0000 empty)
D/dalvikvm( 708): Block 4 (insn 0018 - 0018 empty)
D/dalvikvm( 708): Block 5 (insn 0000 - 0000 empty)
D/dalvikvm( 708): Block 6 (insn 0000 - 0000 empty)
Once implemented the inliner will consume the invoke-direct and
move-result-wide instructions altogether.
Change-Id: I4e0e6283989a468d9edf01cf26f644d2d8d7ec64
Diffstat (limited to 'vm/compiler/codegen/arm/CodegenDriver.c')
| -rw-r--r-- | vm/compiler/codegen/arm/CodegenDriver.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/vm/compiler/codegen/arm/CodegenDriver.c b/vm/compiler/codegen/arm/CodegenDriver.c index dbb85c9b2..a28e4114d 100644 --- a/vm/compiler/codegen/arm/CodegenDriver.c +++ b/vm/compiler/codegen/arm/CodegenDriver.c @@ -3646,6 +3646,16 @@ void dvmCompilerMIR2LIR(CompilationUnit *cUnit) labelList[i].operands[0] = blockList[i]->startOffset; if (blockList[i]->blockType >= kChainingCellGap) { + if (blockList[i]->firstMIRInsn != NULL && + ((blockList[i]->firstMIRInsn->dalvikInsn.opCode == + OP_MOVE_RESULT) || + (blockList[i]->firstMIRInsn->dalvikInsn.opCode == + OP_MOVE_RESULT_WIDE) || + (blockList[i]->firstMIRInsn->dalvikInsn.opCode == + OP_MOVE_RESULT_OBJECT))) { + /* Align this block first since it is a return chaining cell */ + newLIR0(cUnit, kArmPseudoPseudoAlign4); + } /* * Append the label pseudo LIR first. Chaining cells will be handled * separately afterwards. |
