[llvm-commits] [llvm] r46292 - in /llvm/trunk/lib/CodeGen/SelectionDAG: SelectionDAGISel.cpp TargetLowering.cpp
Evan Cheng
evan.cheng at apple.com
Wed Jan 23 16:22:02 PST 2008
Author: evancheng
Date: Wed Jan 23 18:22:01 2008
New Revision: 46292
URL: http://llvm.org/viewvc/llvm-project?rev=46292&view=rev
Log:
Forgot these.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=46292&r1=46291&r2=46292&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Wed Jan 23 18:22:01 2008
@@ -3917,8 +3917,7 @@
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 @@
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);
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp?rev=46292&r1=46291&r2=46292&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp Wed Jan 23 18:22:01 2008
@@ -414,6 +414,12 @@
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())
More information about the llvm-commits
mailing list