Forgot these.

llvm-svn: 46292
This commit is contained in:
Evan Cheng 2008-01-24 00:22:01 +00:00
parent 2517423c3c
commit ec3da554e6
2 changed files with 8 additions and 4 deletions

View File

@ -3917,8 +3917,7 @@ TargetLowering::LowerArguments(Function &F, SelectionDAG &DAG) {
Flags |= ISD::ParamFlags::ByVal;
const PointerType *Ty = cast<PointerType>(I->getType());
const Type *ElementTy = Ty->getElementType();
unsigned FrameAlign =
Log2_32(getTargetData()->getCallFrameTypeAlignment(ElementTy));
unsigned FrameAlign = Log2_32(getByValTypeAlignment(ElementTy));
unsigned FrameSize = getTargetData()->getABITypeSize(ElementTy);
Flags |= (FrameAlign << ISD::ParamFlags::ByValAlignOffs);
Flags |= (FrameSize << ISD::ParamFlags::ByValSizeOffs);
@ -4047,8 +4046,7 @@ TargetLowering::LowerCallTo(SDOperand Chain, const Type *RetTy,
Flags |= ISD::ParamFlags::ByVal;
const PointerType *Ty = cast<PointerType>(Args[i].Ty);
const Type *ElementTy = Ty->getElementType();
unsigned FrameAlign =
Log2_32(getTargetData()->getCallFrameTypeAlignment(ElementTy));
unsigned FrameAlign = Log2_32(getByValTypeAlignment(ElementTy));
unsigned FrameSize = getTargetData()->getABITypeSize(ElementTy);
Flags |= (FrameAlign << ISD::ParamFlags::ByValAlignOffs);
Flags |= (FrameSize << ISD::ParamFlags::ByValSizeOffs);

View File

@ -414,6 +414,12 @@ unsigned TargetLowering::getVectorTypeBreakdown(MVT::ValueType VT,
return 1;
}
/// getByValTypeAlignment - Return the desired alignment for ByVal aggregate
/// function arguments in the caller parameter area.
unsigned TargetLowering::getByValTypeAlignment(const Type *Ty) const {
return Log2_32(TD->getCallFrameTypeAlignment(Ty));
}
SDOperand TargetLowering::getPICJumpTableRelocBase(SDOperand Table,
SelectionDAG &DAG) const {
if (usesGlobalOffsetTable())