diff options
author | Dan Gohman <gohman@apple.com> | 2010-07-10 09:00:22 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-07-10 09:00:22 +0000 |
commit | d7b5ce3312828700ba09ef07a9791559da427491 (patch) | |
tree | e76def7a02a0f1365ed367ce608f9d6ea7d67efb /llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp | |
parent | be8d9b0bb802a7b86cc9464816c0cfbacf35440c (diff) | |
download | bcm5719-llvm-d7b5ce3312828700ba09ef07a9791559da427491.tar.gz bcm5719-llvm-d7b5ce3312828700ba09ef07a9791559da427491.zip |
Reapply bottom-up fast-isel, with several fixes for x86-32:
- Check getBytesToPopOnReturn().
- Eschew ST0 and ST1 for return values.
- Fix the PIC base register initialization so that it doesn't ever
fail to end up the top of the entry block.
llvm-svn: 108039
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp b/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp index 6d9f1021ff0..928e1ecd4cf 100644 --- a/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp @@ -82,6 +82,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(); @@ -174,6 +181,7 @@ void FunctionLoweringInfo::clear() { #endif LiveOutRegInfo.clear(); ArgDbgValues.clear(); + RegFixups.clear(); } /// CreateReg - Allocate a single virtual register for the given type. |