OSDN Git Service

Subzero: Implementation of "advanced Phi lowering".
authorJim Stichnoth <stichnot@chromium.org>
Thu, 30 Oct 2014 22:01:31 +0000 (15:01 -0700)
committerJim Stichnoth <stichnot@chromium.org>
Thu, 30 Oct 2014 22:01:31 +0000 (15:01 -0700)
commit336f6c4a90e7f5ee156bc9a339d80c7def5ddeff
treeb2154b8e9808e4772069cad5b2964631e32c3cf5
parent0506fc7299b3eed6d714e74f3f75d9dc6f888dcc
Subzero: Implementation of "advanced Phi lowering".

Delays Phi lowering until after register allocation.  This lets the Phi assignment order take register allocation into account and avoid creating false dependencies.

All edges that lead to Phi instructions are split, and the new node gets mov instructions in the correct topological order, using available physical registers as needed.

This lowering style is controllable under -O2 using -phi-edge-split (enabled by default).

The result is faster translation time (due to fewer temporaries leading to faster liveness analysis and register allocation) as well as better code quality (due to better register allocation and fewer phi-based assignments).

BUG= none
R=jvoung@chromium.org

Review URL: https://codereview.chromium.org/680733002
25 files changed:
pydir/szbuild_spec2k.py
src/IceCfg.cpp
src/IceCfg.h
src/IceCfgNode.cpp
src/IceCfgNode.h
src/IceDefs.h
src/IceInst.cpp
src/IceInst.h
src/IceInstX8632.cpp
src/IceInstX8632.h
src/IceLiveness.cpp
src/IceLiveness.h
src/IceOperand.cpp
src/IceOperand.h
src/IceRegAlloc.cpp
src/IceTargetLowering.cpp
src/IceTargetLowering.h
src/IceTargetLoweringX8632.cpp
src/IceTargetLoweringX8632.h
src/IceTimerTree.def
src/IceTypes.cpp
src/IceTypes.h
src/llvm2ice.cpp
tests_lit/llvm2ice_tests/nacl-atomic-cmpxchg-optimization.ll
tests_lit/llvm2ice_tests/simple-loop.ll