diff options
author | Dan Gohman <gohman@apple.com> | 2010-07-07 19:20:32 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-07-07 19:20:32 +0000 |
commit | e7ccc51cc171269984c0339ce3f7ee042247dc82 (patch) | |
tree | f9efaa94f5f62ea576686aea689fed6e9b92b14b /llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp | |
parent | 189b212662b1f35e4e77da212338e06d69db0e8a (diff) | |
download | bcm5719-llvm-e7ccc51cc171269984c0339ce3f7ee042247dc82.tar.gz bcm5719-llvm-e7ccc51cc171269984c0339ce3f7ee042247dc82.zip |
Implement bottom-up fast-isel. This has the advantage of not requiring
a separate DCE pass over MachineInstrs.
llvm-svn: 107804
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp b/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp index 8c4211ab29a..55171fca096 100644 --- a/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp @@ -78,6 +78,13 @@ void FunctionLoweringInfo::set(const Function &fn, MachineFunction &mf) { MF = &mf; RegInfo = &MF->getRegInfo(); + // Check whether the function can return without sret-demotion. + SmallVector<ISD::OutputArg, 4> Outs; + GetReturnInfo(Fn->getReturnType(), + Fn->getAttributes().getRetAttributes(), Outs, TLI); + CanLowerReturn = TLI.CanLowerReturn(Fn->getCallingConv(), Fn->isVarArg(), + Outs, Fn->getContext()); + // Create a vreg for each argument register that is not dead and is used // outside of the entry block for the function. for (Function::const_arg_iterator AI = Fn->arg_begin(), E = Fn->arg_end(); |