Currently, codegen may spent some time in SDISel passes even if an entire
authorEvan Cheng <evan.cheng@apple.com>
Mon, 11 Feb 2013 01:27:15 +0000 (01:27 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Mon, 11 Feb 2013 01:27:15 +0000 (01:27 +0000)
commit615620c9e8498386ef22696c7e37e9fd94f5ad8b
treedda05dad5059de9d569c052e478e90502fecc4e2
parentd1c640425073f6cb65869ee38a35b3c21cfc6e16
Currently, codegen may spent some time in SDISel passes even if an entire
function is successfully handled by fast-isel. That's because function
arguments are *always* handled by SDISel. Introduce FastLowerArguments to
allow each target to provide hook to handle formal argument lowering.

As a proof-of-concept, add ARMFastIsel::FastLowerArguments to handle
functions with 4 or fewer scalar integer (i8, i16, or i32) arguments. It
completely eliminates the need for SDISel for trivial functions.

rdar://13163905

llvm-svn: 174855
llvm/include/llvm/CodeGen/FastISel.h
llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
llvm/lib/Target/ARM/ARMFastISel.cpp