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)
commit092e5e75661fdd5d54a748fb00fab59d21031268
treed75557bd1edf37b06f7f4fb7b78cf1b341fda12c
parent5f352cc6e49d714bd5c14c952aa5c394fc9897bf
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174855 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/FastISel.h
lib/CodeGen/SelectionDAG/FastISel.cpp
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
lib/Target/ARM/ARMFastISel.cpp