diff options
| author | Chris Lattner <sabre@nondot.org> | 2008-02-13 07:35:30 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2008-02-13 07:35:30 +0000 |
| commit | f6518cf4aba9710c5949c7f2d477bf55ea71fe16 (patch) | |
| tree | c4e52fd3d49cd537e9f9d302c6a6de488cec6d40 /llvm/lib/Target/CellSPU | |
| parent | ee322b44a4a583abe4c00a058ad70b390163be10 (diff) | |
| download | bcm5719-llvm-f6518cf4aba9710c5949c7f2d477bf55ea71fe16.tar.gz bcm5719-llvm-f6518cf4aba9710c5949c7f2d477bf55ea71fe16.zip | |
don't try to avoid inserting loads when lowering FORMAL_ARGUMENTS.
DAGCombine is now quite good at zapifying them.
llvm-svn: 47053
Diffstat (limited to 'llvm/lib/Target/CellSPU')
| -rw-r--r-- | llvm/lib/Target/CellSPU/SPUISelLowering.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/llvm/lib/Target/CellSPU/SPUISelLowering.cpp b/llvm/lib/Target/CellSPU/SPUISelLowering.cpp index e060b36b899..6fe6e48bc84 100644 --- a/llvm/lib/Target/CellSPU/SPUISelLowering.cpp +++ b/llvm/lib/Target/CellSPU/SPUISelLowering.cpp @@ -1008,17 +1008,9 @@ LowerFORMAL_ARGUMENTS(SDOperand Op, SelectionDAG &DAG, int &VarArgsFrameIndex) // We need to load the argument to a virtual register if we determined above // that we ran out of physical registers of the appropriate type if (needsLoad) { - // If the argument is actually used, emit a load from the right stack - // slot. - if (!Op.Val->hasNUsesOfValue(0, ArgNo)) { - int FI = MFI->CreateFixedObject(ObjSize, ArgOffset); - SDOperand FIN = DAG.getFrameIndex(FI, PtrVT); - ArgVal = DAG.getLoad(ObjectVT, Root, FIN, NULL, 0); - } else { - // Don't emit a dead load. - ArgVal = DAG.getNode(ISD::UNDEF, ObjectVT); - } - + int FI = MFI->CreateFixedObject(ObjSize, ArgOffset); + SDOperand FIN = DAG.getFrameIndex(FI, PtrVT); + ArgVal = DAG.getLoad(ObjectVT, Root, FIN, NULL, 0); ArgOffset += StackSlotSize; } |

