[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
Jim Laskey
jlaskey at apple.com
Fri Feb 23 13:45:26 PST 2007
Changes in directory llvm/lib/CodeGen/SelectionDAG:
SelectionDAGISel.cpp updated: 1.372 -> 1.373
---
Log message:
Handle improper cast.
---
Diffs of the changes: (+19 -6)
SelectionDAGISel.cpp | 25 +++++++++++++++++++------
1 files changed, 19 insertions(+), 6 deletions(-)
Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.372 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.373
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.372 Thu Feb 22 10:10:05 2007
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Fri Feb 23 15:45:01 2007
@@ -484,7 +484,9 @@
unsigned Opc);
bool isExportableFromCurrentBlock(Value *V, const BasicBlock *FromBB);
void ExportFromCurrentBlock(Value *V);
- void LowerCallTo(CallInst &I, SDOperand Callee, unsigned OpIdx);
+ void LowerCallTo(Instruction &I,
+ const Type *CalledValueTy, unsigned CallingConv,
+ bool IsTailCall, SDOperand Callee, unsigned OpIdx);
// Terminator instructions.
void visitRet(ReturnInst &I);
@@ -1118,7 +1120,11 @@
DAG.setRoot(DAG.getNode(ISD::LABEL, MVT::Other, getRoot(),
DAG.getConstant(BeginLabel, MVT::i32)));
- LowerCallTo((CallInst&)I, getValue(I.getOperand(0)), 3);
+ LowerCallTo(I, I.getCalledValue()->getType(),
+ I.getCallingConv(),
+ false,
+ getValue(I.getOperand(0)),
+ 3);
// Insert a label before the invoke call to mark the try range.
// This can be used to detect deletion of the invoke via the
@@ -2246,9 +2252,12 @@
}
-void SelectionDAGLowering::LowerCallTo(CallInst &I,
+void SelectionDAGLowering::LowerCallTo(Instruction &I,
+ const Type *CalledValueTy,
+ unsigned CallingConv,
+ bool IsTailCall,
SDOperand Callee, unsigned OpIdx) {
- const PointerType *PT = cast<PointerType>(I.getCalledValue()->getType());
+ const PointerType *PT = cast<PointerType>(CalledValueTy);
const FunctionType *FTy = cast<FunctionType>(PT->getElementType());
TargetLowering::ArgListTy Args;
@@ -2267,7 +2276,7 @@
std::pair<SDOperand,SDOperand> Result =
TLI.LowerCallTo(getRoot(), I.getType(),
FTy->paramHasAttr(0,FunctionType::SExtAttribute),
- FTy->isVarArg(), I.getCallingConv(), I.isTailCall(),
+ FTy->isVarArg(), CallingConv, IsTailCall,
Callee, Args, DAG);
if (I.getType() != Type::VoidTy)
setValue(&I, Result.first);
@@ -2333,7 +2342,11 @@
else
Callee = DAG.getExternalSymbol(RenameFn, TLI.getPointerTy());
- LowerCallTo(I, Callee, 1);
+ LowerCallTo(I, I.getCalledValue()->getType(),
+ I.getCallingConv(),
+ I.isTailCall(),
+ Callee,
+ 1);
}
More information about the llvm-commits
mailing list