aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/SelectionDAG
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2013-02-25 21:59:35 +0000
committerChad Rosier <mcrosier@apple.com>2013-02-25 21:59:35 +0000
commitfd3417d288c22673ec6d76dc4695989bb544373f (patch)
tree5a2dac63733e1f8ca619c0997c0fdefa6b2ba6c2 /lib/CodeGen/SelectionDAG
parent029f4fd2ff539ed143b83c140349df2c064965d2 (diff)
downloadexternal_llvm-fd3417d288c22673ec6d76dc4695989bb544373f.zip
external_llvm-fd3417d288c22673ec6d76dc4695989bb544373f.tar.gz
external_llvm-fd3417d288c22673ec6d76dc4695989bb544373f.tar.bz2
[fast-isel] Add X86FastIsel::FastLowerArguments to handle functions with 6 or
fewer scalar integer (i32 or i64) arguments. It completely eliminates the need for SDISel for trivial functions. Also, add the new llc -fast-isel-abort-args option, which is similar to -fast-isel-abort option, but for formal argument lowering. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176052 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index a598ec4..1c92f8b 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -145,6 +145,10 @@ EnableFastISelVerbose("fast-isel-verbose", cl::Hidden,
static cl::opt<bool>
EnableFastISelAbort("fast-isel-abort", cl::Hidden,
cl::desc("Enable abort calls when \"fast\" instruction fails"));
+static cl::opt<bool>
+EnableFastISelAbortArgs("fast-isel-abort-args", cl::Hidden,
+ cl::desc("Enable abort calls when \"fast\" instruction fails to "
+ "lower formal arguments"));
static cl::opt<bool>
UseMBPI("use-mbpi",
@@ -1048,6 +1052,12 @@ void SelectionDAGISel::SelectAllBasicBlocks(const Function &Fn) {
if (LLVMBB == &Fn.getEntryBlock()) {
// Lower any arguments needed in this block if this is the entry block.
if (!FastIS->LowerArguments()) {
+
+ if (EnableFastISelAbortArgs)
+ // The "fast" selector couldn't lower these arguments. For the
+ // purpose of debugging, just abort.
+ llvm_unreachable("FastISel didn't lower all arguments");
+
// Call target indepedent SDISel argument lowering code if the target
// specific routine is not successful.
LowerArguments(LLVMBB);