OSDN Git Service

AArch64: Add HInstruction scheduling support.
authorAlexandre Rames <alexandre.rames@linaro.org>
Tue, 18 Oct 2016 08:32:29 +0000 (09:32 +0100)
committerxueliang.zhong <xueliang.zhong@linaro.org>
Wed, 25 Jan 2017 14:25:20 +0000 (14:25 +0000)
commit22aa54bf8469689c7c6c33f15ff4df2ffba8fa15
tree14204d55784dce3ffdd2641382a763afee85ced0
parent8116003cc9dd1e74fac1682eec547b8bb0afb061
AArch64: Add HInstruction scheduling support.

This commit adds a new `HInstructionScheduling` pass that performs
basic scheduling on the `HGraph`.

Currently, scheduling is performed at the block level, so no
`HInstruction` ever leaves its block in this pass.

The scheduling process iterates through blocks in the graph. For
blocks that we can and want to schedule:
1) Build a dependency graph for instructions. It includes data
   dependencies (inputs/uses), but also environment dependencies and
   side-effect dependencies.
2) Schedule the dependency graph. This is a topological sort of the
   dependency graph, using heuristics to decide what node to schedule
   first when there are multiple candidates. Currently the heuristics
   only consider instruction latencies and schedule first the
   instructions that are on the critical path.

Test: m test-art-host
Test: m test-art-target

Change-Id: Iec103177d4f059666d7c9626e5770531fbc5ccdc
18 files changed:
compiler/Android.bp
compiler/optimizing/codegen_test.cc
compiler/optimizing/codegen_test_utils.h [new file with mode: 0644]
compiler/optimizing/nodes.cc
compiler/optimizing/nodes.h
compiler/optimizing/optimizing_compiler.cc
compiler/optimizing/optimizing_unit_test.h
compiler/optimizing/scheduler.cc [new file with mode: 0644]
compiler/optimizing/scheduler.h [new file with mode: 0644]
compiler/optimizing/scheduler_arm64.cc [new file with mode: 0644]
compiler/optimizing/scheduler_arm64.h [new file with mode: 0644]
compiler/optimizing/scheduler_test.cc [new file with mode: 0644]
runtime/base/arena_allocator.cc
runtime/base/arena_allocator.h
runtime/base/iteration_range.h
test/706-checker-scheduler/expected.txt [new file with mode: 0644]
test/706-checker-scheduler/info.txt [new file with mode: 0644]
test/706-checker-scheduler/src/Main.java [new file with mode: 0644]