summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-01-10 02:24:25 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-01-10 02:24:25 +0000
commita26552493b5e7e8463b10ba2d895efbb2ef9f7aa (patch)
tree3f80bd14f93628de99d2fc01befad517e5c5d29f /llvm/lib
parent301b0cade5c67a528cfc968a5d764cba65d9b87f (diff)
downloadbcm5719-llvm-a26552493b5e7e8463b10ba2d895efbb2ef9f7aa.tar.gz
bcm5719-llvm-a26552493b5e7e8463b10ba2d895efbb2ef9f7aa.zip
Mark byval parameter stack objects mutable for now.
llvm-svn: 45813
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/X86/X86ISelLowering.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index a7cf6cf8ca2..30c00f5f615 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -1012,16 +1012,17 @@ SDOperand X86TargetLowering::LowerMemArgument(SDOperand Op, SelectionDAG &DAG,
MachineFrameInfo *MFI,
SDOperand Root, unsigned i) {
// Create the nodes corresponding to a load from this parameter slot.
+ unsigned Flags = cast<ConstantSDNode>(Op.getOperand(3 + i))->getValue();
+ bool isByVal = Flags & ISD::ParamFlags::ByVal;
+
+ // FIXME: For now, all byval parameter objects are marked mutable. This
+ // can be changed with more analysis.
int FI = MFI->CreateFixedObject(MVT::getSizeInBits(VA.getValVT())/8,
- VA.getLocMemOffset());
+ VA.getLocMemOffset(), !isByVal);
SDOperand FIN = DAG.getFrameIndex(FI, getPointerTy());
-
- unsigned Flags = cast<ConstantSDNode>(Op.getOperand(3 + i))->getValue();
-
- if (Flags & ISD::ParamFlags::ByVal)
+ if (isByVal)
return FIN;
- else
- return DAG.getLoad(VA.getValVT(), Root, FIN, NULL, 0);
+ return DAG.getLoad(VA.getValVT(), Root, FIN, NULL, 0);
}
SDOperand
OpenPOWER on IntegriCloud